invirt-console-host, invirt-dev, and all of the packages in
xvm-munin-config previously used a convoluted one-liner to clean up
/etc/sudoers, but we can do it much more easily using the .. operator.
Taken from http://blog.ksplice.com/2010/05/top-10-perl-one-liner-tricks/
svn path=/trunk/packages/xvm-munin-config/; revision=3011
+xvm-munin-config (0.0.12) unstable; urgency=low
+
+ * Use the .. perl operator to simplify the prerms.
+
+ -- Evan Broder <broder@mit.edu> Thu, 27 May 2010 11:55:31 -0400
+
xvm-munin-config (0.0.11) unstable; urgency=low
* Add missing invirt-base dependency to all xvm-munin-config packages.
case "$1" in
remove|upgrade|deconfigure)
- perl -i.bak -ne 's%^### (BEGIN|END) xvm-munin-config\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers
+ perl -i.bak -ne 'print unless /^### BEGIN xvm-munin-config/../^### END xvm-munin-config/' /etc/sudoers
;;
failed-upgrade)
case "$1" in
remove|upgrade|deconfigure)
- perl -i.bak -ne 's%^### (BEGIN|END) xvm-munin-config\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers
+ perl -i.bak -ne 'print unless /^### BEGIN xvm-munin-config/../^### END xvm-munin-config/' /etc/sudoers
;;
failed-upgrade)
case "$1" in
remove|upgrade|deconfigure)
- perl -i.bak -ne 's%^### (BEGIN|END) xvm-munin-config\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers
+ perl -i.bak -ne 'print unless /^### BEGIN xvm-munin-config/../^### END xvm-munin-config/' /etc/sudoers
;;
failed-upgrade)
case "$1" in
remove|upgrade|deconfigure)
- perl -i.bak -ne 's%^### (BEGIN|END) xvm-munin-config\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers
+ perl -i.bak -ne 'print unless /^### BEGIN xvm-munin-config/../^### END xvm-munin-config/' /etc/sudoers
;;
failed-upgrade)