From 80465f229050fd4e6437ed88cc65d7e8ca5da1a8 Mon Sep 17 00:00:00 2001
From: Diego Giovane Pasqualin <dpasqualin@c3sl.ufpr.br>
Date: Wed, 2 Jul 2014 16:57:06 -0300
Subject: [PATCH] le-autoupgrade: postrm: Do not remove original file after
 removing divert

Signed-off-by: Diego Giovane Pasqualin <dpasqualin@c3sl.ufpr.br>
---
 le-autoupgrade/package/DEBIAN/control | 2 +-
 le-autoupgrade/package/DEBIAN/postrm  | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/le-autoupgrade/package/DEBIAN/control b/le-autoupgrade/package/DEBIAN/control
index c76f5010..94c825e1 100644
--- a/le-autoupgrade/package/DEBIAN/control
+++ b/le-autoupgrade/package/DEBIAN/control
@@ -1,7 +1,7 @@
 Package: le-autoupgrade
 Priority: important
 Section: main
-Version: 0.0.8
+Version: 0.0.9
 Architecture: all
 Depends: cron | anacron, apt, debianutils, wget
 Maintainer: LE Maintainer <le-maintainer@c3sl.ufpr.br>
diff --git a/le-autoupgrade/package/DEBIAN/postrm b/le-autoupgrade/package/DEBIAN/postrm
index 81b6da5c..f98cbe97 100755
--- a/le-autoupgrade/package/DEBIAN/postrm
+++ b/le-autoupgrade/package/DEBIAN/postrm
@@ -32,8 +32,7 @@ divertList="
 # Divert files
 if [[ "$1" != "upgrade" ]]; then
     for file in $divertList; do
-        if test -e $file.real; then
-            rm -f $file
+        if test -e ${file}.real; then
             dpkg-divert --package le-autoupgrade --remove --rename \
                         --divert $file{.real,}
         fi
-- 
GitLab