[Git][reproducible-builds/reprotest][wip-specify-build-path] 2 commits: borken attempt at build path
Vagrant Cascadian (@vagrant)
gitlab at salsa.debian.org
Thu Feb 22 00:27:53 UTC 2024
Vagrant Cascadian pushed to branch wip-specify-build-path at Reproducible Builds / reprotest
Commits:
9ea2e4bf by Vagrant Cascadian at 2024-02-21T16:01:47-08:00
borken attempt at build path
- - - - -
f94904bc by Vagrant Cascadian at 2024-02-21T16:01:52-08:00
support --vary=build_path.path ... partially...
Still needs work to copy the .deb from the appropriate location
- - - - -
2 changed files:
- README.rst
- reprotest/build.py
Changes:
=====================================
README.rst
=====================================
@@ -253,6 +253,8 @@ of names is given in the --help text for --variations.
Most variations do not have parameters, and for them only the + and - operators
are relevant. The variations that accept parameters are:
+build_path.path
+ The path to use.
domain_host.use_sudo
An integer, whether to use sudo(1) together with unshare(1) to change the
system hostname and domainname. 0 means don't use sudo; any non-zero value
=====================================
reprotest/build.py
=====================================
@@ -252,7 +252,14 @@ def domain_host(ctx, build, vary):
# of the current virtual servers. (It's theoretically possible to make it work)
def build_path(ctx, build, vary):
if vary:
- return build
+ if ctx.spec.build_path.path:
+ custom_path = os.path.join(ctx.spec.build_path.path)
+ os.makedirs(os.path.dirname(custom_path), exist_ok=True)
+ if ctx.verbosity >= 1:
+ logger.info("BUILD_PATH variation: custom path = " + custom_path)
+ return build.move_tree(build.tree, custom_path, True)
+ else:
+ return build
const_path = os.path.join(dirname(build.tree), 'const_build_path')
if ctx.verbosity >= 1:
logger.info("BUILD_PATH variation: const_path = " + const_path)
@@ -582,6 +589,11 @@ class LocalesVariation(collections.namedtuple('_LocaleVariation', 'locale')):
def default(cls):
return cls(mdiffconf.strlist_set(";"))
+class BuildPathVariation(collections.namedtuple('_BuildPathVariation', 'path')):
+ @classmethod
+ def default(cls):
+ return cls('')
+
class VariationSpec(mdiffconf.ImmutableNamespace):
@classmethod
def default(cls, variations=VARIATIONS):
@@ -591,6 +603,7 @@ class VariationSpec(mdiffconf.ImmutableNamespace):
"time": TimeVariation.default(),
"domain_host": DomainHostVariation.default(),
"locales": LocalesVariation.default(),
+ "build_path": BuildPathVariation.default(),
}
return cls(**{k: default_overrides.get(k, True) for k in variations})
View it on GitLab: https://salsa.debian.org/reproducible-builds/reprotest/-/compare/f2c04a3f7b3b8024dc1dc4a30571ee8d8ab4d5f5...f94904bcf814e024428ede98f7742dd738e909df
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/reprotest/-/compare/f2c04a3f7b3b8024dc1dc4a30571ee8d8ab4d5f5...f94904bcf814e024428ede98f7742dd738e909df
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20240222/f11f404d/attachment.htm>
More information about the rb-commits
mailing list