tags 586275 + patch
thanks
I prepared a patch for this bug which seems to work at least for my
problem:
1. Grab libdatetime-perl_2:0.5900-1 from the archive.
2. Change
libmodule-build-perl (>= 0.360100)
to
libmodule-build-perl (>= 0.360100) | perl (>= 5.12)
in the Build-Depends field in debian/control.
3. Try to build the package with sbuild's internal resolver.
Expected behavior:
sbuild will be able to build the package and resolve dependencies in the
same way.
Observed behavior:
Building the package will abort with the following error message:
perl: already installed (5.10.1-13)
debhelper: missing
Using default version 7.9.3
libmodule-build-perl: non-matching version installed (~*=PROVIDED=*= ! >=
0.360100)
Using default version 0.360700-1
perl: non-matching version installed (5.10.1-13 ! >= 5.12)
Default version of perl not sufficient, Package installation not possible
Source-dependencies not satisfied; skipping libdatetime-perl
After the patch is applied, sbuild is happy to only install the default
version of libmodule-build-perl and ignore the alternative dependency on
perl:
perl: already installed (5.10.1-13)
debhelper: missing
Using default version 7.9.3
libmodule-build-perl: non-matching version installed (~*=PROVIDED=*= ! >=
0.360100)
Using default version 0.360700-1
perl: already installed (5.10.1-13 >= 5.10.1 is satisfied)
libparams-validate-perl: missing
libdatetime-locale-perl: missing
Using default version 1:0.45-1
libdatetime-timezone-perl: missing
Using default version 1:1.19-1+2010j
libtest-exception-perl: missing
libtest-warn-perl: missing
Note that I have not looked at the code in all detail and thus the patch
might break in other cases.
Regards,
Ansgar
>From b9241c2d724d68399eb0d4923e109b1be503068f Mon Sep 17 00:00:00 2001
From: Ansgar Burchardt <[email protected]>
Date: Mon, 5 Jul 2010 17:35:27 +0900
Subject: [PATCH] Do not try other alternatives if installing default version is enough
When we encounter
Build-Depends: pkg-a (>= 2) | pkg-b (>= 3)
and a lower version of pkg-a is already installed (or provided by
another package), sbuild would try to upgrade pkg-b as well.
This patch changes the behaviour of sbuild to not try satisfying
alternative dependencies if the dependency can be satisfied by
installing the default version.
Bug-Debian: http://bugs.debian.org/586275
Signed-off-by: Ansgar Burchardt <[email protected]>
---
lib/Sbuild/InternalBuildDepSatisfier.pm | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/Sbuild/InternalBuildDepSatisfier.pm b/lib/Sbuild/InternalBuildDepSatisfier.pm
index 335a03c..49f8e95 100644
--- a/lib/Sbuild/InternalBuildDepSatisfier.pm
+++ b/lib/Sbuild/InternalBuildDepSatisfier.pm
@@ -281,6 +281,8 @@ sub filter_dependencies {
return 0;
} else {
$builder->log("Using default version " . $policy->{$name}->{defversion} . "\n");
+ $upgradeable = $name if !$upgradeable;
+ last;
}
$upgradeable = $name if !$upgradeable;
}
--
1.7.1