From: James Bunton Date: Wed, 24 Oct 2018 21:26:48 +0000 (+1100) Subject: pacorphan/aptorphan: support excluding packages with ~pkgname in addition to ~filename X-Git-Url: https://code.delx.au/monosys/commitdiff_plain/2225f2c892f1f4f13a342a165c7b6f4dab2b9d9a pacorphan/aptorphan: support excluding packages with ~pkgname in addition to ~filename --- diff --git a/pacorphan b/pacorphan index 12d534c..e34e6da 100755 --- 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