[ovs-dev] [PATCH 1/2] packaging: dpkg --purge command fails on Ubuntu 11.04

Ansis Atteka aatteka at nicira.com
Tue Nov 1 20:24:29 UTC 2011


The problem is that postrm script is unable to remove
contents of /var/log/openvswitch/ directory in case if
it contains any other directories. Steps to reproduce
on Ubuntu 11.04:
1. apt-get install openvswitch-switch
2. dpkg --purge openvswitch-switch
3. observe that purge failed, because of an empty "cores"
directory inside /var/log/openvswitch/
---
 debian/openvswitch-switch.postrm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/debian/openvswitch-switch.postrm b/debian/openvswitch-switch.postrm
index b785c54..d911338 100755
--- a/debian/openvswitch-switch.postrm
+++ b/debian/openvswitch-switch.postrm
@@ -24,7 +24,7 @@ case "$1" in
         rm -f /etc/openvswitch/conf.db
         rm -f /etc/openvswitch/.conf.db.~lock~
         rm -f /etc/default/openvswitch-switch
-        rm -f /var/log/openvswitch/*
+        rm -f /var/log/openvswitch/* || true
         ;;
 
     remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-- 
1.7.4.1




More information about the dev mailing list