[buildd-tools-devel] Bug#559655: the upgrade misses an explicit version
Ferenc Wagner
wferi at niif.hu
Tue Jan 5 21:22:47 UTC 2010
tags 559655 patch
thanks
Hi,
I hit this issue when trying to build agains backport.org packages.
Please consider this log fragment:
┌──────────────────────────────────────────────────────────────────────────────┐
│ Install build dependencies │
└──────────────────────────────────────────────────────────────────────────────┘
Checking for already installed source dependencies...
debhelper: missing
Default version of debhelper not sufficient, using version 7.2.6~bpo50+1
flex: missing
bison: missing
perl: already installed (5.10.0-19lenny2)
autotools-dev: missing
linux-libc-dev: non-matching version installed (2.6.26-19lenny2 ! >= 2.6.27)
Default version of linux-libc-dev not sufficient, using version 2.6.30-8~bpo50+2
Package installation not possible
This is bogus, each of the above dependencies are installable by apt-get
if I enter the same chroot. The explicit offender can be found in
Sbuild/Build.pm:
foreach my $cvers (@{$policy->{$name}->{versions}}) {
if(version_compare($cvers, $rel, $vers)) {
$self->log("using version $cvers\n");
$upgradeable = $name if ! $upgradeable;
last;
}
}
$self->log("no suitable alternative found. I probably should dep-wait this one.\n") if !$upgradeable;
return 0;
I think there are several problems with this code, but the killer is
that the return 0 is not conditional on !$upgradeable. That alone
wouldn't fix the issue, though, because
1. instead of returning it should check the next Alternative, and
2. $upgradeable should contain the exact version found, just like
$installable does a little bit earlier (which means #272955 could
probably be closed).
I took the liberty to go though the filter_dependencies subroutine, and
make some other changes as well, in part to avoid looping in vain and
also to make the code a little more readable and explicit. Please find
the patch attached, I wonder how you feel about it. Beware, I didn't
test it too extensively. (Actually, I'd prefer shoving the "not
installed" logic into an else branch and treat it on equal footing with
the "installed" logic, but that would've introduced too much distracting
whitespace changes.)
--
Regards,
Feri.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sbuild.patch
Type: text/x-diff
Size: 2798 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20100105/95569985/attachment-0001.patch>
More information about the Buildd-tools-devel
mailing list