[projects/pld-ftp-admin] ftptree: ask for the builder queue check per call, not by a tree flag

arekm arekm at pld-linux.org
Thu Nov 12 00:28:56 CET 2026


commit 7f943f0937e4f0d9603e07d45edc157e21688860
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Nov 11 23:23:34 2026 +0100

    ftptree: ask for the builder queue check per call, not by a tree flag
    
    Whether a move or a removal asks the builder queue was a flag the
    scripts set on the tree after creating it, read in three methods.
    testmove(), movepkgs() and removepkgs() now take it as the checkbuild
    argument. No change in behaviour.

 bin/pfa-mvpkg        |  4 +---
 bin/pfa-rmpkg        |  4 +---
 bin/pfa-testmvpkg    |  4 +---
 modules/ftptree.py   | 14 ++++++--------
 wwwbin/clean-dups.py |  1 -
 5 files changed, 9 insertions(+), 18 deletions(-)
---
diff --git a/bin/pfa-mvpkg b/bin/pfa-mvpkg
index e10811a..1e971a7 100755
--- a/bin/pfa-mvpkg
+++ b/bin/pfa-mvpkg
@@ -57,12 +57,10 @@ try:
         archivetree = ftptree.FtpTree(archivetreename)
     else:
         archivetree = None
-    if nocheckbuild:
-        srctree.do_checkbuild = False
     pkgs = list(set(args.packages))
     srctree.mark4moving(pkgs)
 
-    srctree.movepkgs(dsttree, archivetree = archivetree)
+    srctree.movepkgs(dsttree, archivetree = archivetree, checkbuild = not nocheckbuild)
 except ftptree.SomeError:
     sys.exit(1)
 finally:
diff --git a/bin/pfa-rmpkg b/bin/pfa-rmpkg
index 91d4f5c..41d66a7 100755
--- a/bin/pfa-rmpkg
+++ b/bin/pfa-rmpkg
@@ -31,11 +31,9 @@ if not ftpio.lock(treename, True):
 
 try:
     tree=ftptree.FtpTree(treename)
-    if args.nocheckbuild:
-        tree.do_checkbuild = False
     pkgs = list(set(args.packages))
     tree.mark4removal(pkgs)
-    tree.removepkgs()
+    tree.removepkgs(checkbuild = not args.nocheckbuild)
 except ftptree.SomeError:
     sys.exit(1)
 finally:
diff --git a/bin/pfa-testmvpkg b/bin/pfa-testmvpkg
index 1874a5a..fa631d2 100755
--- a/bin/pfa-testmvpkg
+++ b/bin/pfa-testmvpkg
@@ -54,11 +54,9 @@ try:
         archivetree = ftptree.FtpTree(archivetreename)
     else:
         archivetree = None
-    if args.nocheckbuild:
-        srctree.do_checkbuild = False
     pkgs = list(set(args.packages))
     srctree.mark4moving(pkgs)
-    srctree.testmove(dsttree, archivetree = archivetree)
+    srctree.testmove(dsttree, archivetree = archivetree, checkbuild = not args.nocheckbuild)
 except ftptree.SomeError:
     sys.exit(1)
 finally:
diff --git a/modules/ftptree.py b/modules/ftptree.py
index 3d317f3..c065b51 100644
--- a/modules/ftptree.py
+++ b/modules/ftptree.py
@@ -307,8 +307,6 @@ class FtpTree(BaseFtpTree):
         if loadall:
             for pkgname in self.pkgnames:
                 self.loadedpkgs[pkgname] = Pkg(pkgname, self)
-        # Tests:
-        self.do_checkbuild = True
 
     def __getitem__(self, key):
         if key in self.loadedpkgs:
@@ -333,8 +331,8 @@ class FtpTree(BaseFtpTree):
         self.__checkbuild(self.loadedpkgs.values())
         self.__checkarchs(dsttree, self.loadedpkgs.values())
 
-    def testmove(self, dsttree, archivetree = None):
-        if self.do_checkbuild:
+    def testmove(self, dsttree, archivetree = None, checkbuild = True):
+        if checkbuild:
             self.__checkbuild(self.marked4moving)
         self.__checkarchs(dsttree, self.marked4moving)
         self.__checkduplicates(dsttree, self.marked4moving)
@@ -352,8 +350,8 @@ class FtpTree(BaseFtpTree):
         for pkg in self.marked4moving:
             pkg.move(dsttree, test = True)
 
-    def movepkgs(self, dsttree, archivetree = None):
-        if self.do_checkbuild:
+    def movepkgs(self, dsttree, archivetree = None, checkbuild = True):
+        if checkbuild:
             self.__checkbuild(self.marked4moving)
         bailoutonerror()
 
@@ -383,8 +381,8 @@ class FtpTree(BaseFtpTree):
             files += pkg.rpmfiles(debugfiles = debugfiles, sourcefiles = sourcefiles)
         return files
 
-    def removepkgs(self):
-        if self.do_checkbuild:
+    def removepkgs(self, checkbuild = True):
+        if checkbuild:
             self.__checkbuild(self.marked4removal)
         bailoutonerror()
         for pkg in self.marked4removal:
diff --git a/wwwbin/clean-dups.py b/wwwbin/clean-dups.py
index d15fab3..26f68e1 100755
--- a/wwwbin/clean-dups.py
+++ b/wwwbin/clean-dups.py
@@ -161,7 +161,6 @@ if not ftpio.lock(ftp_tree, True):
 
 try:
     tree=ftptree.FtpTree(ftp_tree)
-    #tree.do_checkbuild=False
     pkgs = find_dupes(dupes.values())
     for pkg in pkgs:
         print(f"removing: {pkg}")
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-ftp-admin.git/commitdiff/f0f51b4f65cdffd92042e4d10e359be0a751e080



More information about the pld-cvs-commit mailing list