]> granicus.if.org Git - python/commitdiff
Bug 957381: rpmbuild builds a -debuginfo rpm on recent Redhat and Fedora releases.
authorAnthony Baxter <anthonybaxter@gmail.com>
Fri, 11 Jun 2004 17:16:46 +0000 (17:16 +0000)
committerAnthony Baxter <anthonybaxter@gmail.com>
Fri, 11 Jun 2004 17:16:46 +0000 (17:16 +0000)
Ignore it, rather than breaking.

Will backport.

(and r1.1000 for Misc/NEWS!)

Lib/distutils/command/bdist_rpm.py
Misc/NEWS

index 237cc70d2551df29af3b6dd8094dc1c6f0e0dcb4..4be99994978769e9a43be59dbbc41e683e43e25f 100644 (file)
@@ -313,10 +313,15 @@ class bdist_rpm (Command):
 
             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()
 
 
index 86eac9fa83d565aeaed5c600999fec40de77ab19..bf808b5da37c7d0bdacfca84c1519296587569ea 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -336,6 +336,9 @@ Extension modules
 Library
 -------
 
+- Bug #957381: distutils bdist_rpm no longer fails on recent RPM versions
+  that generate a *-debuginfo.rpm.
+
 - os.path.devnull has been added for all supported platforms.
 
 - Fixed #877165: distutils now picks the right C++ compiler command
@@ -422,7 +425,7 @@ Library
 - bisect.py and heapq.py now have underlying C implementations
   for better performance.
 
-- heapq.py has two new functions, nsmallest() and nlargest().                                                                  
+- heapq.py has two new functions, nsmallest() and nlargest().
 
 - traceback.format_exc has been added (similar to print_exc but it returns
   a string).