Bug 123598 - distutils bdist_rpm problem
Summary: distutils bdist_rpm problem
Alias: None
Product: Fedora
Classification: Fedora
Component: python (Show other bugs)
(Show other bugs)
Version: 2
Hardware: i386 Linux
Target Milestone: ---
Assignee: Mihai Ibanescu
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2004-05-19 15:43 UTC by Jeremy Sanders
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-06-09 18:00:00 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Jeremy Sanders 2004-05-19 15:43:38 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040207 Firefox/0.8

Description of problem:
Trying to build an rpm for the numarray package


[testuser@xpc15 ~/numarray-0.9]$ python setup.py bdist_rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.17559
+ umask 022
+ cd /home/testuser/numarray-0.9/build/bdist.linux-i686/rpm/BUILD
+ cd numarray-0.9
+ rm -rf /var/tmp/numarray-buildroot
+ exit 0
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.17559
+ umask 022
+ cd /home/testuser/numarray-0.9/build/bdist.linux-i686/rpm/BUILD
+ rm -rf numarray-0.9
+ exit 0
moving build/bdist.linux-i686/rpm/SRPMS/numarray-0.9-1.src.rpm -> dist
Traceback (most recent call last):
  File "setup.py", line 153, in ?
  File "setup.py", line 144, in main
line 149, in setup
line 907, in run_commands
line 927, in run_command
line 316, in run
AssertionError: unexpected number of RPM files found:

It looks like python distutils fails as there's a generated debuginfo
file. Distutils should be fixed to know about the intended number of rpms.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Download numarray tar.gz
2. Run python setup.py bdist_rpm

Additional info:

I think it would be great if numarray was in Fedora!

Comment 1 Mihai Ibanescu 2004-05-20 21:46:27 UTC
Have you reported this bug upstream? It is not a packaging bug, is it?

Comment 2 Jeremy Sanders 2004-05-21 08:39:58 UTC
I thought it might have been because of the extra debuginfo files.
I'll report it upstream now if you think not.

Comment 3 Jeremy Sanders 2004-05-21 08:44:13 UTC
Okay, I've found a python bug corresponding to this bug. There's a
patch to fix the problem, but the bug claims redhat/fedora developers
chose not to include the patch.


Comment 4 Mihai Ibanescu 2004-05-24 14:02:18 UTC
Ah, cool. Thanks, I'll include the bug in the next python build.

Comment 5 Mihai Ibanescu 2004-06-04 15:17:00 UTC
The patch is horrible IMHO. distutils should be fixed to allow for
more than one rpm to be built out of one spec file, not worked around
the specific debuginfo problem.

Comment 6 David Nečas 2004-06-05 11:49:08 UTC
I must confess I haven't studied the patch, however:

Distutils writes the spec file itself, writes it to build one binary
rpm, so it reasonably expects one binary rpm is created.  It is
redhat-rpm-config what does something unexpected.  If rpmbuild creates
some random extra rpms, how can distutils know what happened, what
they are good for and what to do with them?  And there is no generic
method of preventing that.  Special-casing for known extra rpms it
knows what to do with is not so bad idea then.

Comment 7 Mihai Ibanescu 2004-06-07 14:20:39 UTC
You are right that distutils creates the spec file (although I wish it
offered a way to accept a custom spec file). But the -debuginfo thing
is totally driven by rpm macros. rpm macros are very powerful and very
confusing too.

Anyway, I have a patch that I will submit upstream that hopefully
addresses the big FIXME in distutils/command/bdist_rpm.py (and will
put it in rawhide for public consideration).

Comment 8 Mihai Ibanescu 2004-06-07 15:15:47 UTC
Patched rpms are available at:


(until the rawhide build becomes available)

Please give them a try and let me know if they work for you.

Comment 9 David Nečas 2004-06-09 17:48:04 UTC
They seem to fix it for me.

Comment 10 Mihai Ibanescu 2004-06-09 18:00:00 UTC
Excellent. The patch was accepted upstream too.

Comment 11 Jeff MacDonald 2004-08-10 15:01:52 UTC
does python-2.3.3-6 contain the patch? I went to the above url to
download the patched version, but it has been removed. 

Comment 12 Mihai Ibanescu 2004-08-10 15:14:53 UTC
Not sure, I would say use python 2.3.4 from rawhide or FC3 test 1.


Note You need to log in before you can comment on or make changes to this bug.