Skip to content

Commit

Permalink
Reorder limiting unstable download
Browse files Browse the repository at this point in the history
Signed-off-by: Ethan Dye <[email protected]>
  • Loading branch information
ecdye committed Jan 13, 2025
1 parent 6d98ee0 commit 0c0a428
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build-image/openhabian.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions functions/java-jre.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 0c0a428

Please sign in to comment.