From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7158065521418567680 X-Received: by 2002:a05:6512:3119:b0:4a2:d749:ff82 with SMTP id n25-20020a056512311900b004a2d749ff82mr14185359lfb.637.1666688452792; Tue, 25 Oct 2022 02:00:52 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac2:4897:0:b0:49a:b814:856d with SMTP id x23-20020ac24897000000b0049ab814856dls3370232lfc.1.-pod-prod-gmail; Tue, 25 Oct 2022 02:00:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7aLybe6rScxH1ZEySa3CLrZJSBirTfklKLI7XC8nOBIwL8O5LPi/2qB0lNjQ2PO8obTp/+ X-Received: by 2002:a19:7019:0:b0:4a9:241:54ae with SMTP id h25-20020a197019000000b004a9024154aemr5632918lfc.418.1666688451126; Tue, 25 Oct 2022 02:00:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666688451; cv=none; d=google.com; s=arc-20160816; b=mJVNpsoDHh9Ie89NjALIg8pUwf/KTLb2Fn+iOT7RsMtfUBcIqZNhTnIIkTUMSqukhG il97CovQfBeXQIZXImmvzm4bz/7KuyzHKJabrP2yVkzG1SEn93xJ85cSfOE0BYsv8/NH bGQXPRA9yWgThJi6igkrXAHymgX5qp6bAEGTljpm/Z3QNBd462Hx8Uq/+jz6+vChRRlH jU8N5J1D8FvvEr+wSmpAi5SgrzYM1HqJRYFqveyaIVOnrpd2HyCxRnWD/uAEsI0S/Bm5 KUdidClS38YtEHO+nqDNW+JG6oMhZ2XtCJudzyKdOrl5eEkl/jlS3T548QBYlQwcLtOE PlzA== 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:date:subject:to:from; bh=KhIHsqty2Z1zIMv1lg09vyTiKkJmREpKanmpRfnEFgw=; b=r5lPQYJHSHIRiZKkVID2yWVTMd1yrEX1iWS1MRuqlKLcDNcvI9jbN9+Ihrmut1E/4H giaHnxve957IuXGbWivTHUS/vClxFY2zh0HFK5kDpihjA1rzY0Z8xEwgEZaac8KClUvZ qFFruyz5HiC1MGPC0AJN1At6MkQDvd0Fzgi2GloGwge9wwvo4AScKQqvH15Xur038mK3 WMvhoV/G+WFCFe39UinLHLdXB31o6SjeB3UZBLYssWPg5PzKHFcMnGL5/hqNaN0zJ3t6 +0Z+uscViJr1mK2xiA5mjsUa4p2NtJ3b48aXp2W5fczk6qB8v3P0z2nAKbHPGWLUjFli +sWA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id s3-20020a056512314300b004a9b9ccfbe8si65044lfi.9.2022.10.25.02.00.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Oct 2022 02:00:50 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from hp.localnet (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 29P90mYq018207 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Oct 2022 11:00:49 +0200 From: Uladzimir Bely To: isar-users@googlegroups.com, Jan Kiszka Subject: Re: [PATCH] sbuild: Don't update apt database on every package build Date: Tue, 25 Oct 2022 12:00:41 +0300 Message-ID: <6810893.9J7NaK4W3v@hp> In-Reply-To: <8b91ca08-bf0d-ddc0-1232-e5131feb2af4@siemens.com> References: <20221024131000.27492-1-ubely@ilbers.de> <8b91ca08-bf0d-ddc0-1232-e5131feb2af4@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: 0Ux5iIkboxLW In mail from =D0=BF=D0=BE=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8= =D0=BA, 24 =D0=BE=D0=BA=D1=82=D1=8F=D0=B1=D1=80=D1=8F 2022 =D0=B3. 17:14:52= +03 user Jan Kiszka=20 wrote: > On 24.10.22 15:10, Uladzimir Bely wrote: > > By default, sbuild updates apt database beforethe build. It may cause > > an inconsistency between apt databases for different packages built at > > the different time if external (Debian) mirrors has updated recently. > >=20 > > With new changes, sbuild will rely on global apt state that was got > > during debootstrap stage. > >=20 > > Local `isar-apt` repo will still be automatically updated while it is > > passed via `--extra-repository=3D` argument. >=20 > Will that also ensure upgrades, e.g. from essential debian packages to > self-built ones hosted in isar-apt? We had a few of such cases in the > past already in downstream layers, and I recall permitting upgrades to > the old buildchroot for that. >=20 I'm afraid I don't exactly get you question...=20 Do you mean, it may happen that Isay may update 'isar-apt' repository, but won't even try to install "newer" (custom) package from isar-apt as an upgr= ade=20 of some Debian package installed at debootstrap stage? Yes, probably it may happen. The case I tried to cover is just to make sbui= ld=20 know about custom packages in 'isar-apt' so it could install them as depend= s. But if the package already installed (e.g. at debootstrap or sbuild-chroot= =20 stage) it may happen it won't be upgraded. I guess, there should be someting like "--no-apt-update --apt-distupgrade"= =20 then. So, apt database won't be updated, but if 'isar-apt' provides new=20 version of already installed (Debian) package, it will be used. Or, even "--no-apt-update" should be enough, while "$apt_distupgrade" is=20 already set by default in sbuild... Additinally, it would be good to have some test for this case. For example,= we=20 could have "hello" (from Debian) preinstalled before build, but upgrade it = to=20 custom "patched" version during sbuild. =20 > Jan >=20 > > Signed-off-by: Uladzimir Bely > > --- > >=20 > > meta/classes/dpkg.bbclass | 1 + > > 1 file changed, 1 insertion(+) > >=20 > > diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass > > index c92ea7db..a55b5776 100644 > > --- a/meta/classes/dpkg.bbclass > > +++ b/meta/classes/dpkg.bbclass > > @@ -90,6 +90,7 @@ dpkg_runbuild() { > >=20 > > sbuild -A -n -c ${SBUILD_CHROOT} > > --extra-repository=3D"${ISAR_APT_REPO}" \ > > =20 > > --host=3D${PACKAGE_ARCH} --build=3D${SBUILD_HOST_ARCH} ${profi= les} \ > > --no-run-lintian --no-run-piuparts --no-run-autopkgtest > > --resolve-alternatives \>=20 > > + --no-apt-update --no-apt-upgrade --no-apt-distupgrade \ > >=20 > > --chroot-setup-commands=3D"rm -f /var/log/dpkg.log" \ > > --chroot-setup-commands=3D"cp -n --no-preserve=3Downer > > ${ext_deb_dir}/*.deb -t ${deb_dir}/ || :" \ > > --finished-build-commands=3D"rm -f > > ${deb_dir}/sbuild-build-depends-main-dummy_*.deb" \