summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey>1999-08-17 04:56:36 +0000
committerjoey <joey>1999-08-17 04:56:36 +0000
commitdf34bdaa1381eafc3f6ecea44866849c2a80fe67 (patch)
treede570165080cd4f3678231401381a2141d0acb2a
parente348bcc96f206a25afc2ad1d4f004c74b7f8ab37 (diff)
downloaddebhelper-df34bdaa1381eafc3f6ecea44866849c2a80fe67.tar.gz
r105: Initial Import
-rw-r--r--debian/changelog28
-rwxr-xr-xdh_compress16
-rw-r--r--dh_compress.19
-rwxr-xr-xdh_getopt.pl2
-rwxr-xr-xdh_movefiles21
-rw-r--r--doc/PROGRAMMING6
-rw-r--r--doc/TODO4
7 files changed, 58 insertions, 28 deletions
diff --git a/debian/changelog b/debian/changelog
index 10b81798..38ae7771 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,16 +1,18 @@
-debhelper (1.0.1) unstable; urgency=low
-
- * Backported bug fixes from the 1.1 tree:
- * dh_installdocs: used -m 655 for a TODO file. (minor, dh_fixperms cleans
- up after it)
- * dh_fixperms: had a problem with removing x bits on examples files
- * dh_compress: since version 0.88 or so, dh_compress has bombed out if
- a debian/compress file returned an error code. This was actually
- unintentional - in fact, the debian/compress example in the man page
- will fail this way if usr/info or usr/X11R6 is not present. Corrected
- the program to not fail. (#26214)
-
- -- Joey Hess <joeyh@master.debian.org> Sun, 30 Aug 1998 22:21:26 -0700
+debhelper (1.1.0) unstable; urgency=low
+
+ * New unstable branch of debhelper.
+
+ * TODO: list all current bugs, in order I plan to tackle them.
+ * Added debhelper.1 man page, which groups all the debhelper options that
+ are common to all commands in once place so I can add new options w/o
+ updating 27 man pages.
+ * dh_*.1: updated all debheper man pages to refer to debhelper(1) where
+ appropriate. Also corrected a host of little errors.
+ * doc/README: moved a lot of this file into debhelper.1.
+ * dh_*: -N option now excludes a package from the list of packages the
+ programs act on. (#25247)
+
+ -- Joey Hess <joeyh@master.debian.org> Sat, 8 Aug 1998 17:49:56 -0700
debhelper (1.0) stable unstable; urgency=low
diff --git a/dh_compress b/dh_compress
index 1b58f70a..b94cfcfe 100755
--- a/dh_compress
+++ b/dh_compress
@@ -8,8 +8,16 @@ PATH=debian:$PATH:/usr/lib/debhelper
# Returns a list of all the files that we want to compress,
# (ignoring any files we were asked to exclude on the command
-# line). Assummes we are already in the temp directory.
+# line). Assumes we are already in the temp directory.
filelist () {
+ # First of all, deal with any files specified right on the command line.
+ if [ \( "$PACKAGE" = "$DH_FIRSTPACKAGE" -o "$DH_PARAMS_ALL" \) \
+ -a "$*" ]; then
+ # Convert to having each file on its own line
+ # so grep will work.
+ echo "$*" | tr " " "\n"
+ fi
+
if [ "$compress" ]; then
# The config file is a sh script that outputs the files to be compressed
# (typically using find).
@@ -28,7 +36,7 @@ filelist () {
# Call only if DH_EXCLUDE_GREP is non-empty.
filelist_excluded () {
# Use grep -F so we don't have to worry about regexp's.
- (filelist | grep -v -F \
+ (filelist "$*" | grep -v -F \
"`echo "$DH_EXCLUDE_GREP" | tr "|" "\n"`") || true
}
@@ -45,9 +53,9 @@ for PACKAGE in $DH_DOPACKAGES; do
# Get the list of files to compress.
if [ "$DH_EXCLUDE_GREP" ]; then
- files=`filelist_excluded`
+ files=`filelist_excluded $*`
else
- files=`filelist`
+ files=`filelist $*`
fi
if [ "$files" ]; then
diff --git a/dh_compress.1 b/dh_compress.1
index ec0def52..4e5ed9e8 100644
--- a/dh_compress.1
+++ b/dh_compress.1
@@ -3,7 +3,7 @@
dh_compress \- compress files and fix symlinks in package build directories
.SH SYNOPSIS
.B dh_compress
-.I "[debhelper options] [-Xitem]"
+.I "[debhelper options] [-Xitem] [-A] [file ...]"
.SH "DESCRIPTION"
dh_compress is a debhelper program that is responsible for compressing
the files in package build directories, and makes sure that any symlinks
@@ -42,6 +42,13 @@ compressed. For example, -X=.jpeg will exclude jpeg's from compression.
You may use this option multiple times to build up a list of things to
exclude. You can accomplish the same thing by using a debian/compress file,
but this is easier.
+.TP
+.B \-A, \--all
+Compress all files specified by command line parameters in ALL packages
+acted on.
+.TP
+.B file ...
+Add these files to the list of files to compress.
.SH NOTES
The debian/compress file applies to the first binary package listed in your
control file. For the other packages, you can make files named
diff --git a/dh_getopt.pl b/dh_getopt.pl
index f1aa7cec..9b97089e 100755
--- a/dh_getopt.pl
+++ b/dh_getopt.pl
@@ -157,6 +157,8 @@ foreach (@exclude) {
}
$exclude_find=~s/ -or $//;
+$include=join ' ', @include;
+
# Remove excluded packages from the list of packages to act on.
undef @package_list;
foreach $package (@packages) {
diff --git a/dh_movefiles b/dh_movefiles
index a5669bfc..f44121c8 100755
--- a/dh_movefiles
+++ b/dh_movefiles
@@ -40,16 +40,31 @@ for PACKAGE in $DH_DOPACKAGES; do
#
# (The echo is in here to expand wildcards. Note that 'ls'
# won't work properly.)
- # The filelist is used, so even very weird filenames can be
+ # The file list is used, so even very weird filenames can be
# moved.
doit "rm -f movelist"
for i in `(cd debian/tmp; echo $tomove)`; do
- complex_doit "(cd debian/tmp ; find $i ! -type d -and ! -type l -print) >> movelist"
+ if [ ! -e "debian/tmp/$i" ]; then
+ fail=1
+ fi
+ complex_doit "(cd debian/tmp ; find $i ! -type d -and ! -type l -print || true) >> movelist"
done
for i in `(cd debian/tmp; echo $tomove)`; do
- complex_doit "(cd debian/tmp ; find $i ! -type d -and -type l -print) >> movelist"
+ if [ ! -e "debian/tmp/$i" ]; then
+ fail=1
+ fi
+ complex_doit "(cd debian/tmp ; find $i ! -type d -and -type l -print || true) >> movelist"
done
complex_doit "(cd debian/tmp;tar --create --remove-files --files-from=../../movelist --file -) | (cd $TMP;tar xpf -)"
doit "rm -f movelist"
fi
done
+
+# If fail is set, we wern't actually able to find some
+# files that were specified to be moved, and we should
+# exit with the code in fail. This program puts off
+# exiting with an error until all files have been tried
+# to be moved, because this makes it easier for some
+# packages that arn't always sure exactly which files need
+# to be moved.
+exit $fail
diff --git a/doc/PROGRAMMING b/doc/PROGRAMMING
index 402d5e78..878c5a2e 100644
--- a/doc/PROGRAMMING
+++ b/doc/PROGRAMMING
@@ -68,11 +68,11 @@ switch variable description
-v DH_VERBOSE should the program verbosely output what it is
doing?
--no-act DH_NO_ACT should the program not actually do anything?
--i,-a,-p DH_DOPACKAGES a space delimited list of the binary packages
+-i,-a,-p,-N DH_DOPACKAGES a space delimited list of the binary packages
to act on
--i,-p DH_DOINDEP a space delimited list of the binary independent
+-i,-p,-N DH_DOINDEP a space delimited list of the binary independent
packages to act on
--a,-p DH_DOARCH a space delimited list of the binary dependent
+-a,-p,-N DH_DOARCH a space delimited list of the binary dependent
packages to act on
-n DH_NOSCRIPTS if set, do not make any modifications to the
package's postinst, postrm, etc scripts.
diff --git a/doc/TODO b/doc/TODO
index dbfc2771..0a2a5bde 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -3,8 +3,6 @@ list grows - I welcome patches to fix items on it!
Bugs:
-* dh_movefiles bombs if the argument is a wildcard pattern that matches
- nothing (reported by Drow).
* dh_installdocs fails if debian/docs is empty except for a blank line.
There are probably other instances of this. Debhelper should behave better
(#24686).
@@ -13,8 +11,6 @@ Bugs:
Wishlist items:
-* Add option to dh_compress to allow addition of files to compress besides
- the default ones.
* Add emacsen support to debhelper. (#21401)
* Make dh_movefiles remove emptied directories after it's moved all the
files out of them (#17111).