]> git.donarmstrong.com Git - debhelper.git/commitdiff
r124: Initial Import
authorjoey <joey>
Tue, 17 Aug 1999 05:01:21 +0000 (05:01 +0000)
committerjoey <joey>
Tue, 17 Aug 1999 05:01:21 +0000 (05:01 +0000)
Dh_Getopt.pm
Dh_Lib.pm
debhelper.1
debian/changelog
debian/control
dh_lib
dh_strip

index 0f9dafdfbdb8f57831792a7e9ad06c53e8f688d1..e92408930ef01bcbf1f0b7c09fa185689589a360 100644 (file)
@@ -49,7 +49,7 @@ sub AddExclude { my($option,$value)=@_;
 # Parse options and return a hash of the values.
 sub parseopts {
        undef %options;
-
+       
        my $ret=GetOptions(
                "v" => \$options{VERBOSE},
                "verbose" => \$options{VERBOSE},
@@ -109,13 +109,25 @@ sub parseopts {
        if (!$ret) {
                error("unknown option; aborting");
        }
-
+       
        # Check to see if -V was specified. If so, but no parameters were
        # passed, the variable will be defined but empty.
        if (defined($options{V_FLAG})) {
                $options{V_FLAG_SET}=1;
        }
        
+       # If we have not been given any packages to act on, assume they
+       # want us to act on them all. Note we have to do this before excluding
+       # packages out, below.
+       if (! defined $options{DOPACKAGES} || ! @{$options{DOPACKAGES}}) {
+               if ($options{DOINDEP} || $options{DOARCH}) {
+                               # 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();
+       }
+       
        # Remove excluded packages from the list of packages to act on.
        my @package_list;
        my $package;
@@ -125,7 +137,12 @@ sub parseopts {
                }
        }
        @{$options{DOPACKAGES}}=@package_list;
-       
+
+       # If there are no packages to act on now, it's an error.
+       if (! defined $options{DOPACKAGES} || ! @{$options{DOPACKAGES}}) {
+               error("I have no package to build");
+       }
+
        return %options;
 }      
 
index a3965ec1485443e542918e96fa4bbb776aef07f2..be8a3e04b40ca0484f15ac21b2c4ee425a8e66e3 100644 (file)
--- a/Dh_Lib.pm
+++ b/Dh_Lib.pm
@@ -15,6 +15,11 @@ use vars qw(@ISA @EXPORT %dh);
            %dh);
 
 sub init {
+       # If DH_OPTIONS is set, prepend it @ARGV.
+       if (defined($ENV{DH_OPTIONS})) {
+               unshift @ARGV,split(/\s+/,$ENV{DH_OPTIONS});
+       }
+
        # Check to see if an argument on the command line starts with a dash.
        # if so, we need to pass this off to the resource intensive Getopt::Long,
        # which I'd prefer to avoid loading at all if possible.
index e37085aa096dbd61fce04f65dc6d5ae82a5fa7d2..9051d4380111029fc9db2caa153cfb114dae0ece 100644 (file)
@@ -93,6 +93,13 @@ Enables verbose mode.
 .TP
 .I DH_NO_ACT
 Enables no-act mode.
+.TP
+.I DH_OPTIONS
+Anything in this variable will be prepended to the command line
+arguments of all debhelper commands. This in useful in some situations,
+for example, if you need to pass -p to all debhelper commands that will be
+run. If you use DH_OPTIONS, be sure to use "dh_testversion 1.1.17" - older
+debhelpers will ignore it and do things you don't want them to.
 .SH "SEE ALSO"
 .TP
 .BR /usr/doc/debhelper/README
index 1b84f02f9304f169f04518f319fe52c6f41a12c5..a52e4fc517bde14c4027dfce0ca2ca49b38634f8 100644 (file)
@@ -1,3 +1,18 @@
+debhelper (1.1.17) unstable; urgency=low
+
+  * dh_strip: on Richard Braakman's advice, strip the .comment and .note
+    sections of shared libraries.
+  * Added DH_OPTIONS environment variable - anything in it will be treated
+    as additional command line arguments by all debhelper commands. This in
+    useful in some situations, for example, if you need to pass -p to all
+    debhelper commands that will be run. If you use DH_OPTIONS, be sure to
+    use dh_testversion 1.1.17 - older debhelpers will ignore it and do
+    things you don't want them to.
+  * Made -N properly exclude packages when no -i, -a, or -p flags are
+    present. It didn't before, which was a bug.
+
+ -- Joey Hess <joeyh@master.debian.org>  Mon,  7 Sep 1998 17:33:19 -0700
+
 debhelper (1.1.16) unstable; urgency=low
 
   * dh_fixperms: remove execute bits from static libraries as well as 
index 8ba5d99932dac59f36dd159e07a39d76cffee07f..c6e236d378d006948d48d7a1d37938b05516a0cc 100644 (file)
@@ -2,7 +2,7 @@ Source: debhelper
 Section: devel
 Priority: optional
 Maintainer: Joey Hess <joeyh@master.debian.org>
-Standards-Version: 2.4.1.3
+Standards-Version: 2.4.1.4
 
 Package: debhelper
 Architecture: all
diff --git a/dh_lib b/dh_lib
index 41812b8f98b8cd54d384df56602f6ce0f470f7f5..1ff2a5b117dd2b803a6a52f3b4e92a402a2602a3 100644 (file)
--- a/dh_lib
+++ b/dh_lib
@@ -136,6 +136,11 @@ autoscript() {
 
 # Argument processing and global variable initialization is below.
 
+# If DH_OPTIONS is set, prepend it to the command line.
+if [ "$DH_OPTIONS" ]; then
+       set -- $DH_OPTIONS $@
+fi
+
 # Check to see if an argument on the command line starts with a dash.
 # if so, we need to pass this off to the resource intensive perl.
 for arg; do
index 385efeff005096f86a730d8f86a972e9618f4aaa..28e950a8f974fdb835bbabda679d638cf3884326 100755 (executable)
--- a/dh_strip
+++ b/dh_strip
@@ -24,7 +24,9 @@ for PACKAGE in $DH_DOPACKAGES; do
        for file in `(cd $TMP; find -type f \( -perm +111 -or -name "*.so*" \) 2>/dev/null) | filelist_excluded` ; do
                case "`file $TMP/$file`" in
                        *ELF*shared*)
-                               doit "strip --strip-unneeded $TMP/$file"
+                               # Note that all calls to strip on shared libs
+                               # *must* inclde the --strip-unneeded.
+                               doit "strip --remove-section=.comment --remove-section=.note --strip-unneeded $TMP/$file"
                        ;;
                        *ELF*executable*)
                                doit "strip --remove-section=.comment --remove-section=.note $TMP/$file"