mirror of
https://github.com/vyos/vyos-build.git
synced 2025-10-01 20:28:40 +02:00
T7026: Add apply_patches option for the build packages script
Add 'apply_patches' key is set to True (default) in the package configuration This allows skipping/applying patch application by 'build.py' for specific packages when desired Usage: apply_patches = false
This commit is contained in:
parent
844cac86fd
commit
0f44fc7abe
@ -120,7 +120,15 @@ def build_package(package: list, patch_dir: Path) -> None:
|
||||
print(f"I: pre_build_hook failed for the {repo_name}")
|
||||
raise
|
||||
|
||||
# Apply patches if any
|
||||
# Apply patches if the 'apply_patches' key is set to True (default) in the package configuration
|
||||
# This allows skipping patch application for specific packages when desired
|
||||
#
|
||||
# Usage:
|
||||
# apply_patches = false
|
||||
#
|
||||
# Default to True if the key is missing
|
||||
if package.get('apply_patches', True):
|
||||
# Check if the 'patches' directory exists in the repository
|
||||
if (repo_dir / 'patches'):
|
||||
apply_patches(repo_dir, patch_dir / repo_name)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user