Fix interaction between ignorelist and ignorecvs parameters inside cacheddir().
authorZac Medico <zmedico@gentoo.org>
Thu, 22 Jan 2009 00:43:44 +0000 (00:43 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 22 Jan 2009 00:43:44 +0000 (00:43 -0000)
Thanks to Christian Ruppert for reporting.

svn path=/main/trunk/; revision=12544

pym/portage/__init__.py

index 19a0ab6562eef8a923b9d6b8414943527c030294..77254bad4b19cd17737354d097530cbbf46e3ed3 100644 (file)
@@ -252,10 +252,13 @@ def cacheddir(my_original_path, ignorecvs, ignorelist, EmptyOnError, followSymli
        ret_list = []
        ret_ftype = []
        for x in range(0, len(list)):
-               if(ignorecvs and (len(list[x]) > 2) and (list[x][:2]!=".#")):
-                       ret_list.append(list[x])
-                       ret_ftype.append(ftype[x])
-               elif (list[x] not in ignorelist):
+               if list[x] in ignorelist:
+                       pass
+               elif ignorecvs:
+                       if list[x][:2] != ".#":
+                               ret_list.append(list[x])
+                               ret_ftype.append(ftype[x])
+               else:
                        ret_list.append(list[x])
                        ret_ftype.append(ftype[x])