]> git.proxmox.com Git - debcargo-conf.git/commitdiff
dev/chain_build.py: add force build option
authorBlair Noctis <n@sail.ng>
Thu, 2 Mar 2023 07:07:14 +0000 (15:07 +0800)
committerBlair Noctis <n@sail.ng>
Thu, 2 Mar 2023 07:07:14 +0000 (15:07 +0800)
dev/chain_build.py

index 2be27cc759a9bd40f4bf08961df2913b12fef959..8851f705e772f2b3d22f86e9e6caef848139eecf 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python3
 
-USAGE = 'Usage: dev/chain_build.py <CRATE>[=<REALVER>] <CRATE2>[=<REALVER>] ...'
+USAGE = 'Usage: dev/chain_build.py [!]<CRATE>[=<REALVER>] <CRATE2>[=<REALVER>] ...'
 
 HELP = f'''
 {USAGE}
@@ -15,6 +15,8 @@ If multiple instances of the same crate are given, the first versioned
 before autogenerated ones (e.g. debcargo build-order), otherwise the generated
 first occurence would have been built.
 
+Prefixing a crate with "!" forces it to be built.
+
 This script needs python-apt to work.
 
 This script expects to run at the root of the debcargo-conf repository.
@@ -174,7 +176,7 @@ def chain_build(specs):
                                                ver = _get_dch_version(crate)
                                        except:
                                                pass
-                               print(crate, ver)
+                               print(crate, ver, 'FORCE BUILD' if crate[0] == '!' else '')
        else:
                built, debs = set(), set()
                _print('No recently built packages')
@@ -196,6 +198,8 @@ def chain_build(specs):
        for crate, ver in specs:
                if crate in built:
                        continue
+               if crate[0] == '!':
+                       crate = crate[1:]
                _print('Start building', crate, 'version', ver, 'with previous debs', debs)
                try_build(crate, ver, debs)
                built.add(crate)