The following commit has been merged in the master branch:
commit 1629f8f1113cd6547e02028e5fed3dafbf89b088
Author: Bernhard R. Link <[email protected]>
Date:   Tue Jul 17 04:08:52 2012 +0200

    dpkg-scansources: Move exit call out from usage()
    
    This also makes sure the program returns a correct exit code from
    usageerr().
    
    [[email protected]:
     - Remove exit call from usage(). ]
    
    Signed-off-by: Guillem Jover <[email protected]>

diff --git a/debian/changelog b/debian/changelog
index ff03170..0a25d12 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -100,6 +100,8 @@ dpkg (1.17.0) UNRELEASED; urgency=low
     finds unknown packages while setting the selections. Closes: #703092
   * Print nicer error messages in perl scripts using Getopt::Long by trapping
     $SIG{__WARN__} to call usageerr() on option parse errors.
+  * Move the exit call out from usage() in dpkg-scansources so that usageerr()
+    gives a correct exit code. Thanks to Bernhard R. Link <[email protected]>.
 
   [ Updated programs translations ]
   * Fix typo in Spanish translation of update-alternatives.
diff --git a/scripts/dpkg-scansources.pl b/scripts/dpkg-scansources.pl
index 6cc6667..5429955 100755
--- a/scripts/dpkg-scansources.pl
+++ b/scripts/dpkg-scansources.pl
@@ -63,7 +63,7 @@ my $extra_override_file = undef;
 
 my @option_spec = (
     'debug!'           => \$debug,
-    'help|?'           => \&usage,
+    'help|?'           => sub { usage(); exit 0; },
     'no-sort|n'                => \$no_sort,
     'source-override|s=s' => \$src_override,
     'extra-override|e=s' => \$extra_override_file,
@@ -96,8 +96,6 @@ Options:
 
 See the man page for the full documentation.
 "), $Dpkg::PROGNAME;
-
-    exit;
 }
 
 sub close_msg {

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to