Michael Banck <[EMAIL PROTECTED]> writes: > On Wed, Dec 19, 2007 at 08:10:37AM +0100, Jan-Marek Glogowski wrote: >> > Isn't it usual sbuild behaviour to only try the first package of a set >> > of alternatives? >> >> Currently yes, but I consider this a bug. The patched code already runs >> in a loop to check for all alternatives, but it currently fails, if it >> can't satisfy a versioned dependency. > > Maybe this is a divergence of the sbuild package from upstream sbuild > then. Fact is that the buildds will show this behaviour, so I am not > sure changing it in the sbuild package is the best solution.
I tend to agree here, given that one of (if not the main) primary uses of sbuild is to check that sources will autobuild correctly on the main buildds, using the other sbuild. This is one place where we definitely need to be compatible. However, I wouldn't be opposed to adding a command-line and/or configuration option which would allow the user to alter this, so long as it is not the default behaviour. Adding a variable to Sbuild/Conf.pm is pretty easy, as is a new command-line option. If you would like to make a patch for that, that would be super. I have committed all of the other changes, as the diff below. If you do a "git pull" or a fresh "git clone", you should get this. diff --git a/debian/changelog b/debian/changelog index 772d8fc..d5faed1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,10 @@ sbuild (0.57) unstable; urgency=low * Sbuild/Chroot.pm: set APT::Install-Recommends to false inside the chroot (Closes: #449253). + * sbuild: + - Add additional syntax checks. Thanks to Jan-Marek Glogowski. + - filter_dependencies: Remove redundant conditional. Thanks to + Jan-Marek Glogowski. -- Roger Leigh <[EMAIL PROTECTED]> Sun, 02 Dec 2007 15:03:04 +0000 diff --git a/sbuild b/sbuild index 9b6ca10..5464144 100755 --- a/sbuild +++ b/sbuild @@ -204,12 +204,19 @@ foreach $dscfile (@ARGV) { my $pkgv = basename($dscfile); $pkgv =~ s/\.dsc$//; my ($pkg, $version) = split /_/, $pkgv; + my $invalid = 0; # Download if package does not have a .dsc extension and no # directory was specified. my $download = 1; if ($dscbase =~ m/\.dsc$/) { $download = 0; + if( ! -f $dscfile ) { + $invalid = 1; + } + } + elsif( ! defined $version ) { + $invalid = 1; } print STDERR "D: dscfile = $dscfile\n" if $conf::debug; @@ -220,7 +227,7 @@ foreach $dscfile (@ARGV) { print STDERR "D: version = $version\n" if $conf::debug; print STDERR "D: download = $download\n" if $conf::debug; - if ($download && $dscfile ne $pkgv) { + if ($invalid || ($download && $dscfile ne $pkgv)) { print PLOG "Invalid source: $dscfile\n"; print PLOG "Skipping $pkg\n"; $main::pkg_status = "skipped"; @@ -1316,7 +1323,7 @@ sub filter_dependencies { } } if(!$installable) { - print PLOG "no suitable version found. Skipping for now, maybe there are alternatives.\n" if !$installable; + print PLOG "no suitable version found. Skipping for now, maybe there are alternatives.\n"; } } else { print PLOG "Using default version " . $policy{$name}->{defversion} . "\n"; Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
pgp1XX0UPWC5h.pgp
Description: PGP signature