[projects/pld-builder.new] --clean commands. -t doesn't wait for autotag
arekm
arekm at pld-linux.org
Mon Apr 20 18:46:37 CEST 2026
commit f04bbd6906e41c65312b49e780dba5e813d1bf4e
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Mon Apr 20 18:46:12 2026 +0200
--clean commands. -t doesn't wait for autotag
client/php-rebuild.py | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/client/php-rebuild.py b/client/php-rebuild.py
index 9def1dd..680fe2d 100755
--- a/client/php-rebuild.py
+++ b/client/php-rebuild.py
@@ -40,6 +40,7 @@ OUR_BOOL_FLAGS = {
'--run': 'run', '-t': 'test', '--test': 'test',
'-v': 'verbose', '--verbose': 'verbose',
'--autotag': 'autotag', '--autotag-continue': 'autotag_continue',
+ '--clean': 'clean',
}
OUR_VALUE_FLAGS = {
'--php': 'php',
@@ -239,6 +240,8 @@ Options:
--autotag-continue Send builds for all suffixes except the first, using
the existing auto-tag. Use after --autotag succeeded.
--autotag-wait SECS Seconds to wait for auto-tag to appear (default: 240)
+ --clean Send a pre-command to uninstall existing php*-common-*
+ in the chroot before building (default: off)
-v, --verbose Print extra info (ref used, PHP versions)
-h, --help Show this help
@@ -378,6 +381,8 @@ def process_spec(spec_arg, opts, passthrough):
plan = f'continue: PHP {ver_list} (skip first) from auto-tag'
elif tip_tag:
plan = f'rebuild all: PHP {ver_list} from {tip_tag}'
+ elif opts['test']:
+ plan = f'test all: PHP {ver_list} from {branch} (no auto-tag wait)'
else:
plan = f'new build: PHP {ver_list} from {branch}, first+wait+rest'
@@ -389,13 +394,14 @@ def process_spec(spec_arg, opts, passthrough):
else:
build_mode = ['-t'] if opts['test'] else ['-r']
+ clean_args = ['-c', PRE_COMMAND] if opts['clean'] else []
+
def send(suffixes_to_send, send_ref):
"""Build and show/execute make-request.sh commands for given suffixes."""
for suffix in suffixes_to_send:
cmd = ['make-request.sh'] + build_mode + [
'-D', f'php_suffix {suffix}',
- '-c', PRE_COMMAND,
- ] + passthrough + [f'{spec}:{send_ref}']
+ ] + clean_args + passthrough + [f'{spec}:{send_ref}']
print(f'\nBuilding {name} PHP {fmt_ver(suffix_to_version(suffix))} from {send_ref}:')
print(shlex.join(cmd))
if opts['run']:
@@ -421,6 +427,9 @@ def process_spec(spec_arg, opts, passthrough):
elif tip_tag:
# Auto-tag at branch tip — all suffixes build from the same tagged commit
send(suffixes, tip_tag)
+ elif opts['test']:
+ # Test builds never create auto-tags, so skip the wait flow entirely.
+ send(suffixes, branch)
else:
# No auto-tag at tip — new build: send first suffix from branch,
# wait for builder to create auto-tag, then send the rest from it
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/pld-builder.new.git/commitdiff/f04bbd6906e41c65312b49e780dba5e813d1bf4e
More information about the pld-cvs-commit
mailing list