check-missing: don't print optional packages with missing arches

It doesn't make sense to me to worry about specifying the
correct arch list for optional packages. Optional packages are
optional by definition, so it seems fine to just specify them
and if they don't exist on the arch right now, oh well. This
way, if they do start building for the arch in future, they will
be picked up right away with no need to change comps.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2022-09-01 15:56:26 -07:00 committed by kevin
parent 4a79db6c0e
commit ead605ead2

View File

@ -40,6 +40,7 @@ pkgreqs = root.findall('.//packagereq')
removedpkgs = defaultdict(list)
archpkgs = defaultdict(list)
for pkgreq in pkgreqs:
reqtype = pkgreq.get('type', '')
# list of arches the package is missing on
missing = []
present = []
@ -65,9 +66,9 @@ for pkgreq in pkgreqs:
if missing == list(ARCHES):
if pkgreq.getparent() is not None:
removedpkgs[pkgname].append(grpid)
pkgreq.getparent().remove(pkgreq)
elif missing:
archpkgs[pkgname] = ', '.join(present)
# pkgreq.getparent().remove(pkgreq)
elif missing and reqtype != 'optional':
archpkgs[pkgname] = ','.join(present)
# Find empty groups after packages not in repositories have been removed
pkglists = root.findall('.//packagelist')