summaryrefslogtreecommitdiffstats
path: root/pym/portage.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage.py')
-rw-r--r--pym/portage.py36
1 files changed, 1 insertions, 35 deletions
diff --git a/pym/portage.py b/pym/portage.py
index cb8e239a9..83aa0c993 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -91,7 +91,7 @@ try:
from portage_checksum import perform_md5,perform_checksum,prelink_capable
import eclass_cache
from portage_localization import _
- from portage_update import fixdbentries, update_dbentries, grab_updates
+ from portage_update import fixdbentries, grab_updates, parse_updates, update_dbentries
# Need these functions directly in portage namespace to not break every external tool in existence
from portage_versions import ververify,vercmp,catsplit,catpkgsplit,pkgsplit,pkgcmp
@@ -6703,40 +6703,6 @@ def getvirtuals(myroot):
writemsg("--- DEPRECATED call to getvirtual\n")
return settings.getvirtuals(myroot)
-def parse_updates(mycontent):
- """Valid updates are returned as a list of split update commands."""
- myupd = []
- errors = []
- mylines = mycontent.splitlines()
- for myline in mylines:
- mysplit = myline.split()
- if len(mysplit) == 0:
- continue
- if mysplit[0] not in ("move", "slotmove"):
- errors.append("ERROR: Update type not recognized '%s'" % myline)
- continue
- if mysplit[0]=="move":
- if len(mysplit)!=3:
- errors.append("ERROR: Update command invalid '%s'" % myline)
- continue
- orig_value, new_value = mysplit[1], mysplit[2]
- for cp in (orig_value, new_value):
- if not (isvalidatom(cp) and isjustname(cp)):
- errors.append("ERROR: Malformed update entry '%s'" % myline)
- continue
- if mysplit[0]=="slotmove":
- if len(mysplit)!=4:
- errors.append("ERROR: Update command invalid '%s'" % myline)
- continue
- pkg, origslot, newslot = mysplit[1], mysplit[2], mysplit[3]
- if not isvalidatom(pkg):
- errors.append("ERROR: Malformed update entry '%s'" % myline)
- continue
-
- # The list of valid updates is filtered by continue statements above.
- myupd.append(mysplit)
- return myupd, errors
-
def commit_mtimedb(mydict=None, filename=None):
if mydict is None:
global mtimedb