From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6656673633724792832 Date: Mon, 11 Feb 2019 02:50:36 -0800 (PST) From: chombourger@gmail.com To: isar-users Message-Id: <457ae522-b027-430d-b93a-3064d451219e@googlegroups.com> In-Reply-To: <20190211103526.3d92babf@md1za8fc.ad001.siemens.net> References: <20190211093324.1444-1-henning.schild@siemens.com> <20190211103526.3d92babf@md1za8fc.ad001.siemens.net> Subject: Re: [PATCH] dpkg-base: apt-get "update" before "source" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_463_2063582821.1549882236980" X-Google-Token: EPymheMFz0FfxLtCXgA0 X-Google-IP: 192.94.31.2 X-TUID: RIHWTozGLFs8 ------=_Part_463_2063582821.1549882236980 Content-Type: multipart/alternative; boundary="----=_Part_464_1302552070.1549882236981" ------=_Part_464_1302552070.1549882236981 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit I have a local patch doing just that, I can post something as RFC On Monday, February 11, 2019 at 10:35:30 AM UTC+1, 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 ... > > 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 > > ------=_Part_464_1302552070.1549882236981 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
I have a local patch doing just that, I can post something= as RFC

On Monday, February 11, 2019 at 10:35:30 AM UTC+1, Henning S= child wrote:
Here i see an ofte= n 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 ...

Henning

Am Mon, 11 Feb 2019 10:33:24 +0100
schrieb Henning Schild <henning...@siemens.com>:

> From: Henning Schild <henning...@siemens.com>
>=20
> When rebuilding we can run into an inconsistent view where buildch= root
> assumes it could download the sources of a modified upstream packa= ge.
> After a "reprepro ... remove" we always need to "ap= t-get update" to
> not operate on an old version of the metadata.
>=20
> Signed-off-by: Henning Schild <henning...@siemens.com>
> ---
> =C2=A0meta/classes/dpkg-base.bbclass | 4 ++++
> =C2=A01 file changed, 4 insertions(+)
>=20
> diff --git a/meta/classes/dpkg-base.bbclass
> b/meta/classes/dpkg-base.bbclass index 175dc80..5425df8 10064= 4
> --- a/meta/classes/dpkg-base.bbclass
> +++ b/meta/classes/dpkg-base.bbclass
> @@ -31,6 +31,10 @@ do_apt_fetch() {
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0fi
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0dpkg_do_moun= ts
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0E=3D"${= @ bb.utils.export_proxies(d)}"
> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0sudo -E chroot ${= BUILDCHROOT_DIR} /usr/bin/apt-get update \
> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0-o
> Dir::Etc::sourcelist=3D"sources.list.d/isar-apt.list&quo= t; \
> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0-o Dir::Etc::sourceparts=3D"-" \
> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0-o APT::Get::List-Cleanup=3D"0"
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0sudo -E chro= ot --userspec=3D$( id -u ):$( id -g )
> ${BUILDCHROOT_DIR} \ sh -c 'cd ${PP} && apt-get -y sou= rce ${SRC_APT}'
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0dpkg_undo_mo= unts

------=_Part_464_1302552070.1549882236981-- ------=_Part_463_2063582821.1549882236980--