Browse code

Improved package_list creation.

YustasSwamp authored on 2015/08/07 01:47:53
Showing 1 changed files
... ...
@@ -143,18 +143,24 @@ def buildPackageList(specPath):
143 143
                 specFile = os.path.join(specDir, specEntry)
144 144
                 if os.path.isfile(specFile) and specFile.endswith(".spec"):
145 145
                     spec=Specutils(specFile)
146
-                    name=spec.getPackageNames()[0]
146
+                    name=spec.getBasePackageName()
147 147
                     version=spec.getRPMVersion(name)
148 148
                     license=spec.getLicense(name)
149 149
                     url=spec.getURL(name)
150
-                    source=spec.getSourceURLs()[0]
150
+                    ss=spec.getSourceURLs()
151
+                    sources=""
152
+                    for s in ss:
153
+                        if (s.startswith("http") or s.startswith("ftp")):
154
+                            if sources != "":
155
+                                sources += " "
156
+                            sources += s
151 157
                     patches=""
152 158
                     ps=spec.getPatchNames()
153 159
                     for p in ps:
154 160
                         if patches != "":
155 161
                             patches += " "
156 162
                         patches += p
157
-                    print name+","+version+","+license+","+url+","+source+","+patches
163
+                    print name+","+version+","+license+","+url+","+sources+","+patches
158 164
 
159 165
 def buildAPackage(package, buildThreads):
160 166
     listPackages=[]