You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.3 KiB

commit b586ff502946fbd3271db8370cb546f696c51cfd
Author: Michal Domonkos <mdomonko@redhat.com>
Date: Fri Oct 20 19:47:36 2017 +0200
verifytree: handle no @core group gracefully. BZ 1349433
It's not clear to me whether @core group is really mandatory, however
let's make verifytree fail if it's not defined so that we don't change
the return code to 0 for that case; we would return 1 previously (python
traceback) and now we OR the BAD_COMPS flag which is 4 (still not 1 but
at least non-zero).
diff --git a/verifytree.py b/verifytree.py
index 6a127cd..603a633 100755
--- a/verifytree.py
+++ b/verifytree.py
@@ -278,7 +278,14 @@ def main():
elif not (retval & BAD_COMPS or opts.nocomps):
print "Checking mandatory @core packages"
group = my.comps.return_group('core')
- for pname in group.mandatory_packages:
+ if group is not None:
+ pkgs = group.mandatory_packages
+ else:
+ print " @core group not found"
+ retval = retval | BAD_COMPS
+ report('COMPS','FAILED')
+ pkgs = []
+ for pname in pkgs:
# FIXME: this pulls from pkgSack, which (I guess) is populated
# based on the arch etc. of the current host.. so you can't check
# the x86_64 repo from an i386 machine, f'rinstance.