mirror of
https://github.com/vyos/vyos-build.git
synced 2025-10-01 20:28:40 +02:00
Merge pull request #845 from sever-sever/T6912
T6912: Fix build package script dependencies
This commit is contained in:
commit
dcf1d920ea
@ -75,12 +75,11 @@ def prepare_package(repo_dir: Path, install_data: str) -> None:
|
||||
raise
|
||||
|
||||
|
||||
def build_package(package: list, dependencies: list, patch_dir: Path) -> None:
|
||||
def build_package(package: list, patch_dir: Path) -> None:
|
||||
"""Build a package from the repository
|
||||
|
||||
Args:
|
||||
package (list): List of Packages from toml
|
||||
dependencies (list): List of additional dependencies
|
||||
patch_dir (Path): Directory containing patches
|
||||
"""
|
||||
repo_name = package['name']
|
||||
@ -94,9 +93,6 @@ def build_package(package: list, dependencies: list, patch_dir: Path) -> None:
|
||||
# Check out the specific commit
|
||||
run(['git', 'checkout', package['commit_id']], cwd=repo_dir, check=True)
|
||||
|
||||
# Ensure dependencies
|
||||
ensure_dependencies(dependencies)
|
||||
|
||||
# Apply patches if any
|
||||
if (repo_dir / 'patches'):
|
||||
apply_patches(repo_dir, patch_dir)
|
||||
@ -177,11 +173,14 @@ if __name__ == '__main__':
|
||||
packages = config['packages']
|
||||
patch_dir = Path(args.patch_dir)
|
||||
|
||||
for package in packages:
|
||||
dependencies = package.get('dependencies', {}).get('packages', [])
|
||||
# Load global dependencies
|
||||
global_dependencies = config.get('dependencies', {}).get('packages', [])
|
||||
if global_dependencies:
|
||||
ensure_dependencies(global_dependencies)
|
||||
|
||||
for package in packages:
|
||||
# Build the package
|
||||
build_package(package, dependencies, patch_dir)
|
||||
build_package(package, patch_dir)
|
||||
|
||||
# Clean up build dependency packages after build
|
||||
cleanup_build_deps(Path(package['name']))
|
||||
|
||||
1
scripts/package-build/frr/.gitignore
vendored
1
scripts/package-build/frr/.gitignore
vendored
@ -6,3 +6,4 @@ libyang/
|
||||
*.changes
|
||||
*.deb
|
||||
*.dsc
|
||||
*.tar.gz
|
||||
|
||||
@ -16,7 +16,7 @@ commit_id = "stable/9.1"
|
||||
scm_url = "https://github.com/FRRouting/frr.git"
|
||||
build_cmd = "sudo dpkg -i ../*.deb; sudo dpkg-buildpackage -us -uc -tc -b -Ppkg.frr.rtrlib,pkg.frr.lua"
|
||||
|
||||
[packages.dependencies]
|
||||
[dependencies]
|
||||
packages = [
|
||||
"chrpath",
|
||||
"gawk",
|
||||
|
||||
1
scripts/package-build/tacacs/.gitignore
vendored
1
scripts/package-build/tacacs/.gitignore
vendored
@ -6,3 +6,4 @@ libtacplus-map/
|
||||
*.changes
|
||||
*.deb
|
||||
*.dsc
|
||||
*.tar.gz
|
||||
|
||||
@ -16,7 +16,7 @@ commit_id = "master"
|
||||
scm_url = "https://github.com/vyos/libnss-tacplus.git"
|
||||
build_cmd = "sudo dpkg -i ../libtac*.deb ../libpam-tacplus*.deb; dpkg-buildpackage -us -uc -tc -b"
|
||||
|
||||
[packages.dependencies]
|
||||
[dependencies]
|
||||
packages = [
|
||||
"libpam-dev",
|
||||
"autoconf-archive",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user