Remove grabdict_package and grabfile_package from the core portage module since the...
authorZac Medico <zmedico@gentoo.org>
Fri, 21 Jul 2006 05:13:41 +0000 (05:13 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 21 Jul 2006 05:13:41 +0000 (05:13 -0000)
svn path=/main/trunk/; revision=3975

pym/portage.py
pym/portage_util.py

index f4f01c3e8db8e8396bd63d155b31143b0b65518c..68cdbff66106c5b7b7efa5fbf685eac785aa6914 100644 (file)
@@ -719,32 +719,6 @@ def new_protect_filename(mydest, newmd5=None):
        else:
                return (new_pfile, old_pfile)
 
-#XXX: These two are now implemented in portage_util.py but are needed here
-#XXX: until the isvalidatom() dependency is sorted out.
-
-def grabdict_package(myfilename,juststrings=0,recursive=0):
-       pkgs=grabdict(myfilename, juststrings=juststrings, empty=1,recursive=recursive)
-       for x in pkgs.keys():
-               if not isvalidatom(x):
-                       del(pkgs[x])
-                       writemsg("--- Invalid atom in %s: %s\n" % (myfilename, x),
-                               noiselevel=-1)
-       return pkgs
-
-def grabfile_package(myfilename,compatlevel=0,recursive=0):
-       pkgs=grabfile(myfilename,compatlevel,recursive=recursive)
-       for x in range(len(pkgs)-1,-1,-1):
-               pkg = pkgs[x]
-               if pkg[0] == "-":
-                       pkg = pkg[1:]
-               if pkg[0] == "*":
-                       pkg = pkg[1:]
-               if not isvalidatom(pkg):
-                       writemsg("--- Invalid atom in %s: %s\n" % (myfilename, pkgs[x]),
-                               noiselevel=-1)
-                       del(pkgs[x])
-       return pkgs
-
 # returns a tuple.  (version[string], error[string])
 # They are pretty much mutually exclusive.
 # Either version is a string and error is none, or
index 0002dc090350721ab2ea78f829854281d24e8fc1..8fa62c5a2ab7c192d1fa163014e032f982436492 100644 (file)
@@ -5,6 +5,7 @@
 from portage_exception import PortageException, FileNotFound, \
        OperationNotPermitted, PermissionDenied, ReadOnlyFileSystem
 import portage_exception
+from portage_dep import isvalidatom
 
 import sys,string,shlex,os,errno
 try: