浏览代码

isar-bootstrap: Keep the initial APT sources list

Keep the initial copy of APT sources list passed
via DISTRO_APT_SOURCES as the contents of APTSRCS
get modified during isar-bootstrap.

Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
Maxim Yu. Osipov 6 年之前
父节点
当前提交
3005963b80

+ 2 - 0
meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb

@@ -34,8 +34,10 @@ python do_apt_config_prepare() {
         aggregate_files(d, apt_preferences_list, apt_preferences_out)
 
         apt_sources_out = d.getVar("APTSRCS", True)
+        apt_sources_init_out = d.getVar("APTSRCS_INIT", True)
         apt_sources_list = (d.getVar("HOST_DISTRO_APT_SOURCES", True) or "").split()
 
+        aggregate_files(d, apt_sources_list, apt_sources_init_out)
         aggregate_aptsources_list(d, apt_sources_list, apt_sources_out)
 }
 addtask apt_config_prepare before do_bootstrap after do_unpack

+ 2 - 0
meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb

@@ -33,8 +33,10 @@ python do_apt_config_prepare() {
         aggregate_files(d, apt_preferences_list, apt_preferences_out)
 
         apt_sources_out = d.getVar("APTSRCS", True)
+        apt_sources_init_out = d.getVar("APTSRCS_INIT", True)
         apt_sources_list = (d.getVar("DISTRO_APT_SOURCES", True) or "").split()
 
+        aggregate_files(d, apt_sources_list, apt_sources_init_out)
         aggregate_aptsources_list(d, apt_sources_list, apt_sources_out)
 }
 addtask apt_config_prepare before do_bootstrap after do_unpack

+ 3 - 0
meta/recipes-core/isar-bootstrap/isar-bootstrap.inc

@@ -20,6 +20,7 @@ DEBOOTSTRAP ?= "qemu-debootstrap"
 ROOTFSDIR = "${WORKDIR}/rootfs"
 APTPREFS = "${WORKDIR}/apt-preferences"
 APTSRCS = "${WORKDIR}/apt-sources"
+APTSRCS_INIT = "${WORKDIR}/apt-sources-init"
 BASEAPTSRCS = "${WORKDIR}/base-apt-sources"
 APTKEYFILES = ""
 APTKEYRING = "${WORKDIR}/apt-keyring.gpg"
@@ -222,6 +223,8 @@ isar_bootstrap() {
                 install -v -m644 "${APTSRCS}" \
                                  "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"
             fi
+            install -v -m644 "${APTSRCS_INIT}" \
+                                 "${ROOTFSDIR}/etc/apt/sources-list"
             rm -f "${ROOTFSDIR}/etc/apt/sources.list"
             mkdir -p "${ROOTFSDIR}/etc/apt/apt.conf.d"
             install -v -m644 "${WORKDIR}/isar-apt.conf" \