]> git.donarmstrong.com Git - debhelper.git/commitdiff
r169: Initial Import
authorjoey <joey>
Tue, 17 Aug 1999 05:09:26 +0000 (05:09 +0000)
committerjoey <joey>
Tue, 17 Aug 1999 05:09:26 +0000 (05:09 +0000)
debian/changelog
dh_clean
dh_clean.1
dh_compress
doc/TODO

index 28f555f2fbd176c43f9b3c4c26e4a35d59b34963..9e0179ca4fe587b0621e1f8a69982f7001259dd6 100644 (file)
@@ -1,3 +1,12 @@
+debhelper (1.2.33) unstable; urgency=low
+
+  * dh_compress: verbose_print() cd's.
+  * dh_compress: clear the hash of hard links when we loop - was making
+    dh_compress fail on multi-binary packages that had harlinks. Thanks to
+    Craig Small for spotting this.
+
+ -- Joey Hess <joeyh@master.debian.org>  Thu,  4 Feb 1999 20:19:37 -0800
+
 debhelper (1.2.32) unstable; urgency=low
 
   * dh_suidmanager: if it cannot determine the user name or group name from
index 73f8af2e971f59a3c0d0249ae78f922a53d0f757..c883a626f44f40abd0b1193445622f6ce8e3f34f 100755 (executable)
--- a/dh_clean
+++ b/dh_clean
@@ -11,28 +11,33 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        $TMP=tmpdir($PACKAGE);
        $EXT=pkgext($PACKAGE);
 
-       doit("rm","-f","debian/$EXT\substvars",
-               "debian/$EXT\postinst.debhelper",
-               "debian/$EXT\postrm.debhelper",
-               "debian/$EXT\preinst.debhelper",
-               "debian/$EXT\prerm.debhelper");
+       if (! $dh{D_FLAG}) {
+               doit("rm","-f","debian/$EXT\substvars",
+                       "debian/$EXT\postinst.debhelper",
+                       "debian/$EXT\postrm.debhelper",
+                       "debian/$EXT\preinst.debhelper",
+                       "debian/$EXT\prerm.debhelper");
+       }
        
        doit ("rm","-rf",$TMP);
 }
 
-if (@ARGV) {
-       doit("rm","-f","--",@ARGV);
-}
+if (! $dh{D_FLAG}) {
+       if (@ARGV) {
+               doit("rm","-f","--",@ARGV);
+       }
 
-if (! $dh{K_FLAG}) {
-       doit("rm","-f","debian/files");
-}
+       if (! $dh{K_FLAG}) {
+               doit("rm","-f","debian/files");
+       }
 
-# Remove other temp files.
-# (The \s+ is important, \s won't work because find would get null parameters).
-# Note that you _don't_ quote wildcards used by find in here.
-doit(split(/\s+/,"find . ( -name #*# -o -name *~ -o -name DEADJOE
-       -o -name *.orig -o -name *.rej -o -name *.bak
-       -o -name .*.orig -o -name .*.rej -o -name .SUMS
-       -o -name TAGS -o -name core -o ( -path */.deps/* -a -name *.P )
-       ) -exec rm -f {} ;"));
+       # Remove other temp files.
+       # (The \s+ is important, \s won't work because find would get null
+       # parameters). Note that you _don't_ quote wildcards used by find
+       # in here.
+       doit(split(/\s+/,"find . ( -name #*# -o -name *~ -o -name DEADJOE
+               -o -name *.orig -o -name *.rej -o -name *.bak
+               -o -name .*.orig -o -name .*.rej -o -name .SUMS
+               -o -name TAGS -o -name core -o ( -path */.deps/* -a -name *.P )
+               ) -exec rm -f {} ;"));
+}
index 35f59158d34ab81d2e629412dd63fd6bb6ca4475..c2e71bf3ce1eec96fa979841a5cae12eefe5d9ba 100644 (file)
@@ -3,7 +3,7 @@
 dh_clean \- clean up package build directories
 .SH SYNOPSIS
 .B dh_clean
-.I "[debhelper options] [-k] [file ...]"
+.I "[debhelper options] [-k] [-d] [file ...]"
 .SH "DESCRIPTION"
 dh_clean is a debhelper program that is responsible for cleaning up after a
 package is built. It removes the package build directories, and removes some
@@ -25,6 +25,10 @@ didn't use -k in these cases, then debian/files would be deleted in the
 middle, and your changes file will only contain the last binary package that
 was built.
 .TP
+.B \-d, \--dirs-only
+Only clean the package build directories, do not clean up any other files at
+all.
+.TP
 .B file ...
 Delete these files too.
 .SH ENVIRONMENT
index ffca30af73828644e84e3f33fb4eb5c194935d76..673f9102eeac722e071b0bf05bae64bfc83741c0 100755 (executable)
@@ -15,6 +15,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        # Run the file name gathering commands from within the directory
        # structure that will be effected.
        $olddir=getcwd();
+       verbose_print("cd $TMP");
        chdir($TMP) || error("Can't cd to $TMP: $!");
 
        # Figure out what files to compress.
@@ -58,6 +59,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        # we can preserve the hard link across the compression and save
        # space in the end.
        my @f=();
+       my %hardlinks={};
        foreach (@files) {
                ($dev, $inode, undef, $nlink)=stat($_);
                if ($nlink > 1) {
@@ -88,6 +90,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                doit("ln","$hardlinks{$_}.gz","$_.gz");
        }
 
+       verbose_print("cd $olddir");
        chdir($olddir);
 
        # Fix up symlinks that were pointing to the uncompressed files.
index 282c24ed399c586c541441bdc40f1e61fa42bf94..27b5055a55de95827b95cb2732503013fa1230d9 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -9,6 +9,7 @@ Bugs:
 
 Wishlist items:
 
+* Make dh_* "use strict".
 * Make dh_movefiles remove emptied directories after it's moved all the
   files out of them (#17111).
 * info support for debhelper (currently implemented, but I hate how I did it,
@@ -31,14 +32,12 @@ Wishlist items:
   that contain shared libraries. maybe dh_makeshlibs? But it wasn't designed
   to do that originally, and even worse, it is often run after
   dh_installdeb, so the fragments wouldn't go into the postinst. So maybe a
-  new script is called for.
+  new script is called for. But it's probably be best to just have a switch
+  to enable this.
 * Need a way to make dh_strip not strip any static libs. Also, it'd be nice
   if there were options to dh_strip, dh_compress, etc, to allow inclusion of
   directories and exclusion of files based on filename globbing. (Request from
   Matthias Klose <doko@cs.tu-berlin.de>)
-* docbase support (#25233). Waiting for docbase to stabilize and be used
-  widely.
-* dhelp support. Currently pending on dhelp use becoming widespead (#18342)
 * Support use of environment variables in data taken from user, ie, in
   debian/dirs. The problem with doing this is that we really want to allow
   any filenames in that input, even those that look like environment