diff options
author | Jason Stubbs <jstubbs@gentoo.org> | 2005-09-29 16:41:34 +0000 |
---|---|---|
committer | Jason Stubbs <jstubbs@gentoo.org> | 2005-09-29 16:41:34 +0000 |
commit | 98dd424c0a71e186e8ceb119afa433925d0c687f (patch) | |
tree | 58a6f665a3c90264ce71fcdb0ae32ab50dcf4c20 | |
parent | 87906bed2f403a103bd004b0415e9a7db9db1e32 (diff) | |
download | portage-98dd424c0a71e186e8ceb119afa433925d0c687f.tar.gz portage-98dd424c0a71e186e8ceb119afa433925d0c687f.tar.bz2 portage-98dd424c0a71e186e8ceb119afa433925d0c687f.zip |
Ignore files (such as metadata.xml) within portdir category dirs.
svn path=/main/branches/2.0/; revision=2059
-rw-r--r-- | pym/portage.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pym/portage.py b/pym/portage.py index 8da8712bc..0c399295c 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -272,7 +272,7 @@ def cacheddir(my_original_path, ignorecvs, ignorelist, EmptyOnError, followSymli def listdir(mypath, recursive=False, filesonly=False, ignorecvs=False, ignorelist=[], followSymlinks=True, - EmptyOnError=False): + EmptyOnError=False, dirsonly=False): list, ftype = cacheddir(mypath, ignorecvs, ignorelist, EmptyOnError, followSymlinks) @@ -302,6 +302,11 @@ def listdir(mypath, recursive=False, filesonly=False, ignorecvs=False, ignorelis for x in range(0,len(ftype)): if ftype[x]==0: rlist=rlist+[list[x]] + elif dirsonly: + rlist = [] + for x in range(0, len(ftype)): + if ftype[x] == 1: + rlist = rlist + [list[x]] else: rlist=list @@ -5547,8 +5552,7 @@ class portdbapi(dbapi): d={} for x in self.mysettings.categories: for oroot in self.porttrees: - for y in listdir(oroot+"/"+x,EmptyOnError=1,ignorecvs=1): - mykey=x+"/"+y + for y in listdir(oroot+"/"+x,EmptyOnError=1,ignorecvs=1,dirsonly=1): d[x+"/"+y] = None l = d.keys() l.sort() |