]> git.pld-linux.org Git - projects/pld-ftp-admin.git/commitdiff
Skip (until next round) moving srpm or arch part of pkg if some file is missing.
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 27 Jan 2011 11:47:12 +0000 (11:47 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 27 Jan 2011 11:47:12 +0000 (11:47 +0000)
Changed files:
    bin/pfa-from-incoming -> 1.21

bin/pfa-from-incoming

index c8a009ec2cff2e0c22b968f1853b119ba520927d..b41bc15faa6809afb5ccb649006a38dc66a5bba4 100644 (file)
@@ -140,6 +140,10 @@ for uploadinfo in findfiles(incoming_dir + 'SRPMS'):
     pkg = BasePkg(uploadinfo[:-19], content = content)
     srpm = pkg.files['SRPMS'][0]
 
+    if not os.path.exists(incoming_dir + 'SRPMS/' + srpm):
+        ftpio.log("%s file missing; skipping move until next round" % (srpm))
+        continue
+
     if ftptree.has_key(`pkg`):
         ftpio.log("%s already present in %s; removing newer files" % (srpm, ftptree))
         rm(incoming_dir + 'SRPMS/' + srpm)
@@ -171,6 +175,12 @@ for arch in ftp_archs:
         if not ftptree.has_key(`srcpkg`):
             continue # We require the src.rpm to be present
 
+        rpmfile_missing = [f for f in srcpkg.files['ARCH'] if not os.path.exists(incoming_dir + arch + '/'+f)]
+        if len(rpmfile_missing):
+            for filem in rpmfile_missing:
+                ftpio.log("%s file missing; skipping move until next round" % (filem))
+            continue
+
         dstpkg = BasePkg(`srcpkg`, ftptree)
 
         if dstpkg.files.has_key(arch):
This page took 0.029346 seconds and 4 git commands to generate.