[Rpm-maint] [rpm-software-management/rpm] Improve %{_builddir} backwards compatibility (PR #3152)
Panu Matilainen
notifications at github.com
Fri Jun 7 11:08:53 UTC 2024
Yet another %{_builddir} related quirk: it's not uncommon for packages to do things like this at the top of the spec:
%global vpath_build %{_builddir}/%{buildsubdir}/vpathbuild
The problem here being use of %global, long these components are defined at all. If %define was used this was no problem at all, but it only works with %global if these macros are either in their final value, or not defined at all. And with our new fancy intermediate builddir hackery, %{_builddir} is neither, which makes the behavior inconsistent.
%global and %define *are* different and no amount of trickery can (or should) make that go away, but as this breaks existing users it's worth trying to bend over a bit. So funnily enough, the best fix for this is to UNDEFINE %{_builddir} for the initial spec parse stage. Any later uses where it actually matters will get re-expanded with the right value. Or in other words, lets keep digging the hole, I'm sure we'll break through to the other side soon...
Add couple of tests for the expected builddir behaviors
Fixes: #3151
You can view, comment on, or merge this pull request online at:
https://github.com/rpm-software-management/rpm/pull/3152
-- Commit Summary --
* Improve %{_builddir} backwards compatibility
-- File Changes --
M build/parsePreamble.c (8)
M build/parseSpec.c (13)
M tests/rpmbuild.at (24)
-- Patch Links --
https://github.com/rpm-software-management/rpm/pull/3152.patch
https://github.com/rpm-software-management/rpm/pull/3152.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3152
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3152 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240607/679351a4/attachment.html>
More information about the Rpm-maint
mailing list