comps-sync.py: Clarify the groups we get packages from
This commit is contained in:
parent
db352bcf69
commit
ffdc9c4f77
1 changed files with 16 additions and 15 deletions
|
@ -132,28 +132,29 @@ with open('comps-sync-exclude-list.yml', encoding='UTF-8') as f:
|
||||||
comps_desktop_exclude_list = doc['desktop_exclude_list']
|
comps_desktop_exclude_list = doc['desktop_exclude_list']
|
||||||
comps_exclude_list_all = [re.compile(x) for x in doc['exclude_list_all_regexp']]
|
comps_exclude_list_all = [re.compile(x) for x in doc['exclude_list_all_regexp']]
|
||||||
|
|
||||||
# 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
|
||||||
# can find packages not listed in comps *at all*, beyond
|
# listed in comps *at all*, beyond just the workstation environment.
|
||||||
# just the workstation environment.
|
|
||||||
comps = libcomps.Comps()
|
comps = libcomps.Comps()
|
||||||
comps.fromxml_f(args.src)
|
comps.fromxml_f(args.src)
|
||||||
|
|
||||||
# Parse the workstation-product environment, gathering
|
# Parse the workstation-product environment to get the list of comps groups to
|
||||||
# default or mandatory packages.
|
# get packages from.
|
||||||
ws_env_name = 'workstation-product-environment'
|
groups = []
|
||||||
ws_ostree_name = 'workstation-ostree-support'
|
for gid in comps.environments['workstation-product-environment'].group_ids:
|
||||||
ws_environ = comps.environments[ws_env_name]
|
|
||||||
ws_pkgs = {}
|
|
||||||
for gid in ws_environ.group_ids:
|
|
||||||
if gid.name in comps_exclude_list_groups:
|
if gid.name in comps_exclude_list_groups:
|
||||||
continue
|
continue
|
||||||
exclude_list = comps_exclude_list.get(gid.name, set())
|
groups.append(gid.name)
|
||||||
ws_pkgs = load_packages_from_comps_group(ws_pkgs, comps, gid.name, exclude_list, comps_exclude_list_all)
|
|
||||||
|
|
||||||
exclude_list = comps_exclude_list.get(ws_ostree_name, set())
|
# Always include the packages from the workstation-ostree-support group
|
||||||
ws_pkgs = load_packages_from_comps_group(ws_pkgs, comps, ws_ostree_name, exclude_list, comps_exclude_list_all)
|
groups.append('workstation-ostree-support')
|
||||||
|
|
||||||
(comps_unknown, pkgs_added) = compare_comps_manifest_package_lists(ws_pkgs, manifest_packages)
|
# Get the packages from those groups, filtering the ones we don't need
|
||||||
|
comps_group_pkgs = {}
|
||||||
|
for group in groups:
|
||||||
|
exclude_list = comps_exclude_list.get(group, set())
|
||||||
|
comps_group_pkgs = load_packages_from_comps_group(comps_group_pkgs, comps, group, exclude_list, comps_exclude_list_all)
|
||||||
|
|
||||||
|
(comps_unknown, pkgs_added) = compare_comps_manifest_package_lists(comps_group_pkgs, manifest_packages)
|
||||||
|
|
||||||
n_manifest_new = len(comps_unknown)
|
n_manifest_new = len(comps_unknown)
|
||||||
n_comps_new = len(pkgs_added)
|
n_comps_new = len(pkgs_added)
|
||||||
|
|
Loading…
Reference in a new issue