fix spec file multi orig file issue
authorGuan Junchun <junchunx.guan@intel.com>
Tue, 29 May 2012 05:18:49 +0000 (13:18 +0800)
committerGuan Junchun <junchunx.guan@intel.com>
Tue, 29 May 2012 05:18:49 +0000 (13:18 +0800)
gbp/rpm/__init__.py

index 16a4945f742c650a0f19b15664f97cd98d2bd1d9..41a90dd32ceaeb8b23ac0043be8444a4f0796bff 100644 (file)
@@ -430,7 +430,7 @@ class SpecFile(object):
         formt = ""
 
         # Take the first file that starts 'name' and has suffix like 'tar.*'
-        for (name, num, typ) in self.specinfo.sources:
+        for (name, num, typ) in sorted(self.specinfo.sources, key=lambda s: s[1]):
             # only check files of source type
             if typ == 1:
                 m = tarball_re.match(os.path.basename(name))