From: joey Date: Tue, 17 Aug 1999 04:39:02 +0000 (+0000) Subject: r34: Initial Import X-Git-Tag: debian_version_0_1~194 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b8f36e7620a7a8d6e47b5032ba1dbf0310fb894a;p=debhelper.git r34: Initial Import --- diff --git a/README b/README index 2bb9c7a..e192504 100644 --- a/README +++ b/README @@ -125,13 +125,5 @@ binary package the debhelper program will act on. For example: This uses debian/tmp- as the package build directory. -Miscellaneous notes: -------------------- - -Some of the dh_* programs (dh_installdirs in particular, I have not checked -the rest), will let you pass $PACKAGE to them and it will be expanded into -the package name they are operating on. For example: - - dh_installdirs -a 'usr/doc/$PACKAGE' -- Joey Hess diff --git a/debian/changelog b/debian/changelog index b652cde..7badab5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debhelper (0.28) unstable; urgency=low + + * dh_makeshlibs: fixes type that caused the program to crash (#15536). + + -- Joey Hess Wed, 3 Dec 1997 13:22:48 -0500 + debhelper (0.27) unstable; urgency=low * README: fixed typoes (one serious). diff --git a/dh_clean b/dh_clean index 8e92fc8..b170494 100755 --- a/dh_clean +++ b/dh_clean @@ -15,7 +15,8 @@ done doit "rm -f debian/files* debian/*.debhelper $*" # Remove other temp files. -doit "find . \( -name '#*#' -o -name '*~' -o -name DEADJOE -o -name '*.orig' \ +# Use complex_doit so we can properly escape things. +complex_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 \ \) -exec rm -f {} \;" diff --git a/dh_installdebfiles b/dh_installdebfiles index a995496..825c9ee 100755 --- a/dh_installdebfiles +++ b/dh_installdebfiles @@ -20,7 +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 - doit "perl -pe 's~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg' < debian/$EXT$file > $TMP/DEBIAN/$file" + complex_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 @@ -30,8 +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 - doit "echo '#!/bin/sh -e' > $TMP/DEBIAN/$file" - doit "cat debian/$EXT$file.debhelper >> $TMP/DEBIAN/$file" + complex_doit "echo '#!/bin/sh -e' > $TMP/DEBIAN/$file" + complex_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_lib b/dh_lib index 4aace52..4c8c68c 100644 --- a/dh_lib +++ b/dh_lib @@ -3,7 +3,16 @@ # 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. +# Note that this cannot handle complex commands, especially anything +# involving redirection. Use complex_doit instead. doit() { + verbose_echo "$@" + eval '$@' +} + +# This is an identical command to doit, except the parameter passed to it +# are evaled with double quotes. This version can handle compound commands. +complex_doit() { verbose_echo "$@" eval "$@" } @@ -65,10 +74,9 @@ autoscript() { fi fi - # Running doit doesn't cut it here. - 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" + complex_doit "echo \"# Automatically added by `basename $0` on `822-date`\" >> $autoscript_debscript" + complex_doit "sed \"$autoscript_sed\" $autoscript_filename >> $autoscript_debscript" + complex_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 1f8dd92..24fef4e 100755 --- a/dh_makeshlibs +++ b/dh_makeshlibs @@ -20,7 +20,7 @@ for PACKAGE in $DH_DOPACKAGES; do if [ ! -d "$TMP/DEBIAN" ] ; then doit "install -d $TMP/DEBIAN" fi - doit "echo '$LIBRARY $MAJOR $PACKAGE" >>$TMP/DEBIAN/shlibs" + doit "echo '$LIBRARY $MAJOR $PACKAGE' >>$TMP/DEBIAN/shlibs" done if [ -e "$TMP/DEBIAN/shlibs" ]; then