]> code.delx.au - monosys/commitdiff
pacorphan/aptorphan: support excluding packages with ~pkgname in addition to ~filename
authorJames Bunton <jamesbunton@delx.net.au>
Wed, 24 Oct 2018 21:26:48 +0000 (08:26 +1100)
committerJames Bunton <jamesbunton@delx.net.au>
Wed, 24 Oct 2018 21:26:48 +0000 (08:26 +1100)
pacorphan

index 12d534ce49279719cff330de34aca788c58bc669..e34e6dad8402cc876304cade01a6711d80712d30 100755 (executable)
--- a/pacorphan
+++ b/pacorphan
@@ -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