armbian-build/lib/functions/configuration/package-lists.sh
Igor Pecovnik 4d60ce08f2 chore: update copyright years to 2026
Update all copyright notices in shell scripts from 2025 to 2026.

## Changes

- **Igor Pecovnik**: 2013-2025 → 2013-2026 (129 files)
- **Ricardo Pardini**: 2023-2025 → 2023-2026, 2020-2025 → 2020-2026 (5 files)

## Additional Improvements

Also updated the backtitle in `lib/functions/configuration/interactive.sh`:
- Changed title from "Armbian building script" to "Armbian Linux build framework"
- Removed docs link for cleaner display
- Uses dynamic year calculation with separate declaration (fixes shellcheck SC2155)
2025-12-25 12:03:34 +01:00

55 lines
1.9 KiB
Bash

#!/usr/bin/env bash
#
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (c) 2013-2026 Igor Pecovnik, igor@armbian.com
#
# This file is a part of the Armbian Build Framework
# https://github.com/armbian/build/
function get_caller_reference() {
# grab the caller function name, its source file and line number
local caller_ref="${FUNCNAME[2]}"
local caller_file="${BASH_SOURCE[2]}"
local caller_line="${BASH_LINENO[1]}"
# the format below must match the parser in parseEnvForList in aggregation.py
declare -g caller_reference="${caller_ref}:${caller_file}:${caller_line}"
}
# Adds to the main package list. Using this causes an immediate miss on any cached/standard rootfs.
function add_packages_to_rootfs() {
get_caller_reference
declare -g -a EXTRA_PACKAGES_ROOTFS=("${EXTRA_PACKAGES_ROOTFS[@]}")
declare -g -a EXTRA_PACKAGES_ROOTFS_REFS=("${EXTRA_PACKAGES_ROOTFS_REFS[@]}")
for package in "${@}"; do
# add package to the list
EXTRA_PACKAGES_ROOTFS+=("${package}")
EXTRA_PACKAGES_ROOTFS_REFS+=("${caller_reference}")
done
}
# Adds to the image package list; they're not cached in the rootfs.
function add_packages_to_image() {
get_caller_reference
declare -g -a EXTRA_PACKAGES_IMAGE=("${EXTRA_PACKAGES_IMAGE[@]}")
declare -g -a EXTRA_PACKAGES_IMAGE_REFS=("${EXTRA_PACKAGES_IMAGE_REFS[@]}")
for package in "${@}"; do
# add package to the list
EXTRA_PACKAGES_IMAGE+=("${package}")
EXTRA_PACKAGES_IMAGE_REFS+=("${caller_reference}")
done
}
# Removes a package from all lists: debootstrap, rootfs, desktop and image.
# Using this causes an immediate miss on any cached/standard rootfs.
function remove_packages() {
get_caller_reference
declare -g -a REMOVE_PACKAGES=("${REMOVE_PACKAGES[@]}")
declare -g -a REMOVE_PACKAGES_REFS=("${REMOVE_PACKAGES_REFS[@]}")
for package in "${@}"; do
# add package to the list
REMOVE_PACKAGES+=("${package}")
REMOVE_PACKAGES_REFS+=("${caller_reference}")
done
}