Commit Graph

1 Commits

Author SHA1 Message Date
Maxython d502e7489d scripts(build-package.sh): fix on device compilation of packages when force building and revert `-f` flag behaviour
- Reverted behviour of `-f` flag changed in b9b5987 and only force build current package instead of dependencies.
- Added a  new `-F` flag to force build current package and dependencies as well.
- If both `-I` and `-F` flags are passed and dependencies cannot be compiled on device, i.e `$TERMUX_PKG_ON_DEVICE_BUILD_NOT_SUPPORTED` is set to `true` in `build.sh` of package, then they will be downloaded instead.
- If only `-F` flag is passed without the `-I` flag, and building on device is not supported, then building with fail with error.
- The `$TERMUX_BUILD_PACKAGE_CALL_DEPTH` variable will be used to track depth of recursive calls to `build-package.sh`.
- The file at `$TERMUX_BUILD_PACKAGE_CALL_BUILT_PACKAGES_LIST_FILE_PATH` will be used to track list of packages and their dependencies that have been compiled at any instant by recursive calls to `build-package.sh`.
- Added `scripts/utils/package/package.sh` to store package utils. The `pacakge__is_package_version_built()` method can be used to check if a certain package version has been built. In future this should include `$TERMUX_APP_PACKAGE` as well.

Co-authored-by: agnostic-apollo <agnosticapollo@gmail.com>
Co-authored-by: Maxython <mixython@gmail.com>
2023-01-03 20:06:03 +05:00