Bug 143136

Summary: Missing python site-packages dependancy on x86_64
Product: [Fedora] Fedora Reporter: Pekka Pietikäinen <pp>
Component: bittorrentAssignee: Seth Vidal <skvidal>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: charlieb-fedora-bugzilla, matthias, rdieter, redhat-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-20 10:10:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
spec patch none

Description Pekka Pietikäinen 2004-12-16 19:43:29 UTC
Description of problem:

Linux the.cabal.fi 2.6.9-1.1032_FC4 #1 Mon Dec 13 01:08:44 EST 2004 x86_64
x86_64 x86_64 GNU/Linux
[root@the yum.repos.d]# rpm -Uvh ~pp/bittorrent-3.4.1-2.a.noarch.rpm
warning: /home/pp/bittorrent-3.4.1-2.a.noarch.rpm: V3 DSA signature: NOKEY, key
ID 1ac70ce6
error: Failed dependencies:
        /usr/lib/python2.3/site-packages is needed by bittorrent-3.4.1-2.a.noarch

Should probably be lib64 :-)

Or is it python that is broken?

>>> from distutils.sysconfig import get_python_lib
>>> print get_python_lib()
/usr/lib/python2.3/site-packages

which isn't provided by the x86_64 python rpm.

(in any case it's the bittorrent spec file that gets it wrong even if python
does return the wrong thing so filing it here)

Comment 1 Michael Schwendt 2004-12-22 03:47:35 UTC
*** Bug 143520 has been marked as a duplicate of this bug. ***

Comment 2 Michael Schwendt 2004-12-22 13:12:26 UTC
Created attachment 109006 [details]
spec patch

Would these sort of standard spec modifications be enough already to fix it?
(please rpmbuild --rebuild if you like)
http://home.arcor.de/ms2002sep/tmp/bittorrent-3.4.1-3.a.src.rpm

Comment 3 Matthias Saou 2005-01-13 20:41:18 UTC
Nope :

RPM build errors:
    File not found:
/var/tmp/bittorrent-3.4.1-3.a.1.fc3.fr-root-machbuild/usr/lib64/python2.3/site-packages/BitTorrent
    File not found by glob:
/var/tmp/bittorrent-3.4.1-3.a.1.fc3.fr-root-machbuild/usr/lib64/python2.3/site-packages/BitTorrent/*.py
    File not found by glob:
/var/tmp/bittorrent-3.4.1-3.a.1.fc3.fr-root-machbuild/usr/lib64/python2.3/site-packages/BitTorrent/*.pyc
    File not found by glob:
/var/tmp/bittorrent-3.4.1-3.a.1.fc3.fr-root-machbuild/usr/lib64/python2.3/site-packages/BitTorrent/*.pyo

As this is a noarch package, it is normal for the python stuff to be
in /usr/lib and not /usr/lib64. You can check the epydoc spec to see
how Ville dealt with that (noarch on x86_64).

Comment 4 Michael Schwendt 2005-01-13 21:39:56 UTC
Ok, I missed that it's noarch. Still this is necessary:

-Requires:       python, %{python_sitelib}
+Requires:       python
+Requires:	python-abi = %(%{__python} -c "import sys ; print
sys.version[:3]")
+

Comment 5 Matthias Saou 2005-01-14 17:34:50 UTC
Well, then go ahead an apply your above patch, but replacing
python_sitearch by python_sitelib and get_python_lib(1) by
get_python_lib() as this will fix the fact that it's noarch (thus
"lib" even on x86_64).
This solution is from Ville, and it works for me.

Comment 6 Michael Schwendt 2005-01-14 18:19:35 UTC
If you look closely, my patch does all that already. Only bug was that
I didn't pay attention that we're noarch here and hence used
arch-specific get_python_lib.

Comment 7 Matthias Saou 2005-01-14 18:38:02 UTC
Argh. OK, I now realize that I completely misunderstood just about
everything. So yes, the trivial changes from comment #4 are all that
is needed.

Comment 8 Michael Schwendt 2005-01-20 10:10:39 UTC
Considered fixed in bittorrent 3.4.1-3.a.

Comment 9 Charlie Brady 2009-03-27 23:09:38 UTC
python_sitearch macro is still needed for non-noarch python lib builds on x86_64, and doesn't appear to be in FC9 standard macros. Same macros shouldn't be required in each python-xxx spec file.