]> git.donarmstrong.com Git - debhelper.git/commitdiff
r563: * dh_install: Support autodest with non-debian/tmp sourcedirs.
authorjoey <joey>
Fri, 15 Nov 2002 18:14:59 +0000 (18:14 +0000)
committerjoey <joey>
Fri, 15 Nov 2002 18:14:59 +0000 (18:14 +0000)
Closes: #169138
   * dh_install: Support implicit "." sourcedir and --list-missing.
     (Also supports ./foo file specs and --list-missing.)
Closes: #168751
   * dh_md5sums: Don't glob. Closes: #169135

debian/changelog
dh_install
dh_md5sums

index b1be5fdf1e5ef987bdfb86e927aa26351e0bc01c..fa04e3a7d190e45e24afda2a93e84305ea1e1e13 100644 (file)
@@ -1,3 +1,14 @@
+debhelper (4.1.22) unstable; urgency=low
+
+  * dh_install: Support autodest with non-debian/tmp sourcedirs.
+    Closes: #169138
+  * dh_install: Support implicit "." sourcedir and --list-missing.
+    (Also supports ./foo file specs and --list-missing.)
+    Closes: #168751
+  * dh_md5sums: Don't glob. Closes: #169135
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 15 Nov 2002 13:12:24 -0500
+
 debhelper (4.1.21) unstable; urgency=low
 
   * Make dh_install --list-missing honor -X excludes. Closes: #168739
index afd5a2641418bfe2360b33deb098c5307fadcc7b..d75e02537640da0acd357fc527d6a9f971b09ed7 100755 (executable)
@@ -56,11 +56,11 @@ specified, you should not list destination directories in
 debian/package.install files or on the command line. Instead, dh_install
 will guess as follows:
 
-Strip off debian/tmp from the front of the filename, if it is present, and
-install into the dirname of the filename. So if the filename is
-debian/tmp/usr/bin, then that directory will be copied to 
-debian/package/usr/. If the filename is debian/tmp/etc/passwd, it will be 
-copied to debian/package/etc/.
+Strip off debian/tmp (or the sourcedir if one is given) from the front of
+the filename, if it is present, and install into the dirname of the
+filename. So if the filename is debian/tmp/usr/bin, then that directory
+will be copied to debian/package/usr/. If the filename is
+debian/tmp/etc/passwd, it will be copied to debian/package/etc/.
 
 Note that if you list only a filename on a line by itself in a
 debian/package.install file, with no explicit destination, then dh_install
@@ -138,7 +138,11 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                        if (! defined $dest) {
                                # Guess at destination directory.
                                $dest=$src;
-                               $dest=~s/^(.*\/)?debian\/tmp//;
+                               my $strip=$srcdir;
+                               if ($strip eq '.') {
+                                       $strip = "debian/tmp";
+                               }
+                               $dest=~s/^(.*\/)?\Q$strip\E//;
                                $dest=dirname($dest);
                        }
                        
@@ -153,6 +157,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                                # @installed stuff more robust.
                                $src=~y:/:/:s;
                                $src=~s:/+$::;
+                               $src=~s:^(\./)*::;
                                push @installed, "\Q$src\E\/.*|\Q$src\E";
                        }
                        
index 2fc6f4abff8493ae3d3c8c0a129af289724ff744..616a8d8970ffb2113f4b5274df9b4934afb5434f 100755 (executable)
@@ -70,7 +70,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        }
        
        my $olddir=getcwd();
-       complex_doit("cd $tmp >/dev/null ; find * -type f $exclude ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums ; cd '$olddir' >/dev/null");
+       complex_doit("cd $tmp >/dev/null ; find . -type f $exclude ! -regex '.*/DEBIAN/.*' -printf '%P\\0' | xargs -r0 md5sum > DEBIAN/md5sums ; cd '$olddir' >/dev/null");
        # If the file's empty, no reason to waste inodes on it.
        if (-z "$tmp/DEBIAN/md5sums") {
                doit("rm","-f","$tmp/DEBIAN/md5sums");