Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rootfs: don't use the Armbian repo when building rootfs from both GHA pipelines and CLI; fixes #7123 #7313

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/functions/artifacts/artifact-rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ function artifact_rootfs_cli_adapter_config_prep() {
declare -g -r RELEASE="${RELEASE}" # make readonly for finding who tries to change it
declare -g -r NEEDS_BINFMT="yes" # make sure binfmts are installed during prepare_host_interactive

if [[ "${SKIP_ARMBIAN_REPO}" != "yes" ]]; then # if not set to yes, force it to yes.
declare -g SKIP_ARMBIAN_REPO="yes" # Using the repo during rootfs build causes insanity, so don't. Make readonly to ensure.
fi
declare -g -r SKIP_ARMBIAN_REPO # make it readonly to ensure sanity if hooks try to change it

track_general_config_variables "in artifact_rootfs_cli_adapter_config_prep"

# prep_conf_main_only_rootfs_ni is prep_conf_main_only_rootfs_ni() + mark_aggregation_required_in_default_build_start()
prep_conf_main_only_rootfs_ni < /dev/null # no stdin for this, so it bombs if tries to be interactive.

Expand Down
5 changes: 5 additions & 0 deletions lib/functions/cli/cli-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@ function cli_artifact_run() {

display_alert "artifact" "${chosen_artifact}" "debug"
display_alert "artifact" "${chosen_artifact} :: ${chosen_artifact_impl}()" "debug"

track_general_config_variables "in cli_artifact_run before artifact_cli_adapter_config_prep"

declare -g artifact_version_requires_aggregation="no" # marker
artifact_cli_adapter_config_prep # only if in cli.

track_general_config_variables "in cli_artifact_run after artifact_cli_adapter_config_prep"

# if asked by _config_prep to aggregate, and HOSTRELEASE is not set, obtain it.
if [[ "${artifact_version_requires_aggregation}" == "yes" ]] && [[ -z "${HOSTRELEASE}" ]]; then
obtain_hostrelease_only # Sets HOSTRELEASE
Expand Down
2 changes: 1 addition & 1 deletion lib/functions/cli/commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function armbian_register_commands() {
["rewrite-uboot-patches-needing-rebase"]="REWRITE_PATCHES='yes' REWRITE_PATCHES_NEEDING_REBASE='yes'"

# artifact shortcuts
["rootfs"]="WHAT='rootfs' SKIP_ARMBIAN_REPO='yes' ${common_cli_artifact_vars}"
["rootfs"]="WHAT='rootfs' ${common_cli_artifact_vars}"

["kernel"]="WHAT='kernel' ${common_cli_artifact_vars}"
["kernel-config"]="WHAT='kernel' KERNEL_CONFIGURE='yes' ${common_cli_artifact_interactive_vars} ${common_cli_artifact_vars}"
Expand Down
2 changes: 1 addition & 1 deletion lib/functions/configuration/change-tracking.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ function track_general_config_variables() {
array_values="yes" track_config_variables "${1}" KERNEL_DRIVERS_SKIP
track_config_variables "${1}" BOOTSOURCE BOOTSOURCEDIR BOOTBRANCH BOOTPATCHDIR BOOTDIR BOOTCONFIG BOOTBRANCH_BOARD BOOTPATCHDIR_BOARD
track_config_variables "${1}" ATFSOURCEDIR ATFDIR ATFBRANCH CRUSTSOURCEDIR CRUSTDIR CRUSTBRANCH LINUXSOURCEDIR
track_config_variables "${1}" NETWORKING_STACK
track_config_variables "${1}" NETWORKING_STACK SKIP_ARMBIAN_REPO
}
3 changes: 1 addition & 2 deletions lib/functions/rootfs/create-cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,4 @@ function extract_rootfs_artifact() {
}

# This comment strategically introduced to force a rebuild of all rootfs, as this file's contents are hashed into all rootfs versions.
# There was a problem when generating cache. Packages were upgraded from our (beta) repository which lead into package downgrade error problem.
# Just a number to force rebuild 01
# Just a number to force rebuild 002