]> git.donarmstrong.com Git - debhelper.git/commitdiff
r93: Initial Import
authorjoey <joey>
Tue, 17 Aug 1999 04:53:01 +0000 (04:53 +0000)
committerjoey <joey>
Tue, 17 Aug 1999 04:53:01 +0000 (04:53 +0000)
debian/changelog
dh_fixperms
dh_getopt.pl

index b2263d29d703b290b5eebcc36446b51567f13926..873cfa6e001491e9e7999a670dcc02edda6fa1c4 100644 (file)
@@ -1,3 +1,11 @@
+debhelper (0.96) unstable; urgency=low
+
+  * dh_movefiles: fixed serious breakage introduced in the last version.
+  * dh_movefiles: really order all symlinks last.
+  * some minor reorganization of the source tree.
+
+ -- Joey Hess <joeyh@master.debian.org>  Sun, 28 Jun 1998 21:53:45 -0700
+
 debhelper (0.95) unstable; urgency=low
 
   * dh_movefiles: move even very strangly named files. (#23775) Unfortunatly,
index b30332a1e507483cae394410b95a5033aa4060f3..544ee9be9dd50805360e89a6ede751abc97abd93 100755 (executable)
@@ -5,26 +5,11 @@
 PATH=debian:$PATH:/usr/lib/debhelper
 . dh_lib
 
-# Pass this a list of files, one per line, it will return the list, with 
-# any files that need to be excluded removed.
-filelist_excluded () {
-       IFS="
-"
-       if [ "$DH_EXCLUDE_GREP" ]; then
-               # Use grep -F so we don't have to worry about regexp's.
-               echo -n "$*" | grep -v -F \
-                       "`echo "$DH_EXCLUDE_GREP" | tr "|" "\n"`"
-       else
-               echo -n "$*"
-       fi
-       unset IFS
-}
-
 for PACKAGE in $DH_DOPACKAGES; do
        TMP=`tmpdir $PACKAGE`
 
        # General permissions fixing.
-       if [ ! "$DH_EXCLUDE_GREP" ]; then
+       if [ ! "$DH_EXCLUDE_FIND" ]; then
                # It's much faster to do it this way, but we can only do
                # this if there is nothing to exclude.
                if [ -d $TMP ]; then
@@ -32,36 +17,33 @@ for PACKAGE in $DH_DOPACKAGES; do
                        doit "chmod -R go=rX $TMP"
                        doit "chmod -R u+rw $TMP"
                fi
+
+               FIND_OPTIONS=
        else
                # Do it the hard way.
-               files=`filelist_excluded \`find $TMP 2>/dev/null\` | tr "\n" " "`
-               if [ "$files" ]; then
-                       doit "chown root.root $files"
-                       doit "chmod go=rX $files"
-                       doit "chmod u+rw $files"
-               fi
+               complex_doit "find $TMP ! \( $DH_EXCLUDE_FIND \) -print0 \
+                       2>/dev/null | xargs -0r chown root.root"
+               complex_doit "find $TMP ! \($DH_EXCLUDE_FIND \) -print0 \
+                       2>/dev/null | xargs -0r chmod go=rX"
+               complex_doit "find $TMP ! \( $DH_EXCLUDE_FIND \) -print0 \
+                       2>/dev/null | xargs -0r chmod u+rw"
+
+               FIND_OPTIONS="! \( $DH_EXCLUDE_FIND \)"
        fi
 
        # Fix up premissions in usr/doc, setting everything to not exectable
        # by default, but leave examples directories alone.
-       files=`filelist_excluded \`find $TMP/usr/doc -type f 2>/dev/null | grep -v /examples/\` | tr "\n" " "`
-       if [ "$files" ]; then
-               doit "chmod 644 $files"
-       fi
-       files=`filelist_excluded \`find $TMP/usr/doc -type d 2>/dev/null\` | tr "\n" " "`
-       if [ "$files" ]; then
-               doit "chmod 755 $files"
-       fi
+       complex_doit "find $TMP/usr/doc -type f $FIND_OPTIONS -print0 \
+               2>/dev/null | xargs -0r chmod 644"
+       complex_doit "find $TMP/usr/doc -type d $FIND_OPTIONS -print0 \
+               2>/dev/null | xargs -0r chmod 755"
 
        # Executable man pages are a bad thing..
-       files=`filelist_excluded \`find $TMP/usr/man/ $TMP/usr/X11*/man/ -type f 2>/dev/null\` | tr "\n" " "`
-       if [ "$files" ]; then
-               doit "chmod 644 $files"
-       fi
+       complex_doit "find $TMP/usr/man/ $TMP/usr/X11*/man/ -type f \
+               $FIND_OPTIONS -print0 2>/dev/null | xargs -0r chmod 644"
 
        # ..and so are executable shared libraries (and .la files from libtool)
-       files=`filelist_excluded \`find $TMP -perm -5 -type f \( -name "*.so*" -or -name "*.la" \)\` | tr "\n" " "`
-       if [ "$files" ]; then
-               doit "chmod a-X $files"
-       fi
+       complex_doit "find $TMP -perm -5 -type f \
+               \( -name "*.so*" -or -name "*.la" \) $FIND_OPTIONS -print0 \
+               2>/dev/null | xargs -0r chmod a-X"
 done
index b5cde776ff7a29f08510d8a6ed6b8beb05364879..b7a856c4acc9993ed5b55003e73cc184f976eadf 100755 (executable)
@@ -144,6 +144,10 @@ if ($ENV{DH_NO_ACT} ne undef) {
 
 $exclude=join ' ', @exclude;
 $exclude_grep=join '|', @exclude;
+foreach (@exclude) {
+       $exclude_find.="-regex .*".quotemeta($_).".* -or ";
+}
+$exclude_find=~s/ -or $//;
 
 # Now output everything, in a format suitable for a shell to eval it. 
 # Note the last line sets $@ in the shell to whatever arguements remain.
@@ -157,6 +161,7 @@ DH_NOSCRIPTS='$noscripts'
 DH_INCLUDE_CONFFILES='$include'
 DH_EXCLUDE='$exclude'
 DH_EXCLUDE_GREP='$exclude_grep'
+DH_EXCLUDE_FIND='$exclude_find'
 DH_D_FLAG='$d_flag'
 DH_R_FLAG='$r_flag'
 DH_K_FLAG='$k_flag'