run upgrade/downgrade twice for updated assets

If one or more of the assets are in the 'core' set (such as bash,
recently), only the 'core' packages will be upgraded/downgraded in the
first run.
This commit is contained in:
Jeremy Drake 2022-02-19 15:28:41 -08:00 committed by Christoph Reiter
parent a316cb96c2
commit 451dca0a27

View File

@ -465,11 +465,13 @@ SigLevel=Never
# in case they are already installed we need to upgrade # in case they are already installed we need to upgrade
run_cmd(msys2_root, ["pacman", "--noconfirm", "-Suy"]) run_cmd(msys2_root, ["pacman", "--noconfirm", "-Suy"])
run_cmd(msys2_root, ["pacman", "--noconfirm", "-Su"])
yield yield
finally: finally:
shutil.rmtree(repo_root, ignore_errors=True) shutil.rmtree(repo_root, ignore_errors=True)
# downgrade again # downgrade again
run_cmd(msys2_root, ["pacman", "--noconfirm", "-Suuy"]) run_cmd(msys2_root, ["pacman", "--noconfirm", "-Suuy"])
run_cmd(msys2_root, ["pacman", "--noconfirm", "-Suu"])
def get_build_environ() -> Dict[str, str]: def get_build_environ() -> Dict[str, str]: