All these years, enabling debuginfo has required distros to hijack the spec 
%install section with a macro like this:

    %install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
    %%install\
    %{nil}

This for a widely used, longtime upstream supported feature is just gross, and 
also very non-obvious, feeble and whatnot. And totally prevents the new 
append/prepend options from being used with %install.

Replace the logic parts with actual C code where the logic is more 
straightforward to follow, taking advantage of dynamic spec generation so 
debuginfo packages are only ever generated during an actual build.

There's a crazy amount of details buried in such a tiny piece, commented in 
the code now.

A noteworthy point here is that the presence of the old %install hack now 
causes an explicit failure, something like:

    error: line 4: %package debuginfo: package foo-debuginfo already exists
    error: parsing failed

This explicit break is very much intentional as we want distros to remove those 
%install hacks from their macro files.

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

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

-- Commit Summary --

  * Add proper program logic for debuginfo enablement

-- File Changes --

    M build/build.c (56)
    M macros.in (3)
    M tests/data/macros.debug (4)

-- Patch Links --

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

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

Message ID: <rpm-software-management/rpm/pull/3...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to