]> git.donarmstrong.com Git - debhelper.git/commitdiff
-a == -s
authorJoey Hess <joey@gnu.kitenet.net>
Tue, 1 Sep 2009 17:40:52 +0000 (13:40 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Tue, 1 Sep 2009 17:45:53 +0000 (13:45 -0400)
The -a flag now does the same thing as the -s flag, so debhelper users do
not need to worry about using the -s flag when building a package that only
builds for some architectures, and dh will also work in that situation.
Closes: #540794
Debian/Debhelper/Dh_Getopt.pm
Debian/Debhelper/Dh_Lib.pm
debhelper.pod
debian/changelog
doc/PROGRAMMING
doc/TODO

index 6e5cacdd9c0bf941779fe65e1e314df810a018e3..edb3be764edf114493efd5f15a213fdcc0b73838 100644 (file)
@@ -28,17 +28,14 @@ sub AddPackage { my($option,$value)=@_;
                push @{$dh{DOPACKAGES}}, getpackages('indep');
                $dh{DOINDEP}=1;
        }
-       elsif ($option eq 'a' or $option eq 'arch') {
+       elsif ($option eq 'a' or $option eq 'arch' or
+              $option eq 's' or $option eq 'same-arch') {
                push @{$dh{DOPACKAGES}}, getpackages('arch');
                $dh{DOARCH}=1;
        }
        elsif ($option eq 'p' or $option eq 'package') {
                push @{$dh{DOPACKAGES}}, $value;
        }
-       elsif ($option eq 's' or $option eq 'same-arch') {
-               push @{$dh{DOPACKAGES}}, getpackages('same');
-               $dh{DOSAME}=1;
-       }
        else {
                error("bad option $option - should never happen!\n");
        }
@@ -186,7 +183,6 @@ sub parseopts {
                delete $dh{DOPACKAGES};
                delete $dh{DOINDEP};
                delete $dh{DOARCH};
-               delete $dh{DOSAME};
        }
        
        # DH_OPTIONS can contain additional options
@@ -216,7 +212,7 @@ sub parseopts {
        # want us to act on them all. Note we have to do this before excluding
        # packages out, below.
        if (! defined $dh{DOPACKAGES} || ! @{$dh{DOPACKAGES}}) {
-               if ($dh{DOINDEP} || $dh{DOARCH} || $dh{DOSAME}) {
+               if ($dh{DOINDEP} || $dh{DOARCH}) {
                        # User specified that all arch (in)dep package be
                        # built, and there are none of that type.
                        warning("You asked that all arch in(dep) packages be built, but there are none of that type.");
index 4ccd12ae31dd321261edfe33a64023628e33d975..5a0b794759add819a02738d371524480d8499d13 100644 (file)
@@ -667,9 +667,8 @@ sub sourcepackage {
 }
 
 # Returns a list of packages in the control file.
-# Must pass "arch" or "indep" or "same" to specify arch-dependant or
-# -independant or same arch packages. If nothing is specified, returns all
-# packages.
+# Pass "arch" or "indep" to specify arch-dependant or
+# independant. If nothing is specified, returns all packages.
 # As a side effect, populates %package_arches and %package_types with the
 # types of all packages (not only those returned).
 my (%package_types, %package_arches);
@@ -717,8 +716,7 @@ sub getpackages {
 
                        if ($package &&
                            (($type eq 'indep' && $arch eq 'all') ||
-                            ($type eq 'arch' && $arch ne 'all') ||
-                            ($type eq 'same' && ($arch eq 'any' ||
+                            ($type eq 'arch' && ($arch eq 'any' ||
                                             ($arch ne 'all' &&
                                              samearch(buildarch(), $arch)))) ||
                             ! $type)) {
index cea528367e6c673bab743080fd4002567f540a92..a903620ce94311adb4528d375a41cba0490928b3 100644 (file)
@@ -93,7 +93,8 @@ will output what it would have done.
 
 =item B<-a>, B<--arch>
 
-Act on all architecture dependent packages.
+Act on architecture dependent packages that should be built for the
+build architecture.
 
 =item B<-i>, B<--indep>
 
@@ -106,13 +107,8 @@ times to make debhelper operate on a given set of packages.
 
 =item B<-s>, B<--same-arch>
 
-This is a smarter version of the -a flag, that is used in some rare
-circumstances. It understands that if the control file lists "Architecture: i386"
-for the package, the package should not be acted on on other architectures. So
-this flag makes the command act on all "Architecture: any" packages, as well
-as on any packages that have the current architecture explicitly specified.
-Contrast to the -a flag, which makes the command work on all packages that
-are not architecture independent.
+This used to be a smarter version of the -a flag, but the -a flag is now
+equally smart.
 
 =item B<-N>I<package>, B<--no-package=>I<package>
 
index c0fdd8bdcfdc0376ff6e2d8c870f83986f488bb4..e45de8dd8c8e91a135ddd2fc9d470511f6ad0c03 100644 (file)
@@ -1,9 +1,14 @@
-debhelper (7.3.17) UNRELEASED; urgency=low
+debhelper (7.3.17) unstable; urgency=low
 
-  * Optimise -s handling to avoid running dpkg-architecture if the package
-    is arch all.
+  * Optimise -s handling to avoid running dpkg-architecture if a package
+    is arch all. This was, suprisingly, the only overhead of using the -s
+    flag with arch all/any packages.
+  * The -a flag now does the same thing as the -s flag, so debhelper users
+    do not need to worry about using the -s flag when building a package
+    that only builds for some architectures, and dh will also work in that
+    situation. Closes: #540794
 
- -- Joey Hess <joeyh@debian.org>  Tue, 01 Sep 2009 13:19:55 -0400
+ -- Joey Hess <joeyh@debian.org>  Tue, 01 Sep 2009 13:41:16 -0400
 
 debhelper (7.3.16) unstable; urgency=low
 
index 5f236ebdc4983f090803165ae8c38cc0ee6e4e0b..0fca4722019a3efb6c9285ab5686b0f02c2b02e4 100644 (file)
@@ -232,8 +232,8 @@ udeb_filename($package)
        Returns the filename of the udeb package.
 getpackages($type)
        Returns a list of packages in the control file.
-       Must pass "arch" or "indep" or "same" to specify arch-dependent or
-       -independent or same arch packages. If nothing is specified, returns all
+       Pass "arch" or "indep" to specify arch-dependent or
+       -independent. If nothing is specified, returns all
        packages.
        As a side effect, populates %package_arches and %package_types with
        the types of all packages (not only those returned).
index 3092736bbf0208531c4d8b1f613c2bda31aa5d9b..ec3799683f4799dd5d896c970990e19042083bb3 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -31,3 +31,4 @@ Deprecated:
   Need to wait a while (from Oct 2008) to ensure that most rules files
   that pass unknown options to commands are fixed.
 * dh_desktop, dh_scrollkeeper. Remove eventually..
+* -s flag, not formally deprecated yet; remove eventually