The following commit has been merged in the master branch:
commit e83599bd2b1118a59677ec7e3a23a0b448049d6c
Author: Guillem Jover <[email protected]>
Date: Mon Feb 11 15:47:57 2013 +0100
Dpkg::Source::Package: Do not return an error message if we can build
diff --git a/scripts/Dpkg/Source/Package/V1.pm
b/scripts/Dpkg/Source/Package/V1.pm
index 3cee376..0fc3651 100644
--- a/scripts/Dpkg/Source/Package/V1.pm
+++ b/scripts/Dpkg/Source/Package/V1.pm
@@ -163,10 +163,12 @@ sub do_extract {
sub can_build {
my ($self, $dir) = @_;
+
# As long as we can use gzip, we can do it as we have
# native packages as fallback
- return ($self->{options}{compression} eq 'gzip',
- _g('only supports gzip compression'));
+ return (0, _g('only supports gzip compression'))
+ unless $self->{options}{compression} eq 'gzip';
+ return 1;
}
sub do_build {
diff --git a/scripts/Dpkg/Source/Package/V3/Bzr.pm
b/scripts/Dpkg/Source/Package/V3/Bzr.pm
index 6552ef2..f2bd870 100644
--- a/scripts/Dpkg/Source/Package/V3/Bzr.pm
+++ b/scripts/Dpkg/Source/Package/V3/Bzr.pm
@@ -81,7 +81,9 @@ sub sanity_check {
sub can_build {
my ($self, $dir) = @_;
- return (-d "$dir/.bzr", _g("doesn't contain a bzr repository"));
+
+ return (0, _g("doesn't contain a bzr repository")) unless -d "$dir/.bzr";
+ return 1;
}
sub do_build {
diff --git a/scripts/Dpkg/Source/Package/V3/Custom.pm
b/scripts/Dpkg/Source/Package/V3/Custom.pm
index 6828acc..6565d61 100644
--- a/scripts/Dpkg/Source/Package/V3/Custom.pm
+++ b/scripts/Dpkg/Source/Package/V3/Custom.pm
@@ -42,8 +42,10 @@ sub do_extract {
sub can_build {
my ($self, $dir) = @_;
- return (scalar(@{$self->{options}{ARGV}}),
- _g('no files indicated on command line'));
+
+ return (0, _g('no files indicated on command line'))
+ unless scalar(@{$self->{options}{ARGV}});
+ return 1;
}
sub do_build {
diff --git a/scripts/Dpkg/Source/Package/V3/Git.pm
b/scripts/Dpkg/Source/Package/V3/Git.pm
index 2e11d69..d63ef5f 100644
--- a/scripts/Dpkg/Source/Package/V3/Git.pm
+++ b/scripts/Dpkg/Source/Package/V3/Git.pm
@@ -87,7 +87,9 @@ sub parse_cmdline_option {
sub can_build {
my ($self, $dir) = @_;
- return (-d "$dir/.git", _g("doesn't contain a git repository"));
+
+ return (0, _g("doesn't contain a git repository")) unless -d "$dir/.git";
+ return 1;
}
sub do_build {
diff --git a/scripts/Dpkg/Source/Package/V3/Quilt.pm
b/scripts/Dpkg/Source/Package/V3/Quilt.pm
index 8a9b190..5041201 100644
--- a/scripts/Dpkg/Source/Package/V3/Quilt.pm
+++ b/scripts/Dpkg/Source/Package/V3/Quilt.pm
@@ -80,7 +80,7 @@ sub can_build {
my $quilt = $self->build_quilt_object($dir);
$msg = $quilt->find_problems();
return (0, $msg) if $msg;
- return (1, '');
+ return 1;
}
sub get_autopatch_name {
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]