Package: sbuild
Version: 0.57.5-1
Severity: normal
Tags: patch
User: [EMAIL PROTECTED]
Usertags: origin-ubuntu intrepid ubuntu-patch

Hello,

When handling version-checks for package installation, sbuild skips
any packages that are listed in Provides, even if the Build-Dep is
versioned.

For example, when building (on Ubuntu) libmail-box-perl will fail
due to mismatched versions (perl-modules Provides "libtest-harness-perl",
but libmail-box-perl requires version >= 3).  To handle this case,
the follow patch makes an attempt at package installation when it finds
a "PROVIDED" package.

Thanks,

-Kees

-- 
Kees Cook                                            @outflux.net
diff -pruN 0.57.5-1.orig/lib/Sbuild.pm 0.57.5-1/lib/Sbuild.pm
--- 0.57.5-1.orig/lib/Sbuild.pm	2008-08-02 21:57:59.000000000 +0100
+++ 0.57.5-1/lib/Sbuild.pm	2008-08-07 10:01:22.000000000 +0100
@@ -85,7 +85,12 @@ sub version_compare ($$$) {
 	my $v1 = shift;
 	my $rel = shift;
 	my $v2 = shift;
-
+   # If we're trying to compare versions against a provided package,
+   # always return "not satisfied", forcing an install attempt.
+	if ($v1 eq "=*=PROVIDED=*=") {
+		return 0;
+	}
+
 	if ($Sbuild::opt_correct_version_cmp) {
 		system "dpkg", "--compare-versions", $v1, $rel, $v2;
 		return $? == 0;

Reply via email to