pkglistgen: log unsorted locale packages

For some yet to be determined reason, the namespaceprovider does not
pick up package that just provide eg. locale(ja). So find and and log
them (boo#1092055)
This commit is contained in:
Ludwig Nussel 2018-05-14 15:21:46 +02:00
parent 0429ee2f69
commit 5311708270

View File

@ -527,6 +527,7 @@ class PkgListGen(ToolBase.ToolBase):
def _check_supplements(self):
tocheck = set()
tocheck_locales = set()
for arch in self.architectures:
pool = self._prepare_pool(arch)
sel = pool.Selection()
@ -539,6 +540,11 @@ class PkgListGen(ToolBase.ToolBase):
if d.startswith('namespace:modalias') or d.startswith('namespace:filesystem'):
tocheck.add(s.name)
for l in self.locales:
i = pool.str2id('locale({})'.format(l))
for s in pool.whatprovides(i):
tocheck_locales.add(s.name)
all_grouped = set()
for g in self.groups.values():
if g.solved:
@ -549,6 +555,9 @@ class PkgListGen(ToolBase.ToolBase):
for p in tocheck - all_grouped:
logger.warn('package %s has supplements but is not grouped', p)
for p in tocheck_locales - all_grouped:
logger.warn('package %s provides supported locale but is not grouped', p)
def _prepare_pool(self, arch):
pool = solv.Pool()
pool.setarch(arch)