summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-02-21 09:52:03 +0000
committerZac Medico <zmedico@gentoo.org>2006-02-21 09:52:03 +0000
commit5f8dfe70805ae23758bbb7a0ade3420684401293 (patch)
tree3383003cb5c7843493a4acbd7f618f35788b19cb
parent5689338ec9f785083e23ac20e2f6c26d8b3d8c11 (diff)
downloadportage-5f8dfe70805ae23758bbb7a0ade3420684401293.tar.gz
portage-5f8dfe70805ae23758bbb7a0ade3420684401293.tar.bz2
portage-5f8dfe70805ae23758bbb7a0ade3420684401293.zip
Validate the names of update files in order to filter out unwanted files such as CVS directories.
svn path=/main/trunk/; revision=2758
-rw-r--r--pym/portage.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 62cd9bdd2..49f49ff89 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -6882,6 +6882,8 @@ def update_config_files(update_iter):
def global_updates():
updpath = os.path.join(settings["PORTDIR"], "profiles", "updates")
mylist = listdir(updpath, EmptyOnError=1)
+ # validate the file name (filter out CVS directory, etc...)
+ mylist = [myfile for myfile in mylist if len(myfile) == 7 and myfile[1:2] == "Q-"]
if len(mylist) > 0:
# resort the list
mylist = [myfile[3:]+"-"+myfile[:2] for myfile in mylist]