[buildd-tools-devel] Bug#792037: Doesn't upgrade to the newest versions of packages in extra repositories

Johannes Schauer josch at debian.org
Thu Dec 24 09:33:15 UTC 2015


Control: tag -1 - patch

Hi,

On Fri, 10 Jul 2015 15:52:48 +0100 Iain Lane <iain at orangesquash.org.uk> wrote:
> I noticed that packages in a repository given via --extra-repository
> that are preinstalled into the base chroot aren't upgraded to. For
> example I was trying to test building with GCC5 from a PPA of doko's and
> yet it wasn't being used during the build. It seems like these repos are
> added quite late on, just before installing the actual build-deps and
> *after* the initial upgrade/dist-upgrade. This means that build-deps are
> satisfied from this repo but things already in the chroot are left as
> they were.
> 
> Attached is a patch to simply dist-upgrade after doing the later update.
> Do you think this makes sense? Note that (AFAICT) sbuild has carefully
> only updated its indices for the extra repository and its internal one,
> so this should avoid accidentally dist-upgrading from the main archive
> again if we get a race condition with a mirror pulse or similar. Note
> that I only tested the apt resolver and just assume the aptitude one is
> the same, sorry...

this behaviour is something that I think can be expected of sbuild. It just
didn't show yet because the effect is only visible if the --extra-repository
contains packages that are part of the base system, like gcc in your case.
Thus, not many are affected by this bug.

I had a look at your patch but would like to solve it differently. The problem
with calling dist upgrade multiple times is that in bugs #805064 and #803505 we
introduced the chroot-update-failed-commands external command hook which is
called if any of the operations in run_chroot_update() fail. If you just run
$self->distupgrade() outside of run_chroot_update() and the update fails, the
hooks will not be executed.

So instead what should happen is that the extra repositories are added to the
local apt configuration much earlier, maybe in $resolver->setup() so that when
later calling run_chroot_update(), the extra repositories are taken into
account.

I'd appreciate a patch for this :)

Until then, as a workaround, you could force that packages from your external
repository are used instead of the already installed build-essential packages
by using the --add-depends option with a version requirement that enforces the
packages from your external repository via a greater-than relation.

Thanks!

cheers, josch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20151224/0016ee95/attachment.sig>


More information about the Buildd-tools-devel mailing list