本文整理匯總了Python中tracker.Tracker.bestPackagesFromList方法的典型用法代碼示例。如果您正苦於以下問題:Python Tracker.bestPackagesFromList方法的具體用法?Python Tracker.bestPackagesFromList怎麽用?Python Tracker.bestPackagesFromList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類tracker.Tracker
的用法示例。
在下文中一共展示了Tracker.bestPackagesFromList方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: len
# 需要導入模塊: from tracker import Tracker [as 別名]
# 或者: from tracker.Tracker import bestPackagesFromList [as 別名]
sys.exit(1)
package_list = track.pkgSack.returnPackages(repoid=repoid)
else:
package_list = track.pkgSack.returnPackages()
exactmatch, matched, unmatched = yum.packages.parsePackages(
package_list,
[pa]
)
logging.debug("exactmatch %s" % ' '.join([str(s) for s in exactmatch]))
if unmatched:
logging.critical("package %s not found" % pa)
sys.exit(1)
exactmatch = track.bestPackagesFromList(exactmatch)
if len(exactmatch) == 2:
if exactmatch[0].pkgtup[0].endswith('-devel'):
if exactmatch[1].pkgtup[0].endswith('-devel'):
exactmatch = exactmatch[0:1]
if not options.urls:
if repoid:
logging.info(
"found package(s) %s in repository %s" %
(' '.join([str(n) for n in exactmatch]), repoid))
else:
logging.info(
"found package(s) %s" %
' '.join([str(n) for n in exactmatch]))
else: