Validate the names of update files in order to filter out unwanted files such as...
authorZac Medico <zmedico@gentoo.org>
Tue, 21 Feb 2006 09:52:03 +0000 (09:52 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 21 Feb 2006 09:52:03 +0000 (09:52 -0000)
svn path=/main/trunk/; revision=2758

pym/portage.py

index 62cd9bdd266ff3e718a540af3ca02ff679bb0329..49f49ff8983c1d219ab3c7f6ec5f23fa2cfb59b8 100644 (file)
@@ -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]