packages: check_package_version_built(): don't refresh sources by default, default to doing it in get_unbuilt_package_levels() though
This commit is contained in:
parent
851b4e7477
commit
2757490a8f
1 changed files with 10 additions and 3 deletions
|
@ -308,8 +308,14 @@ def try_download_package(dest_file_path: str, package: Pkgbuild, arch: Arch) ->
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def check_package_version_built(package: Pkgbuild, arch: Arch, try_download: bool = False) -> bool:
|
def check_package_version_built(
|
||||||
setup_sources(package)
|
package: Pkgbuild,
|
||||||
|
arch: Arch,
|
||||||
|
try_download: bool = False,
|
||||||
|
refresh_sources: bool = False,
|
||||||
|
) -> bool:
|
||||||
|
if refresh_sources:
|
||||||
|
setup_sources(package)
|
||||||
|
|
||||||
missing = True
|
missing = True
|
||||||
filename = package.get_filename(arch)
|
filename = package.get_filename(arch)
|
||||||
|
@ -555,6 +561,7 @@ def get_unbuilt_package_levels(
|
||||||
force: bool = False,
|
force: bool = False,
|
||||||
rebuild_dependants: bool = False,
|
rebuild_dependants: bool = False,
|
||||||
try_download: bool = False,
|
try_download: bool = False,
|
||||||
|
refresh_sources: bool = True,
|
||||||
) -> list[set[Pkgbuild]]:
|
) -> list[set[Pkgbuild]]:
|
||||||
repo = repo or discover_pkgbuilds()
|
repo = repo or discover_pkgbuilds()
|
||||||
dependants = set[Pkgbuild]()
|
dependants = set[Pkgbuild]()
|
||||||
|
@ -568,7 +575,7 @@ def get_unbuilt_package_levels(
|
||||||
level = set[Pkgbuild]()
|
level = set[Pkgbuild]()
|
||||||
for package in level_packages:
|
for package in level_packages:
|
||||||
if ((force and package in packages) or (rebuild_dependants and package in dependants) or
|
if ((force and package in packages) or (rebuild_dependants and package in dependants) or
|
||||||
not check_package_version_built(package, arch, try_download)):
|
not check_package_version_built(package, arch, try_download=try_download, refresh_sources=refresh_sources)):
|
||||||
level.add(package)
|
level.add(package)
|
||||||
build_names.update(package.names())
|
build_names.update(package.names())
|
||||||
if level:
|
if level:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue