From: joey Date: Tue, 17 Aug 1999 05:09:26 +0000 (+0000) Subject: r169: Initial Import X-Git-Tag: debian_version_0_1~72 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=36411bfcb72fc17c6aa0f3b11cdd04e52828db98;p=debhelper.git r169: Initial Import --- diff --git a/debian/changelog b/debian/changelog index 28f555f..9e0179c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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 diff --git a/dh_clean b/dh_clean index 73f8af2..c883a62 100755 --- 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 {} ;")); +} diff --git a/dh_clean.1 b/dh_clean.1 index 35f5915..c2e71bf 100644 --- a/dh_clean.1 +++ b/dh_clean.1 @@ -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 diff --git a/dh_compress b/dh_compress index ffca30a..673f910 100755 --- a/dh_compress +++ b/dh_compress @@ -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. diff --git a/doc/TODO b/doc/TODO index 282c24e..27b5055 100644 --- 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 ) -* 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