Commit e6fee36a authored by onny's avatar onny
Browse files

fix split package check

parent dfefd90c
......@@ -76,8 +76,11 @@ 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)
pkgbase = ""
if re.search(r'%BASE%\\n(.*?)\\n',content):
pkgbase = re.search(r'%BASE%\\n(.*?)\\n',content).group(1)
# only append package to pkglist array if it is not a split package
if not re.search(r'%BASE%\\n(?:\d+\:)?(.*?)-',content):
if (pkgname == pkgbase) or not re.search(r'%BASE%\\n(.*?)\\n',content):
pkglist.append({ 'name' : pkgname, 'name_urlencoded' : pkgname_urlencoded, 'version' : pkgversion, 'repository' : '', 'state' : '' })
descfile.close()
tar.close()
......
......@@ -22,9 +22,9 @@ if __name__ == '__main__':
sqlite_conn = Database().convert_upstream_database()
# Scrape AUR packages
aur_packages = AUR().scrape_packages()
#aur_packages = AUR().scrape_packages()
#packages = packages + aur_packages
packages = sorted(packages, key=lambda k: k['name'])
#packages = sorted(packages, key=lambda k: k['name'])
# Compare package versions
packages = Versioncheck(packages, sqlite_conn).compare_upstream()
......
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