Skip to content

Commit 94e3a37

Browse files
committed
T8132: Update the APT mirror list before a package build
The repository update process must be independent of the existence of package/package.toml dependencies. This may lead to build failures for certain packages. Alway update the APT mirror list before build.
1 parent 0dc2973 commit 94e3a37

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

scripts/package-build/build.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ def ensure_dependencies(dependencies: list) -> None:
3333
return
3434

3535
print("I: Ensure Debian build dependencies are met")
36-
run(['sudo', 'apt-get', 'update'], check=True)
3736
run(['sudo', 'apt-get', 'install', '-y'] + dependencies, check=True)
3837

3938

@@ -213,6 +212,9 @@ def copy_packages(repo_dir: Path) -> None:
213212
packages = config['packages']
214213
patch_dir = Path(args.patch_dir)
215214

215+
# Update APT mirror list before the build
216+
run(['sudo', 'apt-get', 'update'], check=True)
217+
216218
# Load global dependencies
217219
global_dependencies = config.get('dependencies', {}).get('packages', [])
218220
if global_dependencies:

0 commit comments

Comments
 (0)