]> git.donarmstrong.com Git - debhelper.git/commitdiff
dh: Allow --list-addons to be used when not in a source package. Closes: #574351
authorJoey Hess <joey@gnu.kitenet.net>
Wed, 31 Mar 2010 20:09:47 +0000 (16:09 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Wed, 31 Mar 2010 20:09:47 +0000 (16:09 -0400)
debian/changelog
dh

index 358282e47fe835eb6ecfedee59ec4255fc47dfdb..62504507b8cb3b53c4f0c6d94e0ea0a083f72c70 100644 (file)
@@ -15,6 +15,8 @@ debhelper (7.4.16) UNRELEASED; urgency=low
     packages that can be built for the current architecture. This change
     is mostly useful when using minimal rules files with dh. Closes: #572077
   * dh_md5sums: Sort to ensure stable, more diffable order. Closes: #573702
+  * dh: Allow --list-addons to be used when not in a source package.
+    Closes: #574351
 
  -- Joey Hess <joeyh@debian.org>  Thu, 18 Feb 2010 17:53:27 -0500
 
diff --git a/dh b/dh
index bcac8da8fafee7ad968f5ab8dc4bd3ea97086fdc..4f2b9876d09a956e7496524cf850107897b59f9f 100755 (executable)
--- a/dh
+++ b/dh
@@ -247,8 +247,8 @@ init(options => {
                        my ($option,$value)=@_;
                        @{$dh{WITH}} = grep { $_ ne $value } @{$dh{WITH}};
                },
-               "l" => \$dh{LIST},
-               "list" => \$dh{LIST},
+               "l" => \&list_addons,
+               "list" => \&list_addons,
        },
        # Disable complaints about unknown options; they are passed on the
        # debhelper commands.
@@ -397,7 +397,7 @@ sub remove_command_options {
        }
 }
 
-if ($dh{LIST}) {
+sub list_addons {
        my %addons;
 
        for my $inc (@INC) {