← Back to team overview

curtin-dev team mailing list archive

[Merge] ~dbungert/curtin:lp-2091689-autopurge into curtin:master

 

Dan Bungert has proposed merging ~dbungert/curtin:lp-2091689-autopurge into curtin:master.

Commit message:
distro: fix purge of packages from a PPA

As suggested by LP user icecream95, the sequence purge - autoremove may
fail if there are PPA packages involved.

LP: #2091689

Requested reviews:
  curtin developers (curtin-dev)
Related bugs:
  Bug #2091689 in curtin: "purge_packages broken for package not in repository"
  https://bugs.launchpad.net/curtin/+bug/2091689

For more details, see:
https://code.launchpad.net/~dbungert/curtin/+git/curtin/+merge/480201

Verified in VM test to not regress the kernel replacement logic, it would be nice to see confirmation that this addresses the PPA use case.
-- 
Your team curtin developers is requested to review the proposed merge of ~dbungert/curtin:lp-2091689-autopurge into curtin:master.
diff --git a/curtin/distro.py b/curtin/distro.py
index e6e13d5..17f5d2b 100644
--- a/curtin/distro.py
+++ b/curtin/distro.py
@@ -572,7 +572,7 @@ def purge_packages(pkglist, osfamily=None, opts=None, target=None, env=None):
 
     distro_cfg = {
         DISTROS.debian: {'function': run_apt_command,
-                         'subcommands': ('purge', 'autoremove')},
+                         'subcommands': ('autopurge', )},
     }
 
     purge_cmd = distro_cfg.get(osfamily)

Follow ups