[Rpm-maint] [rpm-software-management/rpm] Fix build scriptlet append/prepend interaction with Buildsystem (PR #3047)

Panu Matilainen notifications at github.com
Thu Apr 18 07:15:16 UTC 2024


The append and prepend modes got added before the declarative Buildsystem, and did not get thoroughly tested with it. The existing %build -a test didn't actually work but automake handling the build in %install masked the issue embarrasingly. As the Buildsystem is parsed after everything else, there's no way the previous append/prepend implementation could work correctly with it.

Do what we should've done from the start: collect any prepend/append stuff into separate data structures and apply them after everything else has been parsed. This also lifts the artificial sounding restriction wrt the corresponding main section:it's really the right thing to do, even if it's a bit more code.

Make the tests wrt buildsystem much more thorough to ensure it all really works, blush.

Fixes: #3024
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/3047

-- Commit Summary --

  * Fix build scriptlet append/prepend interaction with Buildsystem

-- File Changes --

    M build/parseSimpleScript.c (23)
    M build/parseSpec.c (72)
    M build/rpmbuild_internal.h (11)
    M build/spec.c (2)
    M docs/manual/spec.md (7)
    M tests/data/SPECS/amhello.spec (22)
    M tests/rpmbuild.at (14)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/3047.patch
https://github.com/rpm-software-management/rpm/pull/3047.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3047
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/3047 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240418/1b139e40/attachment.html>


More information about the Rpm-maint mailing list