]> git.donarmstrong.com Git - debhelper.git/commitdiff
r114: Initial Import
authorjoey <joey>
Tue, 17 Aug 1999 04:58:27 +0000 (04:58 +0000)
committerjoey <joey>
Tue, 17 Aug 1999 04:58:27 +0000 (04:58 +0000)
Dh_Getopt.pm
Dh_Lib.pm
debian/changelog
debian/control
dh_gencontrol
dh_gencontrol.1
dh_installcron
doc/PROGRAMMING

index 85f0e15b6a199723fd4c2ba5cb2198c774c69749..0f9dafdfbdb8f57831792a7e9ad06c53e8f688d1 100644 (file)
@@ -90,6 +90,7 @@ sub parseopts {
                "u=s", => \$options{U_PARAMS},
                "update-rcd-params=s", => \$options{U_PARAMS},
                "dpkg-shlibdeps-params=s", => \$options{U_PARAMS},
+               "dpkg-gencontrol-params=s", => \$options{U_PARAMS},
 
                "m=s", => \$options{M_PARAMS},
                "major=s" => \$options{M_PARAMS},
index b4d0db53777edf6b7c170674c9498868d837e57e..00f281321bab608d1c6427871cfa3c1131e6d0ea 100644 (file)
--- a/Dh_Lib.pm
+++ b/Dh_Lib.pm
@@ -70,12 +70,19 @@ sub init {
        # This package gets special treatement: files and directories specified on
        # the command line may affect it.
        $dh{FIRSTPACKAGE}=${$dh{DOPACKAGES}}[0];
+
+       # Split the U_PARAMS up into an array.
+       my $u=$dh{U_PARAMS};
+       undef $dh{U_PARAMS};
+       if (defined $u) {
+               push @{$dh{U_PARAMS}}, split(/\s+/,$u);
+       }
 }
 
 # Escapes out shell metacharacters in a word of shell script.
 sub escape_shell { my $word=shift;
-       # This list is from )Unix in a Nutshell_. (except '#')
-       $word=~s/([-\s!"$()*+#;<>?@\[\]\\`|~])/\\$1/g;
+       # This list is from _Unix in a Nutshell_. (except '#')
+       $word=~s/([\s!"\$()*+#;<>?@\[\]\\`|~])/\\$1/g;
        return $word;
 }
 
index e1c7ee7593765063791e778e595d33231774ce92..725f2ac649f517c360e9b0a263dc87cd1547f3e9 100644 (file)
@@ -1,3 +1,15 @@
+debhelper (1.1.8) unstable; urgency=low
+
+  * Dh_Lib.pm: made U_PARAMS an array of parameters.
+  * Dh_Lib.pm: fixed bug in the escaping code, numbers don't need to be
+    escaped. Also, no longer escape "-".
+  * dh_clean, dh_gencontrol, dh_installcron: converted to perl.
+  * dh_gencontrol.1, dh_gencontrol: the man page had said that
+    --update-rcd-params was equivilant to -u for this program. You should
+    really use --dpkg-gencontrol-params.
+
+ -- Joey Hess <joeyh@master.debian.org>  Fri, 14 Aug 1998 14:07:35 -0700
+
 debhelper (1.1.7) unstable; urgency=low
 
   * examples/rules.multi: moved dh_movefiles into the install section.
index 0a97ae80bf70b74ab79a5ce3f59e5ed3b15226b6..8ba5d99932dac59f36dd159e07a39d76cffee07f 100644 (file)
@@ -2,7 +2,7 @@ Source: debhelper
 Section: devel
 Priority: optional
 Maintainer: Joey Hess <joeyh@master.debian.org>
-Standards-Version: 2.4.1.2
+Standards-Version: 2.4.1.3
 
 Package: debhelper
 Architecture: all
index c3698b56c20ccacb323e80f907d5ff3a6738234b..cadfdc03bb254d3dc0acee4f1da763e14f95d800 100755 (executable)
@@ -1,26 +1,30 @@
-#!/bin/sh -e
+#!/usr/bin/perl -w
 #
 # Generate and install the control file. Simple dpkg-gencontrol wrapper.
 
-PATH=debian:$PATH:/usr/lib/debhelper
-. dh_lib
+BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
+use Dh_Lib;
+init();
 
-for PACKAGE in $DH_DOPACKAGES; do
-       TMP=`tmpdir $PACKAGE`
-       EXT=`pkgext $PACKAGE`
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+       $TMP=tmpdir($PACKAGE);
+       $EXT=pkgext($PACKAGE);
+       
+       $changelog=pkgfile($PACKAGE,'changelog');
+       if (! $changelog) {
+               $changelog='debian/changelog';
+       }
 
-       changelog=`pkgfile $PACKAGE changelog`
-       if [ ! "$changelog" ]; then
-               changelog=debian/changelog
-       fi
-
-       if [ ! -d $TMP/DEBIAN ]; then
-               doit "install -o root -g root -d $TMP/DEBIAN"
-       fi
+       if ( ! -d '$TMP/DEBIAN' ) {
+               doit("install","-o","root","-g","root","-d","$TMP/DEBIAN");
+       }
 
        # Generate and install control file.
-       doit "dpkg-gencontrol -l$changelog -isp -p$PACKAGE -Tdebian/${EXT}substvars -P$TMP $DH_U_PARAMS"
+       doit("dpkg-gencontrol","-l$changelog","-isp","-p$PACKAGE",
+               "-Tdebian/$EXT\substvars","-P$TMP",@{$dh{U_PARAMS}});
+
        # This chmod is only necessary if the user sets the umask to something odd.
-       doit "chmod 644 $TMP/DEBIAN/control"
-       doit "chown root.root $TMP/DEBIAN/control"
-done
+       doit("chmod","644","$TMP/DEBIAN/control");
+       
+       doit("chown","root.root","$TMP/DEBIAN/control");
+}
index 2bfade492411bae2cbd563f2f8aa46c8fa8fdf1f..7ceb532aa65ccc99ec2a5b2af8cbb725739b80e9 100644 (file)
@@ -18,7 +18,7 @@ See
 .BR debhelper (1)
 for a list of options common to all debhelper commands.
 .TP
-.B \-uparams, \--update-rcd-params=params
+.B \-uparams, \--dpkg-gencontrol-params=params
 Pass "params" to 
 .BR dpkg-gencontrol (1)
 .SH ENVIRONMENT
index 448e38a43156d12bd238e083d70ae3feedd78116..133ba7439328af423415563b33eafcb37ca74e30 100755 (executable)
@@ -1,20 +1,20 @@
-#!/bin/sh -e
+#!/usr/bin/perl -w
 #
 # Install cron scripts into the appropriate places.
 
-PATH=debian:$PATH:/usr/lib/debhelper
-. dh_lib
+BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
+use Dh_Lib;
+init();
 
-for PACKAGE in $DH_DOPACKAGES; do
-       TMP=`tmpdir $PACKAGE`
-
-       for type in daily weekly monthly d; do
-               cron=`pkgfile $PACKAGE cron.$type`
-               if [ "$cron" ]; then
-                       if [ ! -d $TMP/etc/cron.$type ]; then
-                               doit "install -o root -g root -d $TMP/etc/cron.$type"
-                       fi
-                       doit "install "$cron" $TMP/etc/cron.$type/$PACKAGE"
-               fi
-       done
-done
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+       $TMP=tmpdir($PACKAGE);
+       foreach $type (qw{daily weekly monthly d}) {
+               $cron=pkgfile($PACKAGE,"cron.$type");
+               if ($cron) {
+                       if (! -d "$TMP/etc/cron.$type") {
+                               doit("install","-o","root","-g","root","-d","$TMP/etc/cron.$type");
+                       }
+                       doit("install",$cron,"$TMP/etc/cron.$type/$PACKAGE");
+               }
+       }
+}
index e514095db7fe4fc387becbf95a817488cd674eea..1addc3b81fe45e64be57c9ee69ef0141fed7ca13 100644 (file)
@@ -117,7 +117,7 @@ switch              variable        description
                                package is being acted on)
 -u             U_PARAMS        will be set to a string, that is typically
                                parameters your program passes on to some
-                               other program.
+                               other program. (In Dh_Lib.pm, this is an array)
 -m             M_PARAMS        will be set to a string, you decide what it
                                means to your program
 -V             V_FLAG          will be set to a string, you decide what it