From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6635832943372664832 X-Received: by 2002:a7b:c002:: with SMTP id c2mr1556408wmb.0.1545046907838; Mon, 17 Dec 2018 03:41:47 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:840e:: with SMTP id g14ls24289wmd.5.canary-gmail; Mon, 17 Dec 2018 03:41:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/VeTU/BkMeRV59Gy9LC9VPrjLmddCxFEeRSqutfouwrwuY22R7vBn9qN/jysSkamgfZ+ohz X-Received: by 2002:a1c:8046:: with SMTP id b67mr1596725wmd.22.1545046907398; Mon, 17 Dec 2018 03:41:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545046907; cv=none; d=google.com; s=arc-20160816; b=xT4gywcbXjwzcB7i1PFohkVA4xj4knPEe3H4n5+kwOQO4/5sREjH3vspQ88+sczNO2 t9ZIftc8fwMvq0fz8nYaP6escjnlE0lvdn5LWJrBLbLRrYu3bjHcSDhZE50Tj8YKAwUw HevETK0s7q1DXeTbLIWAPKa5RFOhh0uM+e8n8ylDTF8cU1sdI+unMCdRP9dF4VuhHsuU Z0YQPuoRMWJ++vz7AFpLWb1E1SgtrBqoxcESOmVEFQuQHykFKpqgz78PpdbfZ7lLm1IX hE0EGpKn8fEvYSB69Hz1gZpsU8GE0Wpu4O4ok7Q/h9zMNpHvWYS+E0/48orCQ+LmlW3P Ix/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=Yx0NRjVdDvazQjqmpmWvBGoCpFiViu80pQC9OLtv81E=; b=AO08RLq7FASPHs/UwwVyV93IVEC7Kzdqfcnn04250p/7nXyIa6hy2sHk4V5VMm3XEg vtKAoBC2QLws+G7xHpb852OpSsp1GnhIkPorEbk9qBxmz9mZWO+OGvNpKwxGsHWWdspi P00LHQseEG/1GmRoytiSt8C1p+HOecZs3qXl3fdCYBDMkrzLmjGRYOVw2JDY+0S3mY7M XJRj0BItVtRqOIOHk7RqtvUu9N/vAkx+15qCOhZsEQxHNxxWxdqlQrwKC/lRdsr7RdFl 8nKnOx9wubQmandbcz0iK/MkS/iaJrWcdM4krkj47tJKa1w0SKBmduk7zlVNDYMhR0BO l1JQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id z207si439588wmc.2.2018.12.17.03.41.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Dec 2018 03:41:47 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id wBHBfkfG001909 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 Dec 2018 12:41:46 +0100 Received: from md1za8fc.ad001.siemens.net ([139.25.69.108]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id wBHBfkrw004161; Mon, 17 Dec 2018 12:41:46 +0100 Date: Mon, 17 Dec 2018 12:41:45 +0100 From: Henning Schild To: "Maxim Yu. Osipov" Cc: Subject: Re: [PATCH 1/2] isar-bootstrap: Keep the initial APT sources list Message-ID: <20181217124145.1b2038d5@md1za8fc.ad001.siemens.net> In-Reply-To: <20181217054034.12236-1-mosipov@ilbers.de> References: <20181217054034.12236-1-mosipov@ilbers.de> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: ZWZeQFAY1y4T Am Mon, 17 Dec 2018 06:40:33 +0100 schrieb "Maxim Yu. Osipov" : > 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 > --- > meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb | 2 ++ > meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb | 2 ++ > meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 3 +++ > 3 files changed, 7 insertions(+) > > diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb > b/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb index > 19b60dc..7b83f80 100644 --- > a/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb +++ > b/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 > diff --git > a/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb > b/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb index > 3631506..c264123 100644 --- > a/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb +++ > b/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 > diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc > b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index > 811d50e..f411ad1 100644 --- > a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ > b/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" That file should get another name, and ideally not sit in the rootfs at all. If something goes wrong, this looks dangerously close to a valid file, with no clue where it came from. Henning > rm -f "${ROOTFSDIR}/etc/apt/sources.list" > mkdir -p "${ROOTFSDIR}/etc/apt/apt.conf.d" > install -v -m644 "${WORKDIR}/isar-apt.conf" \