On Tue, Feb 14, 2006, Ralf S. Engelschall wrote:
>On Mon, Feb 13, 2006, Bill Campbell wrote:
>
>> I would like to suggest that any %{l_shtool} subst subsitutions don't
>> belong in the %setup section, but properly belong at the beginning of the
>> %build section.
>>
>> IHMO, the %setup section should only be for loading sources and applying
>> patches.  Putting processing like substitutions in it makes the job of
>> building new patches more difficult as one cannot just to an ``rpm -bp''
>> operation to get clean sources from which one can generate diffs.
>
>Yes and no. Yes, because you're right, they make trouble and always
>have to be proceeded with an "exit 0" temporarily (that's what I do).
>No, because one could argue that substitutions are just a different
>technique of patching the sources and hence should be grouped together
>with the patch files.

I too use exit 0 when I encounter this.

On the other hand, many of the substitutions with shtool are target
dependent which varies from build to build.

>Although I usually always prefer consistency and grouping (where I would
>bundle "shtool subst" and "%patch"), I personally also tend to agree
>with you, Bill.

Since this is mostly a style issue, can we suggest as a matter of policy
that the substitutions be put in the %build section?  It's not something
that changes the outcome of the build.  In most cases, it's simply a matter
of moving the %build line to immediately precede the substitutions.

There are some packages, apache comes to mind, where the %setup section
conditionally installs source packages.  In these cases the substitutions
may well be necessary in line with the setup.

>I also think the %prep sections should only contain %setup and %patch
>commands because (1) that's how the %prep section AFAIK was intended
>for by the RPM authors (2) the %prep section and especially its %setup
>macro is REALLY DEEP magic (e.g. its expanded "cd" part is sticky and
>automatically duplicates into all other sections, etc) and (3) it also
>simplifies the developer tasks.

Is there any way to figure this magic out other than reading the rpm source
code?

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``People from East Germany have found the West so confusing. It's so much
easier when you have only one party.'' -- Linus Torvalde, Linux Expo Canada
when asked about confusion over many Linux distributions.
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
Developer Communication List                   openpkg-dev@openpkg.org

Reply via email to