From cc1ab8b9cce19e9941ce21355feed6feac625649 Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Mon, 29 Apr 2024 16:02:30 +0800 Subject: [PATCH] cmdline packages: make sure rebuilding packages have nvdata --- lilac | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/lilac b/lilac index 4b2f1de..11113c4 100755 --- a/lilac +++ b/lilac @@ -515,18 +515,6 @@ def main_may_raise( depman = DependencyManager(REPO.repodir) DEPMAP, BUILD_DEPMAP = get_dependency_map(depman, REPO.lilacinfos) - # packages we care about - care_pkgs: set[str] = set() - for pkg_to_build in pkgs_from_args: - care_pkgs.update(dep.pkgname for dep in DEPMAP[pkg_to_build]) - care_pkgs.add(pkg_to_build) - - proxy = config['nvchecker'].get('proxy') - _nvdata, unknown, rebuild = packages_need_update( - REPO, proxy, care_pkgs, - ) - nvdata.update(_nvdata) # update to the global object - failed_info = D.get('failed', {}) U = set(REPO.lilacinfos) @@ -539,7 +527,24 @@ def main_may_raise( need_rebuild_failed = failed_prev & changed # if pkgrel is updated, build a new release need_rebuild_pkgrel = {x for x in changed - if pkgrel_changed(last_commit, 'HEAD', x)} - unknown + if pkgrel_changed(last_commit, 'HEAD', x)} + + # packages we care about + care_pkgs: set[str] = set() + for pkg_to_build in pkgs_from_args: + care_pkgs.update(dep.pkgname for dep in DEPMAP[pkg_to_build]) + care_pkgs.add(pkg_to_build) + # make sure they have nvdata + care_pkgs.update(need_rebuild_failed) + care_pkgs.update(need_rebuild_pkgrel) + + proxy = config['nvchecker'].get('proxy') + _nvdata, unknown, rebuild = packages_need_update( + REPO, proxy, care_pkgs, + ) + nvdata.update(_nvdata) # update to the global object + + need_rebuild_pkgrel -= unknown nv_changed = {} for p, vers in nvdata.items():