mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
More stupid debugging because i can't even
This commit is contained in:
parent
3e1708969e
commit
81ffd3b7bf
1 changed files with 11 additions and 0 deletions
11
lib/tests.sh
11
lib/tests.sh
|
@ -79,9 +79,13 @@ _TEST_CONFIG_PANEL() {
|
||||||
_INSTALL_APP () {
|
_INSTALL_APP () {
|
||||||
local install_args="$(jq -r '.install_args' $current_test_infos)"
|
local install_args="$(jq -r '.install_args' $current_test_infos)"
|
||||||
|
|
||||||
|
log_info "install_args: $install_args"
|
||||||
|
|
||||||
# Make sure we have a trailing & because that assumption is used in some sed regex later
|
# Make sure we have a trailing & because that assumption is used in some sed regex later
|
||||||
[[ ${install_args: -1} == '&' ]] || install_args+="&"
|
[[ ${install_args: -1} == '&' ]] || install_args+="&"
|
||||||
[[ ${install_args:0:1} == '&' ]] || install_args="&$install_args"
|
[[ ${install_args:0:1} == '&' ]] || install_args="&$install_args"
|
||||||
|
|
||||||
|
log_info "install_args: $install_args"
|
||||||
|
|
||||||
# We have default values for domain, admin and is_public, but these
|
# We have default values for domain, admin and is_public, but these
|
||||||
# may still be overwritten by the args ($@)
|
# may still be overwritten by the args ($@)
|
||||||
|
@ -98,6 +102,8 @@ _INSTALL_APP () {
|
||||||
|
|
||||||
install_args=$(echo $install_args | sed "s@\&$key=[^&]*\&@\&$key=$value\&@")
|
install_args=$(echo $install_args | sed "s@\&$key=[^&]*\&@\&$key=$value\&@")
|
||||||
done
|
done
|
||||||
|
|
||||||
|
log_info "install_args: $install_args"
|
||||||
|
|
||||||
# Note : we do this at this stage and not during the parsing of check_process
|
# Note : we do this at this stage and not during the parsing of check_process
|
||||||
# because this also applies to upgrades ... ie older version may have different args and default values
|
# because this also applies to upgrades ... ie older version may have different args and default values
|
||||||
|
@ -121,11 +127,16 @@ _INSTALL_APP () {
|
||||||
else
|
else
|
||||||
local default_value=$(python3 -c "import toml, sys; t = toml.loads(sys.stdin.read()); d = t['install']['$ARG'].get('default'); assert d is not None, 'Missing default value'; print(d)" < $package_path/manifest.toml)
|
local default_value=$(python3 -c "import toml, sys; t = toml.loads(sys.stdin.read()); d = t['install']['$ARG'].get('default'); assert d is not None, 'Missing default value'; print(d)" < $package_path/manifest.toml)
|
||||||
fi
|
fi
|
||||||
|
log_info "adding $ARG"
|
||||||
|
log_info "install_args: $install_args"
|
||||||
[[ $? -eq 0 ]] || { log_error "Missing install arg $ARG ?"; return 1; }
|
[[ $? -eq 0 ]] || { log_error "Missing install arg $ARG ?"; return 1; }
|
||||||
[[ ${install_args: -1} == '&' ]] || install_args+="&"
|
[[ ${install_args: -1} == '&' ]] || install_args+="&"
|
||||||
install_args+="$ARG=$default_value"
|
install_args+="$ARG=$default_value"
|
||||||
|
log_info "install_args: $install_args"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
log_info "install_args: $install_args"
|
||||||
|
|
||||||
# Install the application in a LXC container
|
# Install the application in a LXC container
|
||||||
log_info "Running: yunohost app install --no-remove-on-failure --force /app_folder -a \"$install_args\""
|
log_info "Running: yunohost app install --no-remove-on-failure --force /app_folder -a \"$install_args\""
|
||||||
|
|
Loading…
Add table
Reference in a new issue