FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Packaging

 
 
LinkBack Thread Tools
 
Old 10-30-2010, 03:12 PM
Ville-Pekka Vainio
 
Default Noarch package depending on an arch-specific package, how to handle it?

Hi,

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? Or should I require "libmtp" and trust
yum to install the 64-bit package on x86_64? That wouldn't solve the
case where the system already has the 32-bit libmtp installed, though.

--
Ville-Pekka Vainio

--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 11-01-2010, 10:29 AM
Panu Matilainen
 
Default Noarch package depending on an arch-specific package, how to handle it?

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 -
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 11-02-2010, 12:25 PM
Ville-Pekka Vainio
 
Default Noarch package depending on an arch-specific package, how to handle it?

Thanks for your help Rex and Panu.

I've updated the package, the updated .spec file is at
http://vpv.fedorapeople.org/packages/python-pymtp.spec

I decided to depend on the libmtp soname, because a libmtp soname bump
will probably lead to pymtp being broken. I used the following "trick",
once recommended to me by Ville Skyttä:

%global libmtp libmtp.so.8
%ifarch x86_64 ppc64 ia64 sparc64 s390x
%global mark64 ()(64bit)
%endif

Requires: %{libmtp}%{?mark64}

--
Ville-Pekka Vainio

--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 

Thread Tools




All times are GMT. The time now is 09:13 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org