From: joey Date: Tue, 17 Aug 1999 04:37:25 +0000 (+0000) Subject: r24: Initial Import X-Git-Tag: debian_version_0_1~204 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1c596507129a7022904405114e2bced37ace1cd7;p=debhelper.git r24: Initial Import --- diff --git a/TODO b/TODO index 1a5f1ce..5ed6f9b 100644 --- a/TODO +++ b/TODO @@ -2,3 +2,5 @@ * add all other functionality of debstd (??) * dh_fixperms: allow listing of files not to be touched (diffucult). * add a dh_debstd, which mimics debstd, but uses debhelper tools internally. +* dh_du: change it so it doesn't grep for things with tabs in them. That's + nasty. (and makes cut-and-paste from dh_du -v not work). diff --git a/debian/changelog b/debian/changelog index bbbdb26..6f26f1e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +debhelper (0.18) unstable; urgency=low + + * examples/*: added source, diff targets that just print an error. + * dh_clean: clean up more files - *.orig, *.rej, *.bak, .*.orig, .*.rej, + .SUMS, TAGS, and empty files. + * dh_lib: doit(): use eval on parameters, instead of directly running + them. This lets me clean up several nasty areas where I had to echo the + commands once, and then run them seperatly. + + -- Joey Hess Mon, 10 Nov 1997 19:48:36 -0500 + debhelper (0.17) unstable; urgency=low * Added dh_installdirs, automatically creates subdirectories (for diff --git a/dh_clean b/dh_clean index 874604e..73c094f 100755 --- a/dh_clean +++ b/dh_clean @@ -16,5 +16,7 @@ doit "rm -f debian/files* debian/*.debhelper $*" # Remove other temp files. doit isn't smart enough to handle this, so I echo # by hand (sigh). -verbose_echo "find . \( -name "\#*\#" -o -name "*~" -o -name "DEADJOE" \) -exec rm -f {} \;" -find . \( -name "\#*\#" -o -name "*~" -o -name "DEADJOE" \) -exec rm -f {} \; +doit "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 -size 0 \) -exec rm -f {} \;" diff --git a/dh_du b/dh_du index 5fcb141..c06f9c2 100755 --- a/dh_du +++ b/dh_du @@ -13,7 +13,7 @@ for PACKAGE in $DH_DOPACKAGES; do doit "install -d $TMP/DEBIAN" fi - verbose_echo "du -k $TMP | sed \"s: $TMP/: :\" | grep -v \" DEBIAN$\" | grep -v \" $TMP$\" > $TMP/DEBIAN/du" - du -k $TMP | sed "s: $TMP/: :" | grep -v " DEBIAN$" | grep -v " $TMP$" >$TMP/DEBIAN/du + # Note that the tabs in this next line are important. + doit "du -k $TMP | sed 's: $TMP/: :' | grep -v ' DEBIAN$' | grep -v ' $TMP$' >$TMP/DEBIAN/du" doit "chown root.root debian/tmp/DEBIAN/du" done diff --git a/dh_installdebfiles b/dh_installdebfiles index ad08f8d..a995496 100755 --- a/dh_installdebfiles +++ b/dh_installdebfiles @@ -20,8 +20,7 @@ for PACKAGE in $DH_DOPACKAGES; do if [ -f debian/$EXT$file ]; then # Add this into the script, where it has #DEBHELPER# if [ -f debian/$EXT$file.debhelper ]; then - verbose_echo "perl -pe \"s~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg\" < debian/$EXT$file > $TMP/DEBIAN/$file" - perl -pe "s~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg" < debian/$EXT$file > $TMP/DEBIAN/$file + doit "perl -pe 's~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg' < debian/$EXT$file > $TMP/DEBIAN/$file" doit "chown root.root $TMP/DEBIAN/$file" doit "chmod 755 $TMP/DEBIAN/$file" else @@ -31,10 +30,8 @@ for PACKAGE in $DH_DOPACKAGES; do # Auto-generate script header and add .debhelper # content to it. if [ -f debian/$EXT$file.debhelper ]; then - verbose_echo "echo '#!/bin/sh -e' > $TMP/DEBIAN/$file" - echo '#!/bin/sh -e' > $TMP/DEBIAN/$file - verbose_echo "cat debian/$EXT$file.debhelper >> $TMP/DEBIAN/$file" - cat debian/$EXT$file.debhelper >> $TMP/DEBIAN/$file + doit "echo '#!/bin/sh -e' > $TMP/DEBIAN/$file" + doit "cat debian/$EXT$file.debhelper >> $TMP/DEBIAN/$file" doit "chown root.root $TMP/DEBIAN/$file" doit "chmod 755 $TMP/DEBIAN/$file" fi diff --git a/dh_installdirs b/dh_installdirs index bab883d..a44de9a 100755 --- a/dh_installdirs +++ b/dh_installdirs @@ -31,9 +31,6 @@ for PACKAGE in $DH_DOPACKAGES; do fi done # Create dirs. - verbose_echo "cd $TMP && install -d $dirs && cd ../.." - cd $TMP - install -d $dirs - cd ../.. + doit "cd $TMP && install -d $dirs && cd ../.." fi done diff --git a/dh_lib b/dh_lib index 8dad88c..1b17151 100644 --- a/dh_lib +++ b/dh_lib @@ -3,17 +3,15 @@ # Run a command, and display the command to stdout if verbose mode is on. # All commands that modifiy files in $TMP should be ran via this # function. -# Unfortunatly, this function doesn't work if your command uses redirection, -# you will have to call verbose_echo by hand then. doit() { - verbose_echo "$*" - $* + verbose_echo "$@" + eval "$@" } # Echo something if the verbose flag is on. verbose_echo() { if [ "$DH_VERBOSE" ]; then - echo " $*" + echo " $@" fi } @@ -68,12 +66,9 @@ autoscript() { fi # Running doit doesn't cut it here. - verbose_echo echo "# Automatically added by `basename $0` on `822-date`" ">>" $autoscript_debscript - echo "# Automatically added by `basename $0` on `822-date`" >> $autoscript_debscript - verbose_echo sed "$autoscript_sed" $autoscript_filename ">>" $autoscript_debscript - sed "$autoscript_sed" $autoscript_filename >> $autoscript_debscript - verbose_echo echo "# End automatically added section" ">>" $autoscript_debscript - echo "# End automatically added section" >> $autoscript_debscript + doit "echo \"# Automatically added by `basename $0` on `822-date`\" >> $autoscript_debscript" + doit "sed \"$autoscript_sed\" $autoscript_filename >> $autoscript_debscript" + doit "echo '# End automatically added section' >> $autoscript_debscript" } # Argument processing and global variable initialization is below. diff --git a/dh_makeshlibs b/dh_makeshlibs index f1ab889..1f8dd92 100755 --- a/dh_makeshlibs +++ b/dh_makeshlibs @@ -20,8 +20,7 @@ for PACKAGE in $DH_DOPACKAGES; do if [ ! -d "$TMP/DEBIAN" ] ; then doit "install -d $TMP/DEBIAN" fi - verbose_echo "echo \"$LIBRARY $MAJOR $PACKAGE\" >>$TMP/DEBIAN/shlibs" - echo "$LIBRARY $MAJOR $PACKAGE" >>$TMP/DEBIAN/shlibs + doit "echo '$LIBRARY $MAJOR $PACKAGE" >>$TMP/DEBIAN/shlibs" done if [ -e "$TMP/DEBIAN/shlibs" ]; then diff --git a/dh_md5sums b/dh_md5sums index f71ab52..5278ed5 100755 --- a/dh_md5sums +++ b/dh_md5sums @@ -13,17 +13,13 @@ for PACKAGE in $DH_DOPACKAGES; do doit "install -d $TMP/DEBIAN" fi - # Doit isn't smart enough to hande this next command so echo by hand. (sigh) - verbose_echo 'find $TMP/* -type f ! -regex "^$TMP/DEBIAN/.*" | sed s:$TMP/:: | sort > $TMP/DEBIAN/allfiles' - find $TMP/* -type f ! -regex "^$TMP/DEBIAN/.*" | sed s:$TMP:: | sort > $TMP/DEBIAN/allfiles + doit "find $TMP/* -type f ! -regex '^$TMP/DEBIAN/.*' | sed s:$TMP:: | sort > $TMP/DEBIAN/allfiles" # Check if we should exclude conffiles. if [ ! "$DH_EXCLUDE" -a -r $TMP/DEBIAN/conffiles ]; then - verbose_echo "sort $TMP/DEBIAN/conffiles | comm -13 - $TMP/DEBIAN/allfiles > $TMP/DEBIAN/allfiles.new" - sort $TMP/DEBIAN/conffiles | comm -13 - $TMP/DEBIAN/allfiles > $TMP/DEBIAN/allfiles.new + doit "sort $TMP/DEBIAN/conffiles | comm -13 - $TMP/DEBIAN/allfiles > $TMP/DEBIAN/allfiles.new" doit "mv $TMP/DEBIAN/allfiles.new $TMP/DEBIAN/allfiles" fi - verbose_echo "cd $TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../.." - cd $TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../.. + doit "cd $TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../.." doit "chown root.root $TMP/DEBIAN/md5sums" doit "rm -f $TMP/DEBIAN/allfiles" done diff --git a/examples/rules b/examples/rules index 5d0f708..72ce3e6 100755 --- a/examples/rules +++ b/examples/rules @@ -48,5 +48,8 @@ binary-arch: build dh_md5sums dh_builddeb +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary diff --git a/examples/rules.multi b/examples/rules.multi index 6fd7088..c5d1618 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -70,5 +70,8 @@ binary-arch: build dh_md5sums -a dh_builddeb -a +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary