From 895da9302ba17779f44170132c485e0fb565e320 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 21 Jul 2006 05:13:41 +0000 Subject: [PATCH] Remove grabdict_package and grabfile_package from the core portage module since the copies in portage_util can now work by importing isvalidatom from portage_dep. svn path=/main/trunk/; revision=3975 --- pym/portage.py | 26 -------------------------- pym/portage_util.py | 1 + 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/pym/portage.py b/pym/portage.py index f4f01c3e8..68cdbff66 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -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 diff --git a/pym/portage_util.py b/pym/portage_util.py index 0002dc090..8fa62c5a2 100644 --- a/pym/portage_util.py +++ b/pym/portage_util.py @@ -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: -- 2.26.2