Commit dfefd90c authored by onny's avatar onny
Browse files

fix creating tmp directory, ignore split packages

parent ef8f293e
......@@ -76,7 +76,9 @@ class Database:
pkgversion = re.search(r'%VERSION%\\n(?:\d+\:)?(.*?)-',content).group(1)
pkgname = re.search(r'%NAME%\\n(.*?)\\n',content).group(1)
pkgname_urlencoded = quote(pkgname)
pkglist.append({ 'name' : pkgname, 'name_urlencoded' : pkgname_urlencoded, 'version' : pkgversion, 'repository' : '', 'state' : '' })
# only append package to pkglist array if it is not a split package
if not re.search(r'%BASE%\\n(?:\d+\:)?(.*?)-',content):
pkglist.append({ 'name' : pkgname, 'name_urlencoded' : pkgname_urlencoded, 'version' : pkgversion, 'repository' : '', 'state' : '' })
descfile.close()
tar.close()
return pkglist
......
......@@ -23,6 +23,9 @@ class Download:
def sync_repos(self):
if not os.path.exists(self.temp_directory):
os.makedirs(self.temp_directory)
for idx, link in enumerate(self.database_sources):
local_filename = self.temp_directory + "/" + os.path.split(link)[1]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment