[libconfig-model-perl] 06/09: fix portrm purge to accept wild cards

dod at debian.org dod at debian.org
Fri Jan 17 18:03:50 UTC 2014


This is an automated email from the git hooks/post-receive script.

dod pushed a commit to branch master
in repository libconfig-model-perl.

commit 9eeb12bb5142fcaffffc928b59c60f5d43684e26
Author: Dominique Dumont <dod at debian.org>
Date:   Sat Jan 11 17:21:13 2014 +0100

    fix portrm purge to accept wild cards
---
 debian/dh/dh_cme_upgrade | 5 +++--
 debian/dh/postrm-cme     | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/debian/dh/dh_cme_upgrade b/debian/dh/dh_cme_upgrade
index 3a5f0d5..66f010d 100644
--- a/debian/dh/dh_cme_upgrade
+++ b/debian/dh/dh_cme_upgrade
@@ -106,8 +106,9 @@ foreach my $package (@do_packages) {
     autoscript( $package, config    => 'config-script-cme', $munge_sub );
 
     if ($purge) {
-        die "Error: cme-purge is not safe ('$purge'). Expected something like /etc/foo"
-            unless $purge =~ m!^/etc/\w+!;
+        my @pb = grep { m!^/etc/\w+! } split /\s+/, $purge ;
+        die "Error: cme-purge is not safe ('$purge'). Expected all paths to be something like /etc/foo"
+            if @pb ;
         autoscript( $package, postrm  => 'postrm-cme', $munge_sub );
 
     }
diff --git a/debian/dh/postrm-cme b/debian/dh/postrm-cme
index a5b1798..6d63148 100644
--- a/debian/dh/postrm-cme
+++ b/debian/dh/postrm-cme
@@ -3,5 +3,5 @@
 if [ "$1" = purge ]
 then
     echo "Purging cme files: '%PURGE%'"
-    rm -rf "%PURGE%"
+    rm -rf %PURGE%
 fi

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-perl.git



More information about the Pkg-perl-cvs-commits mailing list