1 Use GROUPS file from rpmlint (this project) package rather than rpm
3 --- rpmlint-rpmlint-1.9/Pkg.py~ 2016-06-29 20:07:39.000000000 +0300
4 +++ rpmlint-rpmlint-1.9/Pkg.py 2016-08-06 12:10:45.102344608 +0300
6 def get_default_valid_rpmgroups(filename=None):
8 Get default rpm groups from filename, or try to look them up from
9 - the rpm package (if installed) if no filename is given.
10 + the rpmlint package (if installed) if no filename is given.
15 - with InstalledPkg("rpm") as p:
16 + with InstalledPkg("rpmlint") as p:
17 groupsfiles = [x for x in p.files() if x.endswith('/GROUPS')]
19 filename = groupsfiles[0]
20 - except KeyError: # the rpm package might not be installed
21 + except KeyError: # the rpmlint package might not be installed
23 if filename and os.path.exists(filename):
24 with open(filename) as fobj: