Use deb822-style APT repository configuration#560
Conversation
thaJeztah
left a comment
There was a problem hiding this comment.
thanks! left some quick comments after glancing over.
| use_deb822=true | ||
| case "$lsb_dist.$dist_version" in | ||
| debian.jessie|ubuntu.trusty) | ||
| use_deb822=false | ||
| ;; | ||
| esac |
There was a problem hiding this comment.
I think we already make these old distros a hard failure, so we can probably skip this check; older distros are no longer supported by the script, so it's fine if things would fail.
There was a problem hiding this comment.
I don't see any hard failure here. Is that in some other component?
# Print deprecation warnings for distro versions that recently reached EOL,
# but may still be commonly used (especially LTS versions).
case "$lsb_dist.$dist_version" in
centos.8|centos.7|rhel.7)
deprecation_notice "$lsb_dist" "$dist_version"
;;
debian.buster|debian.stretch|debian.jessie)
deprecation_notice "$lsb_dist" "$dist_version"
;;
raspbian.buster|raspbian.stretch|raspbian.jessie)
deprecation_notice "$lsb_dist" "$dist_version"
;;
ubuntu.focal|ubuntu.bionic|ubuntu.xenial|ubuntu.trusty)
deprecation_notice "$lsb_dist" "$dist_version"
;;
ubuntu.oracular|ubuntu.mantic|ubuntu.lunar|ubuntu.kinetic|ubuntu.impish|ubuntu.hirsute|ubuntu.groovy|ubuntu.eoan|ubuntu.disco|ubuntu.cosmic)
deprecation_notice "$lsb_dist" "$dist_version"
;;
fedora.*)
if [ "$dist_version" -lt 41 ]; then
deprecation_notice "$lsb_dist" "$dist_version"
fi
;;
esacThere was a problem hiding this comment.
Oh, you're right; it's not a hard failure (we may have in the past), but it sleeps for 10 seconds and a warning;
Line 273 in 2687d91
Regardless, we should prefer keeping the script focused on what's still supported, and try to avoid complexity for things no longer supported; users can still download older versions of the script, or (better) create their own implementation targeted at their situation.
There was a problem hiding this comment.
So should I change it to a hard fail for those distro versions?
| if [ -f /etc/apt/sources.list.d/docker.list ]; then | ||
| echo | ||
| echo "# WARNING: An existing Docker APT repository file using the sources.list format was found at /etc/apt/sources.list.d/docker.list." | ||
| echo "# Please remove this file to avoid conflicting repository settings." | ||
| echo | ||
| fi |
There was a problem hiding this comment.
We already have a warning if the script detects that docker is installed already (as its main purpose is for fresh installs, not upgrades); honestly, I think we can keep it simple; assume the docker.list is created either by this script, or manually, but for the docker installation, so just remove it;
if [ -f /etc/apt/sources.list.d/docker.list ]; then
rm -f /etc/apt/sources.list.d/docker.list
fiRefactor Docker repository setup to support new deb822 format and provide warnings for existing configurations. Signed-off-by: merlinz01 <158784988+merlinz01@users.noreply.github.com>
Fixes #559
- What I did
Refactor Docker repository setup to support new deb822 format and provide warnings for existing configurations.
- How I did it
Typing on a keyboard, I guess.
- How to verify it
Install on recent Debian or Ubuntu.
/etc/apt/sources.list.d/debian.sourcesshould contain something like this:- Description for the changelog
Use deb822-style APT repository configuration on Debian/Ubuntu versions that support it.
- A picture of a cute animal (not mandatory but encouraged)