check-missing: fix --update to actually work

A few leftovers from my last work on this script. I didn't use
the --update mode then, obviously.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2023-01-31 12:09:14 -08:00
parent 2a52f9a8bf
commit 69bef5b701

View File

@ -70,7 +70,7 @@ for pkgreq in pkgreqs:
if missing == list(ARCHES):
if pkgreq.getparent() is not None:
removedpkgs[pkgname].append(grpid)
# pkgreq.getparent().remove(pkgreq)
pkgreq.getparent().remove(pkgreq)
elif missing and reqtype != 'optional':
archpkgs[pkgname] = ','.join(present)
@ -138,4 +138,4 @@ for lang in removedlang:
# Write out the updated XML file if desired
if args.update:
tree.write(latest, encoding="UTF-8", xml_declaration=True)
tree.write(compsfile, encoding="UTF-8", xml_declaration=True)