pkg.sh: Fix broken version macro expansion #92

Merged
Jan Lindemann merged 1 commit from jan/feature/20260909-pkg-sh-fix-broken-version-macro-expansion into master 2026-09-09 15:55:39 +02:00 AGit

2026-09-09

pkg.sh: Fix broken version macro expansion
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 3m52s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m12s
CI / Packaging test (pull_request) Successful in 0s
pkg-dist.mk queries the package relations with
--dont-expand-version-macros, and build_pkg() expanded the remaining
VERSION and VERSION-REVISION macros with a local sed-based
expand_version_macros(). That substitutes the version of the project being
built for every macro, instead of the version of the dependency the macro
refers to.

Drop --dont-expand-version-macros from the proj_query calls so the macros
resolve to the dependency's own version, and remove expand_version_macros()
from build_pkg(), which passes the PKG_* variables to rpmbuild as they are
queried.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-09-09 15:47:30 +02:00