Control: tag -1 + patch
Control: found -1 9.20150501
Control: notfound -1 9.20150101
Control: thanks

Hi,

The attached path sorts the directories in reverse order for prerm. This
has the effect that subdirectories are removed first, so that "trunk"
directories have a chance of being empty when we try to remove them.

Kind regards, Thibaut.
diff --git a/dh_usrlocal b/dh_usrlocal
index 193d70d..94940a3 100755
--- a/dh_usrlocal
+++ b/dh_usrlocal
@@ -103,7 +103,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 		# is parsed by the shell in double-quotes
 		my $dirs = join("$ebs\n", sort @dirs);
 		pop @justdirs; # don't remove directories directly in /usr/local
-		my $justdirs = join("$ebs\n", sort @justdirs);
+		my $justdirs = join("$ebs\n", sort {$b cmp $a} @justdirs);
 		if (! $dh{NOSCRIPTS}) { 
 			autoscript($package,"postinst", "postinst-usrlocal",
 				   "/#DIRS#/ c${ebs}\n${dirs}");

Reply via email to