]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- process .cvsignore to get ignored distfiles and scripts
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 19 Aug 2010 12:50:23 +0000 (12:50 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    check-unused-files.py -> 1.13

check-unused-files.py

index 75e439da8add2b359e7a179b719707850088a005..68d19416c1f8e93927093c4405a81ee164d9fd35 100644 (file)
@@ -37,20 +37,29 @@ for l in out.split('\n'):
 
 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)
     if blacklisted(file):
This page took 0.032211 seconds and 4 git commands to generate.