Fix so that depdencies can be built correctly with -i option
This commit is contained in:
parent
d87672f1c1
commit
1f170db0ee
@ -255,12 +255,13 @@ termux_step_handle_arguments() {
|
|||||||
echo " -D Build a disabled package in disabled-packages/."
|
echo " -D Build a disabled package in disabled-packages/."
|
||||||
echo " -f Force build even if package has already been built."
|
echo " -f Force build even if package has already been built."
|
||||||
echo " -i Download and extract dependencies instead of building them."
|
echo " -i Download and extract dependencies instead of building them."
|
||||||
|
echo " -I Download and extract dependencies instead of building them, keep existing files."
|
||||||
echo " -q Quiet build."
|
echo " -q Quiet build."
|
||||||
echo " -s Skip dependency check."
|
echo " -s Skip dependency check."
|
||||||
echo " -o Specify deb directory. Default: debs/."
|
echo " -o Specify deb directory. Default: debs/."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
while getopts :a:hdDfiqso: option; do
|
while getopts :a:hdDfiIqso: option; do
|
||||||
case "$option" in
|
case "$option" in
|
||||||
a) TERMUX_ARCH="$OPTARG";;
|
a) TERMUX_ARCH="$OPTARG";;
|
||||||
h) _show_usage;;
|
h) _show_usage;;
|
||||||
@ -268,6 +269,7 @@ termux_step_handle_arguments() {
|
|||||||
D) local TERMUX_IS_DISABLED=true;;
|
D) local TERMUX_IS_DISABLED=true;;
|
||||||
f) TERMUX_FORCE_BUILD=true;;
|
f) TERMUX_FORCE_BUILD=true;;
|
||||||
i) export TERMUX_INSTALL_DEPS=true;;
|
i) export TERMUX_INSTALL_DEPS=true;;
|
||||||
|
I) export TERMUX_INSTALL_DEPS=true && export TERMUX_NO_CLEAN=true;;
|
||||||
q) export TERMUX_QUIET_BUILD=true;;
|
q) export TERMUX_QUIET_BUILD=true;;
|
||||||
s) export TERMUX_SKIP_DEPCHECK=true;;
|
s) export TERMUX_SKIP_DEPCHECK=true;;
|
||||||
o) TERMUX_DEBDIR="$(realpath -m $OPTARG)";;
|
o) TERMUX_DEBDIR="$(realpath -m $OPTARG)";;
|
||||||
@ -322,6 +324,7 @@ termux_step_setup_variables() {
|
|||||||
: "${TERMUX_ANDROID_HOME:="/data/data/com.termux/files/home"}"
|
: "${TERMUX_ANDROID_HOME:="/data/data/com.termux/files/home"}"
|
||||||
: "${TERMUX_DEBUG:=""}"
|
: "${TERMUX_DEBUG:=""}"
|
||||||
: "${TERMUX_PKG_API_LEVEL:="21"}"
|
: "${TERMUX_PKG_API_LEVEL:="21"}"
|
||||||
|
: "${TERMUX_NO_CLEAN:="true"}"
|
||||||
: "${TERMUX_QUIET_BUILD:="false"}"
|
: "${TERMUX_QUIET_BUILD:="false"}"
|
||||||
: "${TERMUX_DEBDIR:="${TERMUX_SCRIPTDIR}/debs"}"
|
: "${TERMUX_DEBDIR:="${TERMUX_SCRIPTDIR}/debs"}"
|
||||||
: "${TERMUX_SKIP_DEPCHECK:="false"}"
|
: "${TERMUX_SKIP_DEPCHECK:="false"}"
|
||||||
@ -459,7 +462,8 @@ termux_download_deb() {
|
|||||||
|
|
||||||
# Script to download InRelease, verify it's signature and then download Packages.xz by hash
|
# Script to download InRelease, verify it's signature and then download Packages.xz by hash
|
||||||
termux_step_get_repo_files() {
|
termux_step_get_repo_files() {
|
||||||
if [ "$TERMUX_SKIP_DEPCHECK" = false ] && [ "$TERMUX_INSTALL_DEPS" = true ]; then
|
if [ "$TERMUX_INSTALL_DEPS" = true ]; then
|
||||||
|
if [ "$TERMUX_NO_CLEAN" = false ]; then
|
||||||
# Remove all previously extracted/built files from $TERMUX_PREFIX:
|
# Remove all previously extracted/built files from $TERMUX_PREFIX:
|
||||||
rm -rf $TERMUX_PREFIX
|
rm -rf $TERMUX_PREFIX
|
||||||
rm -f /data/data/.built-packages/*
|
rm -f /data/data/.built-packages/*
|
||||||
@ -495,6 +499,7 @@ termux_step_get_repo_files() {
|
|||||||
done<SYMLINKS.txt
|
done<SYMLINKS.txt
|
||||||
rm SYMLINKS.txt
|
rm SYMLINKS.txt
|
||||||
)
|
)
|
||||||
|
fi
|
||||||
# Import Fornwalls key:
|
# Import Fornwalls key:
|
||||||
gpg --import packages/apt/trusted.gpg
|
gpg --import packages/apt/trusted.gpg
|
||||||
(
|
(
|
||||||
@ -545,7 +550,7 @@ termux_step_start_build() {
|
|||||||
fi
|
fi
|
||||||
if ! termux_download_deb $pkg $dep_arch $dep_version; then
|
if ! termux_download_deb $pkg $dep_arch $dep_version; then
|
||||||
echo "Download of $pkg@$dep_version from $TERMUX_REPO_URL failed, building instead"
|
echo "Download of $pkg@$dep_version from $TERMUX_REPO_URL failed, building instead"
|
||||||
./build-package.sh -a $TERMUX_ARCH -i -s "$pkg"
|
./build-package.sh -a $TERMUX_ARCH -I "$pkg"
|
||||||
continue
|
continue
|
||||||
else
|
else
|
||||||
if [ ! "$TERMUX_QUIET_BUILD" = true ]; then echo "Extracting $pkg..."; fi
|
if [ ! "$TERMUX_QUIET_BUILD" = true ]; then echo "Extracting $pkg..."; fi
|
||||||
|
Loading…
Reference in New Issue
Block a user