From 3eedc73389ccef51f60a0ae2fcf8b70b1b139e85 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Sat, 11 Aug 2012 10:15:17 +0000 Subject: [PATCH 1/1] - except kernel and kernel module provider packages from cleaning Changed files: wwwbin/clean-dups.py -> 1.2 --- wwwbin/clean-dups.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/wwwbin/clean-dups.py b/wwwbin/clean-dups.py index a46eea5..1436cc8 100644 --- a/wwwbin/clean-dups.py +++ b/wwwbin/clean-dups.py @@ -12,6 +12,26 @@ re_rpm = re.compile(r'.*\.rpm$') re_nvr = re.compile('^(.*)-([^-]*)-([^-]*)\.rpm$') dir = '/home/pld/admins/th/ftp/test/SRPMS/RPMS' +ignore = re.compile('^(kernel-.*|\ + dahdi-linux-.*|\ + e1000e-.*|\ + igb-.*|\ + ipset-.*|\ + ixgbe-.*|\ + linuxrdac-.*|\ + lirc-.*|\ + madwifi-ng-.*|\ + open-vm-tools-.*|\ + r8168-.*|\ + VirtualBox-.*|\ + xorg-driver-video-fglrx-.*|\ + xorg-driver-video-fglrx-legacy-12.x-.*|\ + xorg-driver-video-nvidia-.*|\ + xtables-addons-.*|\ + iscsitarget-.*|\ + openvswitch-.*|\ + xorg-driver-video-nvidia-legacy3-.*)$') + ts = rpm.TransactionSet("", (rpm._RPMVSF_NOSIGNATURES or rpm.RPMVSF_NOHDRCHK or rpm._RPMVSF_NODIGESTS or rpm.RPMVSF_NEEDPAYLOAD)) def compare(f1, f2): @@ -65,6 +85,9 @@ for file in os.listdir(dir): if not re_rpm.match(file): continue + if ignore.match(file): + continue + m = re_nvr.match(file) if not m: print "problem with: %s" % file -- 2.44.0