本文整理汇总了Python中PackageUtils.PackageUtils.findInstalledRPMPackages方法的典型用法代码示例。如果您正苦于以下问题:Python PackageUtils.findInstalledRPMPackages方法的具体用法?Python PackageUtils.findInstalledRPMPackages怎么用?Python PackageUtils.findInstalledRPMPackages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PackageUtils.PackageUtils
的用法示例。
在下文中一共展示了PackageUtils.findInstalledRPMPackages方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: findInstalledPackages
# 需要导入模块: from PackageUtils import PackageUtils [as 别名]
# 或者: from PackageUtils.PackageUtils import findInstalledRPMPackages [as 别名]
def findInstalledPackages(self,chrootID):
pkgUtils = PackageUtils(self.logName,self.logPath)
listInstalledRPMs=pkgUtils.findInstalledRPMPackages(chrootID)
listInstalledPackages=[]
for installedRPM in listInstalledRPMs:
packageName=self.findPackageNameFromRPMFile(installedRPM)
if packageName is not None:
listInstalledPackages.append(packageName)
return listInstalledPackages
示例2: _findInstalledPackages
# 需要导入模块: from PackageUtils import PackageUtils [as 别名]
# 或者: from PackageUtils.PackageUtils import findInstalledRPMPackages [as 别名]
def _findInstalledPackages(self, sandbox):
pkgUtils = PackageUtils(self.logName, self.logPath)
listInstalledRPMs = pkgUtils.findInstalledRPMPackages(sandbox)
listInstalledPackages = []
for installedRPM in listInstalledRPMs:
pkg = self._findPackageNameAndVersionFromRPMFile(installedRPM)
if pkg is not None:
listInstalledPackages.append(pkg)
return listInstalledPackages, listInstalledRPMs
示例3: _findInstalledPackages
# 需要导入模块: from PackageUtils import PackageUtils [as 别名]
# 或者: from PackageUtils.PackageUtils import findInstalledRPMPackages [as 别名]
def _findInstalledPackages(self, instanceID):
pkgUtils = PackageUtils(self.logName, self.logPath)
if self.pkgBuildType == "chroot":
listInstalledRPMs = pkgUtils.findInstalledRPMPackages(instanceID)
elif self.pkgBuildType == "container":
listInstalledRPMs = pkgUtils.findInstalledRPMPackagesInContainer(instanceID)
listInstalledPackages = []
for installedRPM in listInstalledRPMs:
packageName = self._findPackageNameFromRPMFile(installedRPM)
if packageName is not None:
listInstalledPackages.append(packageName)
return listInstalledPackages, listInstalledRPMs