Bug 88616

Summary: debuginfo feature of rpm breaks distutils' bdist_rpm
Product: [Retired] Red Hat Linux Reporter: Terje Røsten <terjeros>
Component: pythonAssignee: Mihai Ibanescu <mihai.ibanescu>
Status: CLOSED WONTFIX QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-04-05 20:04:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.