Commit ebc4da01 authored by Alan's avatar Alan

ASP: actually fix package filtering

parent 63397628
......@@ -243,7 +243,7 @@ class ASPConfigApplication(Gtk.Application):
packages_with_description = []
for package in sorted(additional_packages):
package_name = filter_package_details(pkg)
package_name = filter_package_details(package)
try:
apt_package = apt_cache[package_name]
except KeyError:
......
......@@ -17,6 +17,7 @@ from tailslib import LIVE_USERNAME
from tailslib.additionalsoftware.config import (
add_additional_packages,
filter_package_details,
get_additional_packages,
get_packages_list_path,
remove_additional_packages)
......@@ -461,15 +462,15 @@ def apt_hook_post():
packages = json.load(f)
os.remove(ASP_STATE_PACKAGES)
additional_packages = get_additional_packages(search_new_persistence=True,
filter_details=True)
additional_packages = get_additional_packages(search_new_persistence=True)
apt_cache = apt.cache.Cache()
# Filter automatically installed packages and packages already configured
# as additional software
new_manually_installed_packages = set(filter(
lambda pkg: not apt_cache[pkg].is_auto_installed
and pkg not in additional_packages, # NOQA: E131
and pkg not in map(filter_package_details,
additional_packages), # NOQA: E131
set(packages["installed"])))
if new_manually_installed_packages:
handle_installed_packages(new_manually_installed_packages)
......
pythonlib @ 7b72784a
Subproject commit 88ef9933ff13cd301f041a9ea22ae323747c2ee3
Subproject commit 7b72784ac48dfb2b444d2f4331bf672446c8b906
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment