]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_usrlocal
r1947: update
[debhelper.git] / dh_usrlocal
index da70949182e64a8e50ef132584411ac32b649015..f13c58faa57ceaf7e8edd120f6aff60c4c81f157 100755 (executable)
@@ -99,12 +99,13 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                # This constructs the body of a 'sed' c\ expression which
                # is parsed by the shell in double-quotes
                my $dirs = join("$ebs\n", @dirs);
+               pop @justdirs; # don't remove directories directly in /usr/local
                my $justdirs = join("$ebs\n", @justdirs);
                if (! $dh{NOSCRIPTS}) { 
                        autoscript($package,"postinst", "postinst-usrlocal",
                                   "/#DIRS#/ c${ebs}\n${dirs}");
                        autoscript($package,"prerm", "prerm-usrlocal",
-                                  "/#JUSTDIRS#/ c${ebs}\n${justdirs}");
+                                  "/#JUSTDIRS#/ c${ebs}\n${justdirs}") if length $justdirs;
                }
        }
 }