Fix interaction between ignorelist and ignorecvs parameters inside cacheddir().
authorZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 03:21:01 +0000 (03:21 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 03:21:01 +0000 (03:21 -0000)
Thanks to Christian Ruppert for reporting. (trunk r12544)

svn path=/main/branches/2.1.6/; revision=12830

pym/portage/__init__.py

index 97ee03ec516a37b5b587b4cb3e8fbab07335f6c1..a468146ca8d64652f93f2019c1d95995d3747aa0 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])