Repository navigation
fix(dist_bump): tolerate macro-based Release fields (carries #100) - #138
Merged
Merged
Conversation
tools/dist_bump.py raised BumpError on any Release: containing a macro,
which the CLI turned into an exit 1 that broke build-stage.yml for any
package with a dist_bump configured -- bootc, libical (%autorelease),
pipewire (%{baserelease}...), firefox (1%{?pre_tag}...) and the X11
libraries (5%{?gitdate:...}...).
spec_release now takes the literal release that precedes the first
unexpanded macro -- the stable segment a recorded baseline compares
against -- so firefox and the X11 libs support real dist bumps. A release
that is only macros has nothing literal to compare, so the bump is
skipped (empty suffix) instead of crashing.
Covered by tests/test_dist_bump.py: leading-segment extraction and the
pure-macro no-bump path replace the old refuse-to-parse test.
Signed-off-by: kylerankin <kylerankin@users.noreply.github.com>
… docs - Cover bare %autorelease (and %autorelease -b3) in the purely-macro test; 103/107 purely-macro specs use the bare form, not the braced one. - Log the empty-release skip on stderr so build-stage.yml does not drop a rebuild silently (a silent "" ships an RPM that does not supersede). - Drop the dead .strip(): a (\\S+) capture carries no whitespace. - Re-target the docs at the extract-leading-literal behaviour and note the divergence from Hummingbird's bump_release().
tools/rebuild_plan.py (from #70) reads spec_release() too and treats None as "no comparable release"; "" made it concatenate a suffix onto nothing and fail test_an_autorelease_recipe_falls_back_to_the_version. The plan now also short-circuits on None explicitly instead of relying on BumpError. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6BYLUD6KBzF8rBFXKjP7M
Contributor
|
This PR's merge resolves issue #96. Note that only a maintainer editing the body makes the merge close it. — hive: backend=agy🐝 Hive Agent: |
This was referenced Sep 29, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Carries @kylerankin's #100 onto today's
main. That branch lives on a fork, so this is its two commits, a merge ofmain, and the one change the review asked for.What #100 does:
spec_release()takes the literal segment before the first unexpanded macro — the5in5%{?gitdate:…}%{?dist}, the1in1%{?pre_tag}%{?dist}— so those recipes support real dist bumps instead of crashingbuild-stage.ymlwithBumpError. A release that is only macros (%autorelease,%{baserelease}) has nothing literal to compare, so the bump is skipped with a line on stderr rather than guessed at. Preferred over the competing #118 (a hand-written macro expander) for the reasons on that PR.The one change:
spec_release()returnsNonerather than""for the macro-only case, becausetools/rebuild_plan.py(from #70, newer than #100) reads the same function and treatsNoneas "no comparable release";""madeexpected_release()concatenate a suffix onto nothing and failtest_an_autorelease_recipe_falls_back_to_the_version.expected_release()now also short-circuits onNoneexplicitly instead of relying onBumpError.Verified: 316 tests pass on the merged tree;
validatereports 340.🤖 Generated with Claude Code
https://claude.ai/code/session_01W6BYLUD6KBzF8rBFXKjP7M
Generated by Claude Code