From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6656673633724792832 X-Received: by 2002:ac2:5396:: with SMTP id g22mr2240537lfh.9.1549908485625; Mon, 11 Feb 2019 10:08:05 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:814b:: with SMTP id t11-v6ls1618044ljg.6.gmail; Mon, 11 Feb 2019 10:08:05 -0800 (PST) X-Google-Smtp-Source: AHgI3IbioEZYyFoLGZQVgpGfZyyW/i36vbkLJtWM0A7656mEpa/11dvbGhmxxlkW2d+gmD194X/S X-Received: by 2002:a2e:3a08:: with SMTP id h8-v6mr1019658lja.6.1549908485092; Mon, 11 Feb 2019 10:08:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549908485; cv=none; d=google.com; s=arc-20160816; b=b/ajAwFIct52GrsrIOeSEuzX+oZg7UUCWNPvK5UZQUkp/5qG5HzHQYIAnJGphRCtyG EZIDJ8kCdyNwogXQw8AsPaoWi1piqbSlhBVduzi6//eUys2UxrFAy0EOlvVIfsk6W25e CQRvJJn1jLxwOMg4Ss9o/ujLuLVHPJww1ST/j4SqLplGfWXs46cxmamXHKpOx2WEGPOx cyxnmnvi0pqgpaF3W7XDHjo57Y5NhjTR4nJhMYUN5ojOEPiBmte4Uomkp/szGXIZkFE+ 50e503jDkjz7ZFIMLV7vzbWln+968F6hTA8oypWmxz6XUhwvlu3sgeK3Ec649TAW7r7j 750w== 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=wsJj/++ryLGdRztsnGZTwdvmeZdXO4M4GRAz4XEBWxs=; b=qTCSZkj+5vSY+jK2g5O8fkLp/Rss7FT+nJWOs5N/9Hgkzcq9IFfyNZis1gg5D16Buo /drgKeirzsiZ4RCTg4z+/T4HkQZgrykvvpOPvh+Na3yYiY2VsPQ1pVfDpJVAtzs6vs5p B7vJOQpEsOROJME6poHu75aocMrDBoL9GHaN27+HEnuPYpnsH8QeztNdwak8tCBxBJEO 0tNsg7R70cBe0KXarZ37dOpC4tITWPh7e75ZM6IBkzrPcu/UorPKIohThDrI8vBANOHS 3yetRFx4dNpWmDcIZzRNyoJIC1AP9OqDjvbkw8aZBv31wTL+Fn/cJATLBg2jqZCjmHwm 8r7Q== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id y27si501618lfb.0.2019.02.11.10.08.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Feb 2019 10:08:05 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id x1BI84TR032463 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 11 Feb 2019 19:08:04 +0100 Received: from md1za8fc.ad001.siemens.net ([139.25.0.85]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id x1BI838P013500; Mon, 11 Feb 2019 19:08:03 +0100 Date: Mon, 11 Feb 2019 19:08:03 +0100 From: Henning Schild To: Jan Kiszka Cc: Subject: Re: [PATCH] dpkg-base: apt-get "update" before "source" Message-ID: <20190211190803.6cd6dab1@md1za8fc.ad001.siemens.net> In-Reply-To: <0ff54328-5b30-e645-619e-0eaac9c184b5@siemens.com> References: <20190211093324.1444-1-henning.schild@siemens.com> <20190211103526.3d92babf@md1za8fc.ad001.siemens.net> <0ff54328-5b30-e645-619e-0eaac9c184b5@siemens.com> 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: /3LcDGBeuNzp Am Mon, 11 Feb 2019 13:53:07 +0100 schrieb Jan Kiszka : > On 11.02.19 10:35, [ext] Henning Schild wrote: > > Here i see an often repeating pattern. That "apt-get update" is now > > present in many entry points to the buildchroot. > > I guess we should factor it out and put it into a central place. And > > the rule of thumb probably is ... whenever you use anything apt, > > apt-get update before you do ... > > If you are only talking about updating our locally maintained repo > (like below), that is fine to factor out and reuse. However, we must > not update against public repos after the initial pulling, in order > to ensure we have a consistent package set along the whole build. Sure. In fact all the ones we reprepro with between partial builds. At the moment just the one, but i guess there is more to come. In which case it might be a good idea to switch to using Dir::Etc::SourceParts with a value of i.e. "sources.list.isar.d", or have all the repos with that feature on one .list file. Henning > Jan > > > > > Henning > > > > Am Mon, 11 Feb 2019 10:33:24 +0100 > > schrieb Henning Schild : > > > >> From: Henning Schild > >> > >> When rebuilding we can run into an inconsistent view where > >> buildchroot assumes it could download the sources of a modified > >> upstream package. After a "reprepro ... remove" we always need to > >> "apt-get update" to not operate on an old version of the metadata. > >> > >> Signed-off-by: Henning Schild > >> --- > >> meta/classes/dpkg-base.bbclass | 4 ++++ > >> 1 file changed, 4 insertions(+) > >> > >> diff --git a/meta/classes/dpkg-base.bbclass > >> b/meta/classes/dpkg-base.bbclass index 175dc80..5425df8 100644 > >> --- a/meta/classes/dpkg-base.bbclass > >> +++ b/meta/classes/dpkg-base.bbclass > >> @@ -31,6 +31,10 @@ do_apt_fetch() { > >> fi > >> dpkg_do_mounts > >> E="${@ bb.utils.export_proxies(d)}" > >> + sudo -E chroot ${BUILDCHROOT_DIR} /usr/bin/apt-get update > >> \ > >> + -o > >> Dir::Etc::sourcelist="sources.list.d/isar-apt.list" \ > >> + -o Dir::Etc::sourceparts="-" \ > >> + -o APT::Get::List-Cleanup="0" > >> sudo -E chroot --userspec=$( id -u ):$( id -g ) > >> ${BUILDCHROOT_DIR} \ sh -c 'cd ${PP} && apt-get -y source > >> ${SRC_APT}' dpkg_undo_mounts > > >