[Rpm-ecosystem] Trying to understand %buildsubdir and debuginfo generation
Jeff Johnson
n3npq at me.com
Fri Apr 27 11:28:23 UTC 2018
> On Apr 27, 2018, at 6:56 AM, Jeff Johnson <n3npq at me.com> wrote:
>
>
>
>> On Apr 27, 2018, at 6:35 AM, Neal Gompa <ngompa13 at gmail.com> wrote:
> ...
>>
>> That said, it's required to make debuginfo packages get generated, as I
>> found out when working on OpenMandriva's rpm-openmandriva-setup:
>> https://github.com/OpenMandrivaSoftware/rpm-openmandriva-setup/commit/df94fda422f9bf3d9e32b6f8f59493d2d478daef
>
> If the test on %buildsubdir is actually still needed ...
>
> A test on %buildsubdir existence delays the substitution until after %setup has actually been run.
>
> Without seeing details with/without the %install overloading, I cannot guess why the overloading is/was necessary.
The net effect of the delay is postponing the insertion of a %install section marker.
Which means that what follows %install is/was concatenated to the previous section on the first pass, but instantiated as a %install section on the second pass.
This was likely done to disappear a hunk of script: look carefully for an "exit 0" being inserted somewhere else to prematurely terminate the section to which %install was appended on the first pass.
Depending on how %end is implemented, adding %end might achieve a similar effect as an exit 0 insertion.
That's the best I can do resurrecting ancient memories. Do you remember what you were coding 16y ago?!? Well neither do I ...
As for R -debuginfo production: you are likely best off just creating -debuginfo subpackages directly without twisting up the rpmbuild spec parser like the test for %buildsubdir does, particularly if R builds do not naturally have separate build/install sections.
73 de Jeff
More information about the Rpm-ecosystem
mailing list