fixed semver
This commit is contained in:
@@ -35,14 +35,14 @@ def already_running():
|
|||||||
|
|
||||||
def find_all_files_for_pkg(name, repo):
|
def find_all_files_for_pkg(name, repo):
|
||||||
searchpath = os.path.join(config["basedir"]["repo"], repo, "os", config["arch"]) + "/" + name + "-*.pkg.*"
|
searchpath = os.path.join(config["basedir"]["repo"], repo, "os", config["arch"]) + "/" + name + "-*.pkg.*"
|
||||||
logging.debug("[REPO] Search for package %s (path=%s)", name, searchpath)
|
# logging.debug("[REPO] Search for package %s (path=%s)", name, searchpath)
|
||||||
pkgs = glob.glob(searchpath)
|
pkgs = glob.glob(searchpath)
|
||||||
|
|
||||||
for p in pkgs:
|
for p in pkgs:
|
||||||
if p.endswith(".sig"):
|
if p.endswith(".sig"):
|
||||||
pkgs.remove(p)
|
pkgs.remove(p)
|
||||||
|
|
||||||
logging.debug("[REPO] Found %s", pkgs)
|
# logging.debug("[REPO] Found %s", pkgs)
|
||||||
|
|
||||||
return pkgs
|
return pkgs
|
||||||
|
|
||||||
@@ -194,13 +194,13 @@ def parse_pkgbuild(pkgbuild_file):
|
|||||||
if not pkgver or not pkgrel:
|
if not pkgver or not pkgrel:
|
||||||
logging.warning("[%s] Failed to parse pkgbuild", pkgbuild_file.split("/")[-4])
|
logging.warning("[%s] Failed to parse pkgbuild", pkgbuild_file.split("/")[-4])
|
||||||
|
|
||||||
return semver.VersionInfo.parse("{}-{}".format(pkgver, pkgrel))
|
return semver.VersionInfo.parse("{}.{}".format(pkgver, pkgrel))
|
||||||
|
|
||||||
|
|
||||||
def parse_repo(name, repo):
|
def parse_repo(name, repo):
|
||||||
ver_split = find_all_files_for_pkg(name, repo)[0].split("-")
|
ver_split = find_all_files_for_pkg(name, repo)[0].split("-")
|
||||||
|
|
||||||
return semver.VersionInfo.parse(ver_split[-3] + ver_split[-2])
|
return semver.VersionInfo.parse(ver_split[-3] + "." + ver_split[-2])
|
||||||
|
|
||||||
|
|
||||||
def sync_marchs_with_config():
|
def sync_marchs_with_config():
|
||||||
|
Reference in New Issue
Block a user