packages: check-unused-files.py - process .cvsignore to get ignored distfil...

glen glen at pld-linux.org
Thu Aug 19 14:50:29 CEST 2010


Author: glen                         Date: Thu Aug 19 12:50:28 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- process .cvsignore to get ignored distfiles and scripts

---- Files affected:
packages:
   check-unused-files.py (1.12 -> 1.13) 

---- Diffs:

================================================================
Index: packages/check-unused-files.py
diff -u packages/check-unused-files.py:1.12 packages/check-unused-files.py:1.13
--- packages/check-unused-files.py:1.12	Thu Aug 19 13:34:31 2010
+++ packages/check-unused-files.py	Thu Aug 19 14:50:23 2010
@@ -37,19 +37,28 @@
 
 obsolete = []
 
+# files to exclude
+exclude = ['log.*', '.#*', '*~', '*.orig', '*.sw?']
+
+# read .cvsignore, distfiles files are filled there
+if os.path.isfile('%s/.cvsignore' % dir):
+    f = open('%s/.cvsignore' % dir , 'r')
+    for l in f.readlines():
+        exclude.append(l.rstrip())
+
 def blacklisted(file):
     if file == os.path.basename(spec):
         return True
 
-    if file in [ '.', '..', 'CVS', '.cvsignore', 'dropin', 'md5', 'adapter', 'builder', 'pldnotify.awk',
-            'relup.sh', 'compile.sh', 'repackage.sh', 'pearize.sh', 'rsync.sh', 'TODO']:
+    if file in [ '.', '..', 'CVS', 'TODO']:
         return True
 
-    for pat in ['log.*', '.#*', '*~', '*.orig', '*.sw?']:
+    for pat in exclude:
         if fnmatch.fnmatch(file, pat):
             return True
 
     return False
+
 
 for file in os.listdir(dir):
     file = os.path.basename(file)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/check-unused-files.py?r1=1.12&r2=1.13&f=u



More information about the pld-cvs-commit mailing list