pkg.sh: Fix broken version macro expansion
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>
This commit is contained in:
parent
f33f47c2b3
commit
af31e80678
2 changed files with 13 additions and 17 deletions
|
|
@ -438,16 +438,12 @@ build_pkg()
|
|||
local tar_archive_orig=$src_base.orig.tar.bz2
|
||||
local distribution=`get_os`
|
||||
|
||||
expand_version_macros() {
|
||||
echo "$@" | sed "s/__NEXT_VERSION__/$version/g; s/VERSION-REVISION/$version/g; s/VERSION/$version/g"
|
||||
}
|
||||
|
||||
local rpm_requires_run=`expand_version_macros $PKG_REQUIRES_RUN`
|
||||
local rpm_requires_devel=`expand_version_macros $PKG_REQUIRES_DEVEL`
|
||||
local rpm_conflicts_run=`expand_version_macros $PKG_CONFLICTS_RUN`
|
||||
local rpm_conflicts_devel=`expand_version_macros $PKG_CONFLICTS_DEVEL`
|
||||
local rpm_provides_run=`expand_version_macros $PKG_PROVIDES_RUN`
|
||||
local rpm_provides_devel=`expand_version_macros $PKG_PROVIDES_DEVEL`
|
||||
local rpm_requires_run="$PKG_REQUIRES_RUN"
|
||||
local rpm_requires_devel="$PKG_REQUIRES_DEVEL"
|
||||
local rpm_conflicts_run="$PKG_CONFLICTS_RUN"
|
||||
local rpm_conflicts_devel="$PKG_CONFLICTS_DEVEL"
|
||||
local rpm_provides_run="$PKG_PROVIDES_RUN"
|
||||
local rpm_provides_devel="$PKG_PROVIDES_DEVEL"
|
||||
|
||||
# --- create source directory tree
|
||||
create_empty_dir $src_tree "Source files compilation directory"
|
||||
|
|
|
|||
Loading…
Reference in a new issue