[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.3.0-16-gadefdb5



The following commit has been merged in the master branch:
commit adefdb597a91e906505ab765f85477daed536ae8
Author: Raphael Geissert <atomo64@gmail.com>
Date:   Mon Dec 28 13:26:54 2009 -0600

    Properly remove old files in unpacked collection script
    
    All collection scripts must cleanup any file they might have left
    behind in a previous successful or failed call.

diff --git a/collection/unpacked b/collection/unpacked
index d2a7303..1085f3c 100755
--- a/collection/unpacked
+++ b/collection/unpacked
@@ -33,11 +33,16 @@ use Util;
 my $pkg = shift;
 my $type = shift;
 
-if ($type =~ m/^remove-/) {
-    delete_dir("unpacked/");
-    if (-d "unpacked/") {
+if (-d "unpacked/") {
+    delete_dir("unpacked/") or
 	fail("failed to remove unpacked directory of $pkg");
-    }
+}
+if (-f "unpacked-errors") {
+    unlink("unpacked-errors") or
+	fail("failed to remove unpacked-errors file of $pkg");
+}
+# If we are asked to only remove the files stop right here
+if ($type =~ m/^remove-/) {
     exit 0;
 }
 

-- 
Debian package checker


Reply to: