]> git.donarmstrong.com Git - debhelper.git/commitdiff
r569: * Fix dh_install to install empty directories even if it is excluding some
authorjoey <joey>
Thu, 12 Dec 2002 22:13:19 +0000 (22:13 +0000)
committerjoey <joey>
Thu, 12 Dec 2002 22:13:19 +0000 (22:13 +0000)
     files from installation.

debian/changelog
dh_install

index b267d9e33d9148bf1b96022bb049e50133754e41..6cebf98c904c3779d695cb198532fba8fb27e3b4 100644 (file)
@@ -1,10 +1,17 @@
+debhelper (4.1.28) unstable; urgency=low
+
+  * Fix dh_install to install empty directories even if it is excluding some
+    files from installation.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 12 Dec 2002 14:39:30 -0500
+
 debhelper (4.1.27) unstable; urgency=low
 
   * Fixed dh_python ordering in example rules files. Closes: #172283
   * Make python postinst fragment only run python if it is installed, useful
     for packages that include python modules but do not depend on python.
 
- -- Joey Hess <joeyh@debian.org>  Mon,  9 Dec 2002 12:12:31 -0500
+ -- Joey Hess <joeyh@debian.org>  Mon,  9 Dec 2002 21:53:08 -0500
 
 debhelper (4.1.26) unstable; urgency=low
 
index d75e02537640da0acd357fc527d6a9f971b09ed7..c6aea5b28a34c45d3d4cc186e33731f78bde9f49 100755 (executable)
@@ -122,7 +122,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        # Support for -X flag.
        my $exclude = '';
        if ($dh{EXCLUDE_FIND}) {
-               $exclude = '-and ! \( '.$dh{EXCLUDE_FIND}.' \)';
+               $exclude = '! \( '.$dh{EXCLUDE_FIND}.' \)';
        }
        
        foreach my $set (@install) {
@@ -166,7 +166,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                                # Pity there's no cp --exclude ..
                                my $pwd=`pwd`;
                                chomp $pwd;
-                               complex_doit("cd $src/.. && find $dir_basename \\( -type f -or -type l \\) $exclude -exec cp --parents -dp {} $pwd/$tmp/$dest/ \\;");
+                               complex_doit("cd $src/.. && find $dir_basename $exclude \\( -type f -or -type l \\) -exec cp --parents -dp {} $pwd/$tmp/$dest/ \\;");
+                               # cp is annoying so I need a separate pass
+                               # just for empty directories
+                               complex_doit("cd $src/.. && find $dir_basename $exclude \\( -type d -and -empty \\) -exec cp --parents -a {} $pwd/$tmp/$dest/ \\;");
                        }
                        else {
                                doit("cp", "-a", $src, "$tmp/$dest/");
@@ -191,7 +194,7 @@ if ($dh{LIST_MISSING}) {
                push @missing, $_ unless /$installed/ || excludefile($_);
        }, $srcdir);
        if (@missing) {
-               warning "$_ not installed" foreach @missing;
+               warning "$_ exists in debian/tmp but not installed to anywhere" foreach @missing;
        }
 }