Add build mode for local source builds for iolan_apps, see README in …#30
Merged
Conversation
…iolan_apps for usage example
There was a problem hiding this comment.
Pull request overview
Adds a new build_mode option to scripts/package-build/build.py to support building packages from a local source tree (skipping git clone/checkout and tarball creation), intended for repos that contain multiple independent sub-project packages.
Changes:
- Introduces
build_modewithgit_full(default) vslocal_app. - Skips git operations (and tarball generation) when building from local sources.
- Adds an additional dependency-install step for
local_app.
Comment on lines
84
to
86
| repo_name = package['name'] | ||
| repo_dir = Path(repo_name) | ||
| print(f"I: build_package {repo_name} in {repo_dir}") |
Comment on lines
143
to
146
| 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) |
Comment on lines
+148
to
+157
| if build_mode == 'local_app': | ||
| # PSL-iolan_apps: For local_app mode, use current working directory as the source tree | ||
| # instead of a cloned repository directory | ||
| repo_dir = Path(os.getcwd()) | ||
| else: | ||
| # Sanitize the commit ID and build a tarball for the package | ||
| commit_id_sanitized = package['commit_id'].replace('/', '_') | ||
| tarball_name = f"{repo_name}_{commit_id_sanitized}.tar.gz" | ||
| run(['tar', '--exclude=.git', '--exclude=.github', '-czf', tarball_name, '-C', str(repo_dir.parent), repo_name], check=True) | ||
| print(f"I: Tarball created: {tarball_name}") |
Comment on lines
+172
to
+176
| if build_mode == 'local_app': | ||
| # PSL-iolan_apps: For local_app mode, explicitly install all dependencies listed in the | ||
| # build-deps package. This ensures locally built libs are used instead of | ||
| # versions from the upstream repositories if exists so local changes are prioritized. | ||
| run("sudo apt-get install -y $(dpkg-deb -f *build-deps*.deb Depends | tr ',' ' ') 2>&1", cwd=repo_dir, check=True, shell=True) |
Comment on lines
+92
to
+95
| build_mode = package.get('build_mode', 'git_full') | ||
|
|
||
| # PSL-iolan_apps: Skip git clone/checkout for 'local_app' mode since we build from local sources | ||
| if build_mode != 'local_app': |
psleng
approved these changes
Jun 11, 2026
diyguy88
approved these changes
Jun 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new
build_modeoption to support building packages from local source directories without requiring git clone/checkout operations.Changes
Added
build_modeconfiguration option with two modes:git_full(default): Standard behavior - clones repository and checks out specific commitlocal_app: Builds from the current working directory without git operationsWhen
build_mode = 'local_app':Use Case
Enables building individual packages from repositories that contain multiple independent sub-projects. Unlike standard packages that are built as a whole from a single repository,
iolan_appscontains multiple subdirectories where each subdirectory is a standalone package that can be built independently.With
local_appmode, you can navigate to any subdirectory and build just that package without cloning the entire repository or affecting other packages.Usage
In
package.toml: