public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com, Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [PATCH] sbuild: Don't update apt database on every package build
Date: Tue, 25 Oct 2022 12:00:41 +0300	[thread overview]
Message-ID: <6810893.9J7NaK4W3v@hp> (raw)
In-Reply-To: <8b91ca08-bf0d-ddc0-1232-e5131feb2af4@siemens.com>

In mail from понедельник, 24 октября 2022 г. 17:14:52 +03 user Jan Kiszka 
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.
> > 
> > With new changes, sbuild will rely on global apt state that was got
> > during debootstrap stage.
> > 
> > Local `isar-apt` repo will still be automatically updated while it is
> > passed via `--extra-repository=` argument.
> 
> 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.
> 

I'm afraid I don't exactly get you question... 

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 upgrade 
of some Debian package installed at debootstrap stage?

Yes, probably it may happen. The case I tried to cover is just to make sbuild 
know about custom packages in 'isar-apt' so it could install them as depends.
But if the package already installed (e.g. at debootstrap or sbuild-chroot 
stage) it may happen it won't be upgraded.

I guess, there should be someting like "--no-apt-update --apt-distupgrade" 
then. So, apt database won't be updated, but if 'isar-apt' provides new 
version of already installed (Debian) package, it will be used.

Or, even "--no-apt-update" should be enough, while "$apt_distupgrade" is 
already set by default in sbuild...


Additinally, it would be good to have some test for this case. For example, we 
could have "hello" (from Debian) preinstalled before build, but upgrade it to 
custom "patched" version during sbuild.

 
> Jan
> 
> > Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
> > ---
> > 
> >  meta/classes/dpkg.bbclass | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > 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() {
> > 
> >      sbuild -A -n -c ${SBUILD_CHROOT}
> >      --extra-repository="${ISAR_APT_REPO}" \
> >      
> >          --host=${PACKAGE_ARCH} --build=${SBUILD_HOST_ARCH} ${profiles} \
> >          --no-run-lintian --no-run-piuparts --no-run-autopkgtest
> >          --resolve-alternatives \> 
> > +        --no-apt-update --no-apt-upgrade --no-apt-distupgrade \
> > 
> >          --chroot-setup-commands="rm -f /var/log/dpkg.log" \
> >          --chroot-setup-commands="cp -n --no-preserve=owner
> >          ${ext_deb_dir}/*.deb -t ${deb_dir}/ || :" \
> >          --finished-build-commands="rm -f
> >          ${deb_dir}/sbuild-build-depends-main-dummy_*.deb" \





  reply	other threads:[~2022-10-25  9:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24 13:10 Uladzimir Bely
2022-10-24 14:14 ` Jan Kiszka
2022-10-25  9:00   ` Uladzimir Bely [this message]
2022-10-25 13:37     ` Jan Kiszka
2022-10-26  7:06       ` Uladzimir Bely
2022-10-26  7:17         ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6810893.9J7NaK4W3v@hp \
    --to=ubely@ilbers.de \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox