build and fail pkgbuilds, compare pkgnames for version and exists
This commit is contained in:
33
master.py
33
master.py
@@ -144,10 +144,12 @@ def already_running() -> bool:
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def package_exists(name, repo) -> bool:
|
def package_exists(names: list, repo) -> bool:
|
||||||
|
for name in names:
|
||||||
pkgs = find_all_files_for_pkg(name, repo)
|
pkgs = find_all_files_for_pkg(name, repo)
|
||||||
|
if not pkgs:
|
||||||
return len(pkgs) > 0
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
def find_all_files_for_pkg(name: str, repo: str) -> list:
|
def find_all_files_for_pkg(name: str, repo: str) -> list:
|
||||||
@@ -288,28 +290,27 @@ def fill_queue() -> None:
|
|||||||
# ignore pkgbuild if in trunk, -any package, not in repos, on blacklist, not for current arch
|
# ignore pkgbuild if in trunk, -any package, not in repos, on blacklist, not for current arch
|
||||||
if path_split[-2] == "trunk" or path_split[-2].split("-")[0] not in config["repos"] or "any" in parsed["arch"] \
|
if path_split[-2] == "trunk" or path_split[-2].split("-")[0] not in config["repos"] or "any" in parsed["arch"] \
|
||||||
or parsed["pkgbase"] in config["blacklist"] or "i686" in path_split[-2]:
|
or parsed["pkgbase"] in config["blacklist"] or "i686" in path_split[-2]:
|
||||||
# TODO: delete pkgs not build anymore
|
# TODO: delete packages not to build
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
for march in config["march"]:
|
for march in config["march"]:
|
||||||
repo = path_split[-2].split("-")[0] + "-" + march
|
repo = path_split[-2].split("-")[0] + "-" + march
|
||||||
|
|
||||||
for pkgname in list(parsed["packages"]):
|
if parsed["pkgbase"] in get_failed_packages(repo):
|
||||||
if pkgname in get_failed_packages(repo):
|
logging.info("[%s/%s] Skipped due to failing build", repo, parsed["pkgbase"])
|
||||||
logging.info("[%s/%s] Skipped due to failing build", repo, pkgname)
|
|
||||||
continue
|
continue
|
||||||
|
packages = list(parsed["packages"])
|
||||||
|
if package_exists(packages, repo):
|
||||||
|
logging.debug("[SEMVER] Comparing %s=%s - %s=%s", packages[0], parse_repo(packages[0], repo),
|
||||||
|
packages[0], parse_pkgbuild_ver(pkgbuild))
|
||||||
|
|
||||||
if package_exists(pkgname, repo):
|
if not package_exists(packages, repo):
|
||||||
logging.debug("[SEMVER] Comparing %s=%s - %s=%s", pkgname, parse_repo(pkgname, repo), pkgname,
|
|
||||||
parse_pkgbuild_ver(pkgbuild))
|
|
||||||
|
|
||||||
if not package_exists(pkgname, repo):
|
|
||||||
q.put((pkgbuild, repo))
|
q.put((pkgbuild, repo))
|
||||||
logging.info("[%s/%s] Build queued (package not build yet)", repo, pkgname)
|
logging.info("[%s/%s] Build queued (package not build yet)", repo, parsed["pkgbase"])
|
||||||
elif parse_repo(pkgname, repo) < parse_pkgbuild_ver(pkgbuild):
|
elif parse_repo(packages[0], repo) < parse_pkgbuild_ver(pkgbuild):
|
||||||
q.put((pkgbuild, repo))
|
q.put((pkgbuild, repo))
|
||||||
logging.info("[%s/%s] Build queued (new version available %s < %s)", repo, pkgname,
|
logging.info("[%s/%s] Build queued (new version available %s < %s)", repo, parsed["pkgbase"],
|
||||||
parse_repo(pkgname, repo), parse_pkgbuild(pkgbuild))
|
parse_repo(packages[0], repo), parse_pkgbuild(pkgbuild))
|
||||||
|
|
||||||
logging.info("Build queue size: %s", q.qsize())
|
logging.info("Build queue size: %s", q.qsize())
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user