test(void): tie the stock pre-install to the constrained depends
The version-constrained carried packages are named in three places: the voculinux depends, the stock pre-install line and the pkgver loop of the install smoke. Nothing required them to agree, so a third gap package could be added to one place and missed in the others. The new test requires all three to name the same set. Also corrects the README "Version floors" wording: the offline stock-version test only records the versions verified on 2026-11-06, and the install smoke's pkgver check is the live signal. Refs #16
This commit is contained in:
@@ -68,10 +68,13 @@ Known limit: xbps has one comparator per dependency, so PySocks' `<2` cannot
|
||||
be written. The carried 1.7.1 satisfies it. A future Void `python3-pysocks`
|
||||
2.x would also satisfy `>=1.7.1_1`, so it is not excluded by the dependency.
|
||||
|
||||
When a project floor rises, or Void's stock package reaches the floor, change
|
||||
the carried template and its constraint in the same pull request. The
|
||||
stock-below-floor test fails once Void catches up, which is the signal to
|
||||
retire the carried template deliberately.
|
||||
When a project floor rises, or Void's stock package moves up to the carried
|
||||
version, change the carried template and its constraint in the same pull
|
||||
request. The live signal is the install smoke: once the stock package reaches
|
||||
the carried version, the constraint is already met, the stock package is kept,
|
||||
and the pkgver check fails. That is the signal to retire the carried template
|
||||
deliberately. The offline stock-version test in `tests/test_void_small_deps.py`
|
||||
only records the versions verified on 2026-11-06; it does not query Void.
|
||||
|
||||
## python3-pywhispercpp
|
||||
|
||||
|
||||
@@ -134,6 +134,23 @@ def test_install_smoke_upgrades_the_stock_packages_below_the_floors() -> None:
|
||||
), "each stock package must read back as the carried pkgver"
|
||||
|
||||
|
||||
def test_stock_preinstall_matches_the_constrained_depends() -> None:
|
||||
"""A carried dependency that voculinux version-constrains must be installed as
|
||||
stock first and checked by pkgver. Three places name the set: the voculinux
|
||||
depends, the stock pre-install line and the pkgver loop. They must agree, so a
|
||||
third gap package cannot be missed in one of them."""
|
||||
template = (SRC / "voculinux" / "template").read_text(encoding="utf-8")
|
||||
depends = re.search(r'^depends="([^"]+)"', template, re.M).group(1).split()
|
||||
constrained = {token.split(">=")[0] for token in depends if ">=" in token}
|
||||
text = CONTAINER_RELEASE.read_text(encoding="utf-8")
|
||||
stock = re.search(r'--repository="\$OFFICIAL" -S ([^>\n]+?) >/dev/null', text).group(1).split()
|
||||
checked = re.search(r"for PKG in (python3-[^;]+); do", text).group(1).split()
|
||||
assert set(stock) == constrained == set(checked), (
|
||||
f"stock pre-install {stock}, constrained depends {sorted(constrained)}, "
|
||||
f"pkgver loop {checked} must name the same packages"
|
||||
)
|
||||
|
||||
|
||||
def test_a_package_without_a_smoke_recipe_fails_the_release() -> None:
|
||||
"""A future template falls into *) and must fail loudly, never pass mute."""
|
||||
text = CONTAINER_RELEASE.read_text(encoding="utf-8")
|
||||
|
||||
Reference in New Issue
Block a user