Bug 88616 - debuginfo feature of rpm breaks distutils' bdist_rpm
Summary: debuginfo feature of rpm breaks distutils' bdist_rpm
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: python
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mihai Ibanescu
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-04-11 14:06 UTC by Terje Røsten
Modified: 2007-04-18 16:52 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-04-05 20:04:53 UTC
Embargoed:


Attachments (Terms of Use)

Description Terje Røsten 2003-04-11 14:06:24 UTC
Distutils in python do not understand that a extra rpm debuginfo package is
generated when doing:
$ python setup.py bdist_rpm
This quick (maybe too quick) hack fix it:

distutils/command/bdist_rpm.py      
--- distutils/command/bdist_rpm.py.orig 2003-04-11 15:20:19.000000000 +0200
+++ distutils/command/bdist_rpm.py      2003-04-11 15:31:59.000000000 +0200
@@ -311,10 +311,15 @@
 
             if not self.source_only:
                 rpms = glob.glob(os.path.join(rpm_dir['RPMS'], "*/*.rpm"))
+                debuginfo = glob.glob(os.path.join(rpm_dir['RPMS'], \
+                                                   "*/*debuginfo*.rpm"))
+                if debuginfo:
+                    rpms.remove(debuginfo[0])
                 assert len(rpms) == 1, \
                        "unexpected number of RPM files found: %s" % rpms
                 self.move_file(rpms[0], self.dist_dir)
-
+                if debuginfo:
+                    self.move_file(debuginfo[0], self.dist_dir)
     # run()

Comment 1 Mihai Ibanescu 2003-04-11 17:58:59 UTC
distutils has no way to generate multiple binaries out of the same source, and
that's where the problem comes from.

Comment 2 Mihai Ibanescu 2004-04-05 20:04:53 UTC
This is more of a problem with distutils.


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