]> git.donarmstrong.com Git - debhelper.git/commitdiff
r532: * Added --mainpackage= option, of use in some kernel modules packages.
authorjoey <joey>
Thu, 20 Jun 2002 01:31:47 +0000 (01:31 +0000)
committerjoey <joey>
Thu, 20 Jun 2002 01:31:47 +0000 (01:31 +0000)
   * dh_gencontrol only needs to pass -p to dpkg-gencontrol if there is more
     than one package in debian/control. This makes it a bit more flexible in
     some cases.

Debian/Debhelper/Dh_Getopt.pm
Debian/Debhelper/Dh_Lib.pm
debhelper.pod
debian/changelog
dh_gencontrol

index 16851a04902999cd2cb929e184e07080ba77f783..37d6f4755009a99746a80432460e357c130f2166 100644 (file)
@@ -141,6 +141,8 @@ sub parseopts {
                "autodest" => \$options{AUTODEST},
 
                "h|help" => \&showhelp,
+
+               "mainpackage=s" => \$options{MAINPACKAGE},
                
                "<>" => \&NonOption,
        );
index d1c67b53e65f1603d9e3575ef512ba3919c97605..f22e8171da97e99b5b749d05835a491b2f9a1d4a 100644 (file)
@@ -72,10 +72,13 @@ sub init {
                $dh{NO_ACT}=1;
        }
 
-       # Get the name of the main binary package (first one listed in
-       # debian/control).
        my @allpackages=GetPackages();
-       $dh{MAINPACKAGE}=$allpackages[0];
+       # Get the name of the main binary package (first one listed in
+       # debian/control). Only if the main package was not set on the
+       # command line.
+       if (! exists $dh{MAINPACKAGE} || ! defined $dh{MAINPACKAGE}) {
+               $dh{MAINPACKAGE}=$allpackages[0];
+       }
 
        # Check if packages to build have been specified, if not, fall back to
        # the default, doing them all.
index 7cf755c049afb9a8769fa8ada9f6d7183e872fa0..dae701c93174acf07bff260740757b25f82c4b11 100644 (file)
@@ -113,6 +113,13 @@ the package as one that should be acted on.
 
 Use "tmpdir" for package build directory. The default is debian/<package>
 
+=item B<--mainpackage=>I<package>
+
+This little-used option changes the package which debhelper considers the
+"main package", that is, the first one listed in debian/control, and the
+one for which debian/foo files can be used instead of the usual
+debian/package.foo files.
+
 =back
 
 =head1 COMMON DEBHELPER OPTIONS
index 5e33593999c3775b1bac87857e5f7b03d1a31cfb..b26894cccbad38c4645b8154cd02da87d55d3524 100644 (file)
@@ -1,3 +1,12 @@
+debhelper (4.0.13) unstable; urgency=low
+
+  * Added --mainpackage= option, of use in some kernel modules packages.
+  * dh_gencontrol only needs to pass -p to dpkg-gencontrol if there is more
+    than one package in debian/control. This makes it a bit more flexible in
+    some cases.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 19 Jun 2002 19:44:12 -0400
+
 debhelper (4.0.12) unstable; urgency=low
 
   * Fixed debconf-utils dependency.
index fcb91845a6957e8caf64c6ad6c651db7346e0349..941c9a8c71cbfaa9bee59cd894faa3e8ac3d1474 100755 (executable)
@@ -53,8 +53,12 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        }
 
        # Generate and install control file.
-       doit("dpkg-gencontrol","-l$changelog","-isp","-p$package",
-                    "-Tdebian/${ext}substvars", "-P$tmp",@{$dh{U_PARAMS}});
+       my @command="dpkg-gencontrol";
+       if (GetPackages() > 1) {
+               push @command, "-p$package";
+       }
+       doit(@command, "-l$changelog", "-isp", "-Tdebian/${ext}substvars", 
+               "-P$tmp",@{$dh{U_PARAMS}});
 
        # This chmod is only necessary if the user sets the umask to
        # something odd.