mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
armbian-next: rootfs: reset UID of produced rootfs tarball; announce what is doing and what has done
This commit is contained in:
@@ -35,6 +35,11 @@ function cli_rootfs_run() {
|
||||
|
||||
# default build, but only invoke specific rootfs functions needed. It has its own logging sections.
|
||||
do_with_default_build cli_rootfs_only_in_default_build < /dev/null # no stdin for this, so it bombs if tries to be interactive.
|
||||
|
||||
reset_uid_owner "${BUILT_ROOTFS_CACHE_FILE}"
|
||||
|
||||
display_alert "Rootfs build complete" "${BUILT_ROOTFS_CACHE_NAME}" "info"
|
||||
display_alert "Rootfs build complete, file: " "${BUILT_ROOTFS_CACHE_FILE}" "info"
|
||||
}
|
||||
|
||||
# This is run inside do_with_default_build(), above.
|
||||
@@ -43,6 +48,8 @@ function cli_rootfs_only_in_default_build() {
|
||||
|
||||
LOG_SECTION="calculate_rootfs_cache_id" do_with_logging calculate_rootfs_cache_id
|
||||
|
||||
display_alert "Going to build rootfs" "packages_hash: '${packages_hash:-}' cache_type: '${cache_type:-}'" "info"
|
||||
|
||||
# "rootfs" CLI skips over a lot goes straight to create the rootfs. It doesn't check cache etc.
|
||||
LOG_SECTION="create_new_rootfs_cache" do_with_logging create_new_rootfs_cache
|
||||
}
|
||||
|
||||
@@ -167,6 +167,10 @@ function create_new_rootfs_cache() {
|
||||
|
||||
# needed for backend to keep current only @TODO: still needed?
|
||||
echo "$cache_fname" > "${cache_fname}.current"
|
||||
|
||||
# define a readonly global with the name of the cache
|
||||
declare -g -r BUILT_ROOTFS_CACHE_NAME="${cache_name}"
|
||||
declare -g -r BUILT_ROOTFS_CACHE_FILE="${cache_fname}"
|
||||
|
||||
return 0 # protect against possible future short-circuiting above this
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user