mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-04-27 13:31:10 -05:00
PkgInfo: make 'archs' config variable imply 'source' and 'all'
This commit is contained in:
parent
3fa5773183
commit
bbee6136ab
@ -49,11 +49,10 @@ def configure(advanced):
|
|||||||
|
|
||||||
PkgInfo = conf.registerPlugin('PkgInfo')
|
PkgInfo = conf.registerPlugin('PkgInfo')
|
||||||
conf.registerGlobalValue(PkgInfo, 'archs',
|
conf.registerGlobalValue(PkgInfo, 'archs',
|
||||||
registry.CommaSeparatedListOfStrings(['i386','amd64','all'],
|
registry.CommaSeparatedListOfStrings(['i386','amd64'],
|
||||||
_("""Defines what architectures the bot will look for in the 'vlist'
|
_("""Defines what architectures the bot will look for in the 'vlist'
|
||||||
command. It is recommended to include 'all' in this list because
|
command. Architectures 'all' (arch-independent packages) and 'source'
|
||||||
some packages are architecture independent and will not otherwise be
|
(source packages) are implied.""")))
|
||||||
displayed, leading to misleading "No results found" errors.""")))
|
|
||||||
conf.registerGlobalValue(PkgInfo, 'verbose',
|
conf.registerGlobalValue(PkgInfo, 'verbose',
|
||||||
registry.Boolean(True,
|
registry.Boolean(True,
|
||||||
_("""Determines whether verbose output will be used (show architectures,
|
_("""Determines whether verbose output will be used (show architectures,
|
||||||
|
@ -86,7 +86,10 @@ class PkgInfo(callbacks.Plugin):
|
|||||||
return distro
|
return distro
|
||||||
|
|
||||||
def MadisonParse(self, pkg, dist, codenames='', suite='', useSource=False, reverse=False):
|
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,
|
self.arg = {'package':pkg,'table':dist,'a':arch,'c':codenames,'s':suite,
|
||||||
}
|
}
|
||||||
if useSource:
|
if useSource:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user