re_nvr = re.compile('^(.*)-([^-]*)-([^-]*)\.rpm$')
dir = '/home/pld/admins/th/ftp/test/SRPMS/RPMS'
-ts = rpm.TransactionSet("", (rpm._RPMVSF_NOSIGNATURES or rpm.RPMVSF_NOHDRCHK or rpm._RPMVSF_NODIGESTS or rpm.RPMVSF_NEEDPAYLOAD))
+ignore = re.compile('^(kernel-.*)$')
+#|\
+#crash-.*|\
+#dahdi-linux-.*|\
+#e1000e-.*|\
+#igb-.*|\
+#ipset-.*|\
+#iscsitarget-.*|\
+#ixgbe-.*|\
+#kernel-net-wl-.*|\
+#lin_tape-.*|\
+#linux-fusion-.*|\
+#linuxrdac-.*|\
+#lirc-.*|\
+#lttng-modules-.*|\
+#madwifi-ng-.*|\
+#nvidiabl-.*|\
+#open-vm-tools-.*|\
+#openvswitch-.*|\
+#r8168-.*|\
+#spl-.*|\
+#tpm_emulator-.*|\
+#VirtualBox-.*|\
+#vpb-driver-.*|\
+#xorg-driver-video-fglrx-.*|\
+#xorg-driver-video-fglrx-legacy-.*|\
+#xorg-driver-video-nvidia-.*|\
+#xorg-driver-video-nvidia-legacy3-.*|\
+#xorg-driver-video-nvidia-legacy-304xx-.*|\
+#xtables-addons-.*)$')
+
+ts = rpm.TransactionSet("", (rpm.RPMVSF_NOHDRCHK or rpm.RPMVSF_NEEDPAYLOAD))
def compare(f1, f2):
try:
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
for i in dupes.iterkeys():
for old in find_old(dupes[i])[1:]:
+ print "removing: %s" % old
os.system("/home/pld/admins/th/pld-ftp-admin/scripts/remove.py test %s" % old)