]> git.donarmstrong.com Git - debhelper.git/commitdiff
r24: Initial Import
authorjoey <joey>
Tue, 17 Aug 1999 04:37:25 +0000 (04:37 +0000)
committerjoey <joey>
Tue, 17 Aug 1999 04:37:25 +0000 (04:37 +0000)
TODO
debian/changelog
dh_clean
dh_du
dh_installdebfiles
dh_installdirs
dh_lib
dh_makeshlibs
dh_md5sums
examples/rules
examples/rules.multi

diff --git a/TODO b/TODO
index 1a5f1cefdc0d544f85796b19d6c7a530df640834..5ed6f9bbb5dab0b3b84ccd74e7d9e35794a0b6e0 100644 (file)
--- 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).
index bbbdb2681213974fcdcf6fec2c697b774e055877..6f26f1ee45fd3916446b7252170502789f953d93 100644 (file)
@@ -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 <joeyh@master.debian.org>  Mon, 10 Nov 1997 19:48:36 -0500
+
 debhelper (0.17) unstable; urgency=low
 
   * Added dh_installdirs, automatically creates subdirectories (for
index 874604ed24b04142723f5c0e661de0cc6417da79..73c094fe4feb6fa91cfbd24ad45431453cb3b161 100755 (executable)
--- 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 5fcb141804ea718deef9939af4f4a4bb43ad5ebf..c06f9c27b7478cf9a69a56077fe0a930fbde186e 100755 (executable)
--- 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
index ad08f8d3a6e475961139b0ba3050993e21e339ae..a9954963fac0970f43f87f0140ac6147dfb1f1d1 100755 (executable)
@@ -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
index bab883d779819f5cc1444235c30f436dfeec0504..a44de9ab85974ab151e6c574f9d4fa1103a39ece 100755 (executable)
@@ -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 8dad88c5dbcb2dd6f8184efa21eddbbac8c535a7..1b17151d79f2c653d515cb6a3be79a5fff7d1ff8 100644 (file)
--- 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.
index f1ab8899f3712b1cf99a5fcd781501e2bed7fac4..1f8dd92c42424f03141e152cbb4d479cfeab9685 100755 (executable)
@@ -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
index f71ab5294b12b632b5b8e44c025589f4b96a2305..5278ed517e78520a7809e5f08d35a4d43a72e3c5 100755 (executable)
@@ -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
index 5d0f7085138d5c670887f12457b2f12ae0d3e63f..72ce3e666a3f32814aefc458ec7f5208c424c64d 100755 (executable)
@@ -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
index 6fd708893896594698ca493d5fd2a2fe1e5e4ac6..c5d161839348b6c66309bebf451675cc3cc496be 100755 (executable)
@@ -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