comps-sync: Blacklist PackageKit globally
We were trying to be accurate by filtering by group but PackageKit is spread across all of them and has various subpackages, so just add a global regexp-based blacklist. This doesn't actually drop PK yet because `gnome-software` hard requires it, but is prep for fixing that.
This commit is contained in:
parent
d2b8aa6080
commit
87b6aac201
3 changed files with 16 additions and 8 deletions
|
@ -13,6 +13,10 @@ blacklist_groups:
|
||||||
- gnome-desktop
|
- gnome-desktop
|
||||||
- container-management
|
- container-management
|
||||||
|
|
||||||
|
# PackageKit is spread across various groups
|
||||||
|
blacklist_all_regexp:
|
||||||
|
- "PackageKit.*"
|
||||||
|
|
||||||
# Common blacklist for all ostree desktop versions
|
# Common blacklist for all ostree desktop versions
|
||||||
blacklist:
|
blacklist:
|
||||||
core:
|
core:
|
||||||
|
@ -107,9 +111,6 @@ desktop_blacklist:
|
||||||
gnome-desktop:
|
gnome-desktop:
|
||||||
# https://github.com/pbrezina/authselect/issues/48
|
# https://github.com/pbrezina/authselect/issues/48
|
||||||
- fprintd-pam
|
- fprintd-pam
|
||||||
# We use rpm-ostree for the host
|
|
||||||
- PackageKit-command-not-found
|
|
||||||
- PackageKit-gtk3-module
|
|
||||||
# Non-critical apps -> Flatpak
|
# Non-critical apps -> Flatpak
|
||||||
- baobab
|
- baobab
|
||||||
- cheese
|
- cheese
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# which are not mentioned in comps, and add packages from
|
# which are not mentioned in comps, and add packages from
|
||||||
# comps.
|
# comps.
|
||||||
|
|
||||||
import os, sys, subprocess, argparse, shlex, json, yaml
|
import os, sys, subprocess, argparse, shlex, json, yaml, re
|
||||||
import libcomps
|
import libcomps
|
||||||
|
|
||||||
def fatal(msg):
|
def fatal(msg):
|
||||||
|
@ -49,6 +49,13 @@ with open('comps-sync-blacklist.yml') as f:
|
||||||
comps_whitelist = doc['whitelist']
|
comps_whitelist = doc['whitelist']
|
||||||
comps_blacklist_groups = doc['blacklist_groups']
|
comps_blacklist_groups = doc['blacklist_groups']
|
||||||
comps_desktop_blacklist = doc['desktop_blacklist']
|
comps_desktop_blacklist = doc['desktop_blacklist']
|
||||||
|
comps_blacklist_all = [re.compile(x) for x in doc['blacklist_all_regexp']]
|
||||||
|
|
||||||
|
def is_blacklisted(pkgname):
|
||||||
|
for br in comps_blacklist_all:
|
||||||
|
if br.match(pkgname):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
# Parse comps, and build up a set of all packages so we
|
# Parse comps, and build up a set of all packages so we
|
||||||
# can find packages not listed in comps *at all*, beyond
|
# can find packages not listed in comps *at all*, beyond
|
||||||
|
@ -72,7 +79,7 @@ for gid in ws_environ.group_ids:
|
||||||
if pkg.type not in (libcomps.PACKAGE_TYPE_DEFAULT,
|
if pkg.type not in (libcomps.PACKAGE_TYPE_DEFAULT,
|
||||||
libcomps.PACKAGE_TYPE_MANDATORY):
|
libcomps.PACKAGE_TYPE_MANDATORY):
|
||||||
continue
|
continue
|
||||||
if pkgname in blacklist:
|
if pkgname in blacklist or is_blacklisted(pkgname):
|
||||||
continue
|
continue
|
||||||
pkgdata = ws_pkgs.get(pkgname)
|
pkgdata = ws_pkgs.get(pkgname)
|
||||||
if pkgdata is None:
|
if pkgdata is None:
|
||||||
|
@ -84,6 +91,7 @@ for gid in ws_environ.group_ids:
|
||||||
|
|
||||||
ws_ostree_pkgs = set()
|
ws_ostree_pkgs = set()
|
||||||
for pkg in comps.groups_match(id=ws_ostree_name)[0].packages:
|
for pkg in comps.groups_match(id=ws_ostree_name)[0].packages:
|
||||||
|
if not is_blacklisted(pkg.name):
|
||||||
ws_ostree_pkgs.add(pkg.name)
|
ws_ostree_pkgs.add(pkg.name)
|
||||||
|
|
||||||
comps_unknown = set()
|
comps_unknown = set()
|
||||||
|
@ -137,7 +145,7 @@ for desktop in [ 'gnome-desktop', 'kde-desktop', 'xfce-desktop', 'lxqt-desktop',
|
||||||
for pkg in comps.groups_match(id=desktop)[0].packages:
|
for pkg in comps.groups_match(id=desktop)[0].packages:
|
||||||
pkgname = pkg.name
|
pkgname = pkg.name
|
||||||
blacklist = comps_desktop_blacklist.get(desktop, set())
|
blacklist = comps_desktop_blacklist.get(desktop, set())
|
||||||
if pkgname in blacklist:
|
if pkgname in blacklist or is_blacklisted(pkgname):
|
||||||
continue
|
continue
|
||||||
comps_group_pkgs.add(pkg.name)
|
comps_group_pkgs.add(pkg.name)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ packages:
|
||||||
- NetworkManager-config-connectivity-fedora
|
- NetworkManager-config-connectivity-fedora
|
||||||
- NetworkManager-wifi
|
- NetworkManager-wifi
|
||||||
- NetworkManager-wwan
|
- NetworkManager-wwan
|
||||||
- PackageKit-gstreamer-plugin
|
|
||||||
- aajohan-comfortaa-fonts
|
- aajohan-comfortaa-fonts
|
||||||
- abattis-cantarell-fonts
|
- abattis-cantarell-fonts
|
||||||
- acl
|
- acl
|
||||||
|
|
Loading…
Reference in a new issue