]> git.pld-linux.org Git - projects/pld-ftp-admin.git/blobdiff - bin/pfa-mvpkg
- added option to ignore the fact that a build isn't completed (src.builder
[projects/pld-ftp-admin.git] / bin / pfa-mvpkg
index ed322bb46017665bb930044d59ada2aafb878f83..cc295a4ff2960c30c77e116db47d7a8a42519990 100644 (file)
@@ -3,13 +3,20 @@
 
 import sys, os
 sys.path.insert(0, os.environ['HOME']+'/pld-ftp-admin/modules')
-from ftptree import FtpTree
+import ftptree
 from common import checkdir
 import ftpio
 
-if len(sys.argv) < 3:
+nocheckbuild=False
+if len(sys.argv) > 4 and sys.argv[1]=='-nb':
+    nocheckbuild=True
+    sys.argv=sys.argv[1:]
+
+if len(sys.argv) < 4:
     print "Not enough parameters given"
-    print "move.py src-tree dst-tree [package1, package2, ...]"
+    print "move.py [options] src-tree dst-tree package [package2 package3 ...]"
+    print "\nOptions:"
+    print "      -nb    Do not check if builds are finished.\n"
     sys.exit(1)
 
 checkdir(sys.argv[1])
@@ -27,13 +34,15 @@ if not ftpio.lock(sys.argv[2], True):
     sys.exit(1)
 
 try:
-    srctree=FtpTree(sys.argv[1], loadall=True)
-    dsttree=FtpTree(sys.argv[2])
+    srctree=ftptree.FtpTree(sys.argv[1], loadall=True)
+    dsttree=ftptree.FtpTree(sys.argv[2])
+    if nocheckbuild:
+        srctree.do_checkbuild=False
     srctree.mark4moving(sys.argv[3:])
 
     srctree.movepkgs(dsttree)
 except ftptree.SomeError:
-    # In case of problems we need to unlock the tree before exiting
+    # In case of problems we need to unlock the trees before exiting
     ftpio.unlock(sys.argv[1])
     ftpio.unlock(sys.argv[2])
     sys.exit(1)
This page took 0.123583 seconds and 4 git commands to generate.