+2005-12-19 Paul Varner <fuzzyray@gentoo.org>
+ * eclean: Add regular expression matching for exclude files (Bug 114365)
+
+2005-12-13 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Fix USE flag parsing. (Bug 115294)
+
2005-12-07 Paul Varner <fuzzyray@gentoo.org>
* revdep-rebuild: Fix revdep-rebuild to work with findutils-4.2.27.
(bug 111203)
be missed. (bug 97171)
2005-06-07 Paul Varner <fuzzyray@gentoo.org>
- * revdep-rebuild: Delete temporary files if the environment does not match the previous
- environment (bug 95274)
+ * revdep-rebuild: Delete temporary files if the environment does not
+ match the previous environment (bug 95274)
2005-06-05 Paul Varner <fuzzyray@gentoo.org>
* revdep-rebuild: Imported revdep-rebuild release from bug 62644
+2005-12-19 Paul Varner <fuzzyray@gentoo.org>
+ * Add support for reqular expression matching for file names in the
+ exclude files.
+
2005-08-28 Thomas de Grenier de Latour (tgl) <degrenier@easyconnect.fr>
* Version 0.4.1
* added support for some "eclean-dist" and "eclean-pkg" symlinks on eclean
else: raise ParseExcludeFileException("Invalid cat/pkg: "+mycp)
except: pass
#raise ParseExcludeFileException("Invalid line: "+line)
- excl_dict['garbage'][line] = None
+ try:
+ excl_dict['garbage'][line] = re.compile(line)
+ except:
+ try:
+ excl_dict['garbage'][line] = re.compile(re.escape(line))
+ except:
+ raise ParseExcludeFileException("Invalid file name/regular expression: "+line)
return excl_dict
continue
if time_limit and (file_stat[stat.ST_MTIME] >= time_limit):
continue
- if 'garbage' in exclude_dict and file in exclude_dict['garbage']:
- continue
+ if 'garbage' in exclude_dict:
+ # Try to match file name directly
+ if file in exclude_dict['garbage']:
+ file_match = True
+ # See if file matches via regular expression matching
+ else:
+ file_match = False
+ for file_entry in exclude_dict['garbage']:
+ if exclude_dict['garbage'][file_entry].match(file):
+ file_match = True
+ break
+
+ if file_match:
+ continue
# this is a candidate for cleaning
clean_dict[file]=[filepath]
# remove files owned by some protected packages