|
|
if update: | if update: |
rValue.append(update) | rValue.append(update) |
return rValue | return rValue |
|
|
|
def getVulnerablePackages(self, pkg): |
|
""" |
|
Returns the list of installed vulnerable packages. |
|
|
|
@type pkg: String |
|
@param pkg: Name of vulnerable package |
|
|
|
@rtype: List of Strings |
|
@return: list of installed vulnerable package versions |
|
""" |
|
|
|
rValue = [] |
|
pkg = portage.dep_getkey(pkg) |
|
for path in self.packages[pkg]: |
|
for atom in path["vul_atoms"]: |
|
pkglist = portage.db["/"]["vartree"].dbapi.match(atom) |
|
if pkglist: |
|
for x in pkglist: |
|
rValue.append(x) |
|
|
|
return rValue |