]> code.delx.au - monosys/blobdiff - pacorphan
docker-cleanup: also delete things more than 1 year old
[monosys] / pacorphan
index 00f2f0f33dcd410eaaf3cef48df55fe3c0654c15..e34e6dad8402cc876304cade01a6711d80712d30 100755 (executable)
--- a/pacorphan
+++ b/pacorphan
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 
 import codecs
 import subprocess
@@ -130,12 +130,13 @@ def load_keep_pkg_list(name):
             pkg = strip_comment(pkg).strip()
             if not pkg:
                 continue
-            if filename[0] != "~":
+            if filename[0] != "~" and pkg[0] != "~":
                 if pkg in result:
                     print("# Duplicate entry:", pkg, "in file", filename)
                     continue
                 result.append(pkg)
             else:
+                pkg = pkg.strip("~")
                 if pkg not in result:
                     print("# Redundant removal:", pkg, "in file", filename)
                     continue