]> git.donarmstrong.com Git - debhelper.git/blobdiff - Debian/Debhelper/Dh_Getopt.pm
r472: * Fixed issues with extended parameters to dh_gencontrol including spaces
[debhelper.git] / Debian / Debhelper / Dh_Getopt.pm
index 1e52109e119b064ab938eeada9747972ab953d63..191227da2e2f4d9a752a515039d837993fbd687e 100644 (file)
@@ -123,8 +123,9 @@ sub parseopts {
                "sourcedir=s" => \$options{SOURCEDIR},
                
                "destdir=s" => \$options{DESTDIR},
+
+               "filename=s" => \$options{FILENAME},
                
-               "number=i" => \$options{PRIORITY},      # deprecated
                "priority=i" => \$options{PRIORITY},
                
                "flavor=s" => \$options{FLAVOR},
@@ -147,9 +148,9 @@ sub parseopts {
        # packages out, below.
        if (! defined $options{DOPACKAGES} || ! @{$options{DOPACKAGES}}) {
                if ($options{DOINDEP} || $options{DOARCH} || $options{DOSAME}) {
-                               # User specified that all arch (in)dep package be
-                               # built, and there are none of that type.
-                               error("I have no package to build");
+                       # User specified that all arch (in)dep package be
+                       # built, and there are none of that type.
+                       error("I have no package to build");
                }
                push @{$options{DOPACKAGES}},GetPackages();
        }
@@ -176,10 +177,17 @@ sub parseopts {
                error("I have no package to build");
        }
 
+       if (defined $options{U_PARAMS}) {
+               # Split the U_PARAMS up into an array.
+               my $u=$options{U_PARAMS};
+               undef $options{U_PARAMS};
+                push @{$options{U_PARAMS}}, split(/\s+/,$u);
+        }
+
        # Anything left in @ARGV is options that appeared after a --
-       # These options are added to U_PARAMS, while the non-option
-       # values we collected replace them in @ARGV;
-       $options{U_PARAMS}.=join(' ', @ARGV);
+       # These options are added to the U_PARAMS array, while the
+       # non-option values we collected replace them in @ARGV;
+       push @{$options{U_PARAMS}}, @ARGV;
        @ARGV=@{$options{ARGV}} if exists $options{ARGV};
 
        return %options;