aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bersenev <bay@hackerdom.ru>2014-02-17 17:55:51 +0600
committerAlexander Bersenev <bay@hackerdom.ru>2014-02-17 17:55:51 +0600
commit5a3f506c9ef1cfd78940b0509f10ef94b4434e29 (patch)
tree147c35a17a8bcd8ff467bb3063adab623da51fac /portage_with_autodep/pym/portage/glsa.py
parentfixed a deadlock (diff)
downloadautodep-5a3f506c9ef1cfd78940b0509f10ef94b4434e29.tar.gz
autodep-5a3f506c9ef1cfd78940b0509f10ef94b4434e29.tar.bz2
autodep-5a3f506c9ef1cfd78940b0509f10ef94b4434e29.zip
updated portage to 2.2.8-r1
Diffstat (limited to 'portage_with_autodep/pym/portage/glsa.py')
-rw-r--r--portage_with_autodep/pym/portage/glsa.py23
1 files changed, 10 insertions, 13 deletions
diff --git a/portage_with_autodep/pym/portage/glsa.py b/portage_with_autodep/pym/portage/glsa.py
index a784d14..1857695 100644
--- a/portage_with_autodep/pym/portage/glsa.py
+++ b/portage_with_autodep/pym/portage/glsa.py
@@ -1,4 +1,4 @@
-# Copyright 2003-2011 Gentoo Foundation
+# Copyright 2003-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import absolute_import
@@ -17,7 +17,7 @@ from portage import os
from portage import _encodings
from portage import _unicode_decode
from portage import _unicode_encode
-from portage.versions import pkgsplit, catpkgsplit, pkgcmp, best
+from portage.versions import pkgsplit, vercmp, best
from portage.util import grabfile
from portage.const import CACHE_PATH
from portage.localization import _
@@ -372,17 +372,14 @@ def getMinUpgrade(vulnerableList, unaffectedList, portdbapi, vardbapi, minimize=
for u in unaffectedList:
mylist = match(u, portdbapi, match_type="match-all")
for c in mylist:
- c_pv = catpkgsplit(c)
- i_pv = catpkgsplit(best(v_installed))
- if pkgcmp(c_pv[1:], i_pv[1:]) > 0 \
+ i = best(v_installed)
+ if vercmp(c.version, i.version) > 0 \
and (rValue == None \
or not match("="+rValue, portdbapi) \
- or (minimize ^ (pkgcmp(c_pv[1:], catpkgsplit(rValue)[1:]) > 0)) \
+ or (minimize ^ (vercmp(c.version, rValue.version) > 0)) \
and match("="+c, portdbapi)) \
and portdbapi.aux_get(c, ["SLOT"]) == vardbapi.aux_get(best(v_installed), ["SLOT"]):
- rValue = c_pv[0]+"/"+c_pv[1]+"-"+c_pv[2]
- if c_pv[3] != "r0": # we don't like -r0 for display
- rValue += "-"+c_pv[3]
+ rValue = c
return rValue
def format_date(datestr):
@@ -488,7 +485,7 @@ class Glsa:
@type myfile: String
@param myfile: Filename to grab the XML data from
@rtype: None
- @returns: None
+ @return: None
"""
self.DOM = xml.dom.minidom.parse(myfile)
if not self.DOM.doctype:
@@ -634,7 +631,7 @@ class Glsa:
architectures.
@rtype: Boolean
- @returns: True if the system is affected, False if not
+ @return: True if the system is affected, False if not
"""
rValue = False
for k in self.packages:
@@ -654,7 +651,7 @@ class Glsa:
GLSA was already applied.
@rtype: Boolean
- @returns: True if the GLSA was applied, False if not
+ @return: True if the GLSA was applied, False if not
"""
return (self.nr in get_applied_glsas(self.config))
@@ -665,7 +662,7 @@ class Glsa:
applied or on explicit user request.
@rtype: None
- @returns: None
+ @return: None
"""
if not self.isApplied():
checkfile = io.open(