Skip to content

Commit

Permalink
hack: trixie has lost its software-properties-common package so get r…
Browse files Browse the repository at this point in the history
…id of it for all Debian releases

- https://tracker.debian.org/news/1579223/software-properties-removed-from-testing/
- that provides add-apt-repository, but we don't use that on Debian, hopefully
- move also cpufrequtils hack (which requires release) to specific function after userspace checks and when DISTRIBUTION is set
- `software-properties-gtk` if of course also gone, so remove that for desktop's sake
  • Loading branch information
rpardini authored and igorpecovnik committed Nov 12, 2024
1 parent 9b68c85 commit 37d9200
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/functions/configuration/main-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,6 @@ function do_main_configuration() {
declare -g -r PACKAGE_LIST_FAMILY="${PACKAGE_LIST_FAMILY}"
declare -g -r PACKAGE_LIST_FAMILY_REMOVE="${PACKAGE_LIST_FAMILY_REMOVE}"

if [[ $RELEASE == trixie || $ARCH == riscv64 ]]; then remove_packages "cpufrequtils"; fi # this will remove from rootfs as well

display_alert "Done with do_main_configuration" "do_main_configuration" "debug"
}

Expand Down
16 changes: 16 additions & 0 deletions lib/functions/main/config-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ function config_post_main() {
# Do some sanity checks for userspace stuff, if RELEASE/DESKTOP_ENVIRONMENT is set.
check_config_userspace_release_and_desktop

# late Userspace / package list fixes; RELEASE and DISTRIBUTION must be set.
fix_userspace_packages_release_and_distro

track_general_config_variables "before calling extension_finish_config"
display_alert "Extensions: finish configuration" "extension_finish_config" "debug"
call_extension_method "extension_finish_config" <<- 'EXTENSION_FINISH_CONFIG'
Expand Down Expand Up @@ -380,6 +383,19 @@ function check_config_userspace_release_and_desktop() {
return 0
}

function fix_userspace_packages_release_and_distro() {
display_alert "fix_userspace_packages_release_and_distro" "For distro '${DISTRIBUTION}' release '${RELEASE}'" "debug"

# Some old hack from the past, not sure if it's still needed. Originally from https://github.com/armbian/build/pull/5881
if [[ $RELEASE == trixie || $ARCH == riscv64 ]]; then remove_packages "cpufrequtils"; fi # this will remove from rootfs as well

# Debian: no need for this package in the rootfs, as it provides add-apt-repository which is not used on our Debian builds
if [[ "${DISTRIBUTION}" == "Debian" ]]; then
display_alert "Not-installing software-properties-common" "For distro '${DISTRIBUTION}' release '${RELEASE}'" "warn"
remove_packages "software-properties-common" "software-properties-gtk" "software-properties-common"
fi
}

# Some utility functions
function branch2dir() {
[[ "${1}" == "head" ]] && echo "HEAD" || echo "${1##*:}"
Expand Down

0 comments on commit 37d9200

Please sign in to comment.