From 0c0a4286e7ebb0e69f2edecaae134c5f56d7ff85 Mon Sep 17 00:00:00 2001 From: Ethan Dye Date: Sun, 12 Jan 2025 18:10:08 -0700 Subject: [PATCH] Reorder limiting unstable download Signed-off-by: Ethan Dye --- build-image/openhabian.conf | 2 +- functions/java-jre.bash | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build-image/openhabian.conf b/build-image/openhabian.conf index d5566726e..203ff1391 100644 --- a/build-image/openhabian.conf +++ b/build-image/openhabian.conf @@ -52,7 +52,7 @@ clonebranch=openHAB # debug verbosity mode # off, on (verbose output in log) or maximum (show every command) -debugmode=maximum +debugmode=off # the framebuffer on RPi is enabled by default framebuffer=enable diff --git a/functions/java-jre.bash b/functions/java-jre.bash index b86b523f4..b0ed3d610 100644 --- a/functions/java-jre.bash +++ b/functions/java-jre.bash @@ -75,14 +75,16 @@ openjdk_fetch_apt() { cond_redirect apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC cond_redirect apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 - # important to avoid release mixing: - # prevent RPi from using the Debian distro for normal Raspbian packages - echo -e "Package: *\\nPin: release a=unstable\\nPin-Priority: 90\\n" > /etc/apt/preferences.d/limit-unstable cond_redirect apt-get update dpkg --configure -a echo -n "$(timestamp) [openHABian] Fetching OpenJDK ${1}... " if cond_redirect apt-get install --download-only --yes "openjdk-${1}-jre-headless"; then echo "OK"; else echo "FAILED"; return 1; fi + + # Avoid release mixing: prevent RPi from using the Debian distro for normal Raspbian packages + # But wait until the package is actually installed to avoid breaking the system + echo -e "Package: *\\nPin: release a=unstable\\nPin-Priority: 90\\n" > /etc/apt/preferences.d/limit-unstable + cond_redirect apt-get update } ## Install OpenJDK using APT repository.