[Fedora-packaging] Noarch package depending on an arch-specific package, how to handle it?

Panu Matilainen pmatilai at laiskiainen.org
Mon Nov 1 11:29:28 UTC 2010


On Sun, 31 Oct 2010, Rex Dieter wrote:

> Ville-Pekka Vainio wrote:
>
>> I'm packaging pymtp, which the new gPodder versions need as a
>> dependency. The review request is at
>> <https://bugzilla.redhat.com/show_bug.cgi?id=643199>. It's a python
>> binding to libmtp done with ctypes. The package in itself is noarch, but
>> I noticed it won't work, if the 32-bit version of libmtp is installed on
>> a 64-bit system.
>>
>> Should I make the pymtp package arch dependent and require the libmtp
>> package, which matches the arch?
>
> I think so, yes, using (something like):
>
> Requires: libmtp%{?_isa}

Heh, interesting beast this one. Looking at how ctypes goes about its 
business (fairly hair-rising stuff), this is a run-time dependency which 
depends on the bitness of the python interpreter used to import the 
module. So technically, for a pure-python library like pymtp, there's no 
telling at install time (much less at the time of package build) which 
architecture it should require.

So yeah, while technically "incorrect", the only thing that comes even 
remotely close to expressing the situation with the current tools is to 
make pymtp (and in general, anything using ctypes) package arch-dependent 
and use %{_isa} for the lowlevel library dependency.

 	- Panu -


More information about the packaging mailing list