PkgInfo: make 'archs' config variable imply 'source' and 'all'

This commit is contained in:
GLolol 2014-11-18 14:46:44 -08:00
parent 3fa5773183
commit bbee6136ab
2 changed files with 7 additions and 5 deletions

View File

@ -49,11 +49,10 @@ def configure(advanced):
PkgInfo = conf.registerPlugin('PkgInfo')
conf.registerGlobalValue(PkgInfo, 'archs',
registry.CommaSeparatedListOfStrings(['i386','amd64','all'],
registry.CommaSeparatedListOfStrings(['i386','amd64'],
_("""Defines what architectures the bot will look for in the 'vlist'
command. It is recommended to include 'all' in this list because
some packages are architecture independent and will not otherwise be
displayed, leading to misleading "No results found" errors.""")))
command. Architectures 'all' (arch-independent packages) and 'source'
(source packages) are implied.""")))
conf.registerGlobalValue(PkgInfo, 'verbose',
registry.Boolean(True,
_("""Determines whether verbose output will be used (show architectures,

View File

@ -86,7 +86,10 @@ class PkgInfo(callbacks.Plugin):
return distro
def MadisonParse(self, pkg, dist, codenames='', suite='', useSource=False, reverse=False):
arch = ','.join(self.registryValue("archs"))
# The arch value implies 'all' (architecture-independent packages) and 'source'
# (source packages), in order to prevent misleading "Not found" errors.
arch = self.registryValue("archs") + ['all', 'source']
arch = ','.join(set(arch))
self.arg = {'package':pkg,'table':dist,'a':arch,'c':codenames,'s':suite,
}
if useSource: