From b2db5bf3658f33dfaf3261bdc73f41be72acd374 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 22 Feb 2019 10:59:47 +0100 Subject: [PATCH] Do not mark direct dependencies of ubiquity as auto installed This caused cryptsetup to remain auto on the installed system LP: #1801629 --- debian/changelog | 7 +++++++ minimize-manual | 13 ++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 08c914cc..f59073fe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (2.566) UNRELEASED; urgency=medium + + * Do not mark direct dependencies of ubiquity as auto installed. This caused + cryptsetup to remain auto on the installed system (LP: #1801629) + + -- Julian Andres Klode Fri, 22 Feb 2019 10:58:48 +0100 + livecd-rootfs (2.565) disco; urgency=medium * Also drop dependency on python. diff --git a/minimize-manual b/minimize-manual index 6bd18780..ccb17f09 100755 --- a/minimize-manual +++ b/minimize-manual @@ -23,6 +23,7 @@ def main(): roots = set(pkg for pkg in cache if is_root(pkg)) workset = set(roots) seen = set() + ubiquity_depends = set() with cache.actiongroup(): while True: @@ -33,7 +34,7 @@ def main(): for pkg in sorted(to_proc): print(" Visiting", pkg, file=sys.stderr) - if pkg not in roots: + if pkg not in roots and pkg not in ubiquity_depends: pkg.mark_auto() for dep in (pkg.installed.dependencies + @@ -41,6 +42,16 @@ def main(): for bdep in dep.or_dependencies: for ver in bdep.target_versions: if ver.package.is_installed: + if pkg.name == "ubiquity": + ubiquity_depends.add(ver.package) + if pkg.name != "ubiquity": + # Reprocess this package again, as we did not mark it when we visited it from ubiquity + try: + ubiquity_depends.remove(ver.package) + # This will raise the KeyError here if ubiquity did not depend on it + seen.remove(ver.package) + except KeyError: + continue workset.add(ver.package) seen.add(pkg)