python2.2 -> python2.3
Phil Knirsch
pknirsch at redhat.com
Wed Oct 13 18:46:35 UTC 2004
Michael Schwendt wrote:
> On Wed, 13 Oct 2004 00:51:47 -1000, Warren Togami wrote:
>
>
>>>In addition to the above, a %{pyver} (primarily for python-abi) and a
>>>couple of incdir (arch dependent/ arch independent) macros would be
>>>welcome.
>>>
>>
>>Keep in mind that normally stuff like %{pyver} is a horrible sin in RPM
>>packaging because you cannot depend on stuff being in the buildroot
>>during RPM spec parsing. However in the case of perl and python we do
>>it anyway because they are within the minimum package set.
>>
>>Querying perl and python: OK
>>Querying mozilla or qt : BAD
>
>
> If you buildrequire Mozilla or Qt, you can query them without problems,
> of course. Because when they're not installed in the build environment,
> rpmbuild fails. And when they're installed, querying them works.
>
Well, yes, but that's not querying them, thats a standard rpm feature
which is perfectly valid.
Whats bad is doing something like this (just an example, no real life
package should have such nonsense):
%build
if [ -d /usr/lib/mozilla-1.7.3 ] then;
echo "Yeah, let's fiddle with mozilla-1.7.3."
else
echo "Dang, no mozilla-1.7.3 found, i'm going to break badly now."
fi
That's bound to cause problems in the long run, although this is still a
fairly harmless example. One could do much worse stuff with things like
that.
So the basic rule: Use the mechanisms that rpm offers you to the fullest
extent. And if something is missing, try to not rely on any setup you
think might be there. I just remember one package which checks if
/etc/mnttab is there and relys on that check to enable some disk
specific modules etc...
Read ya, Phil
--
Philipp Knirsch | Tel.: +49-711-96437-470
Development | Fax.: +49-711-96437-111
Red Hat GmbH | Email: Phil Knirsch <phil at redhat.de>
Hauptstaetterstr. 58 | Web: http://www.redhat.de/
D-70178 Stuttgart
Motd: You're only jealous cos the little penguins are talking to me.
More information about the fedora-devel-list
mailing list