Browse Source

dpkg-scansources: Move exit call out from usage()

This also makes sure the program returns a correct exit code from
usageerr().

[guillem@debian.org:
 - Remove exit call from usage(). ]

Signed-off-by: Guillem Jover <guillem@debian.org>
Bernhard R. Link 14 years ago
parent
commit
1629f8f111
2 changed files with 3 additions and 3 deletions
  1. 2 0
      debian/changelog
  2. 1 3
      scripts/dpkg-scansources.pl

+ 2 - 0
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 <brlink@debian.org>.
 
   [ Updated programs translations ]
   * Fix typo in Spanish translation of update-alternatives.

+ 1 - 3
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 {