]> git.pld-linux.org Git - projects/pld-ftp-admin.git/commitdiff
Don't write duplicate entries to package .info
authorJan Rękorajski <baggins@pld-linux.org>
Thu, 23 Oct 2014 18:52:11 +0000 (20:52 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Thu, 23 Oct 2014 18:52:11 +0000 (20:52 +0200)
bin/pfa-from-incoming

index 4b86b2be14f35320a2b43d17c2d37a4bcb11cce2..6523ea18aa9d90567780ec3715ec4aa76b5f356a 100755 (executable)
@@ -120,7 +120,8 @@ def move_noarch(f, arch, rpmfile, dstpkg):
                   (incoming_dir + arch + '/' + rpmfile, noarchcachedir, rpmfile))
         os.system("rpm -qRp %s | LC_ALL=C sort | LC_ALL=C uniq > %s/%s.reqlist" %
                   (incoming_dir + arch + '/' + rpmfile, noarchcachedir, rpmfile))
-        f.write("file:noarch:%s\ninfo:noarch_arch:%s:%s\n" % (rpmfile, rpmfile, arch))
+        if not dstpkg.files.has_key(arch):
+            f.write("file:noarch:%s\ninfo:noarch_arch:%s:%s\n" % (rpmfile, rpmfile, arch))
         mv(incoming_dir + arch + '/' + rpmfile, default_to + 'noarch/RPMS')
 
 def send_vr_msg(snvr, anvr, pkg, arch):
@@ -253,7 +254,8 @@ for arch in ftp_archs:
             if rpmfile[-11:] == '.noarch.rpm' and config.separate_noarch:
                 move_noarch(f, arch, rpmfile, dstpkg)
             else:
-                f.write("file:%s:%s\n" % (arch, rpmfile))
+                if not dstpkg.files.has_key(arch):
+                    f.write("file:%s:%s\n" % (arch, rpmfile))
                 srcfile = incoming_dir + arch + '/' + rpmfile
 
                 if is_debuginfo(rpmfile):
This page took 0.066891 seconds and 4 git commands to generate.