Skip to content

Commit

Permalink
install from source: use Jammy feed for Ubuntu
Browse files Browse the repository at this point in the history
The dotnet team recently added support for installing natively from Jammy feeds on
Ubuntu:

dotnet/core#7699

This caused our current installation to fail, as it caused conflicts with
the packages.microsoft.com feed we use in the install from source script
for Debian/Ubuntu.

This change separates the Ubuntu and Debian install from source
processes, since Debian does not natively support Jammy feeds and continuing to try to
install from packages.microsoft.com on Ubuntu would require munging the
priority of feeds, which users would likely not appreciate.

fixes
  • Loading branch information
ldennington committed Aug 15, 2022
1 parent a9fcb46 commit de9bdab
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/linux/Packaging.Linux/install-from-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,21 @@ fi
eval "$(sed -n 's/^ID=/distribution=/p' /etc/os-release)"
eval "$(sed -n 's/^VERSION_ID=/version=/p' /etc/os-release | tr -d '"')"
case "$distribution" in
debian | ubuntu)
ubuntu)
$sudo_cmd apt update
install_shared_packages apt install

# add dotnet package repository/signing key
# install dotnet packages and dependencies if needed
if [ -z "$(verify_existing_dotnet_installation)" ]; then
$sudo_cmd apt update
$sudo_cmd apt install dotnet6 -y
fi
;;
debian)
$sudo_cmd apt update
install_shared_packages apt install

# add and prioritize dotnet package repository/signing key
$sudo_cmd apt update && $sudo_cmd apt install wget -y
curl -LO https://packages.microsoft.com/config/"$distribution"/"$version"/packages-microsoft-prod.deb
$sudo_cmd dpkg -i packages-microsoft-prod.deb
Expand Down

0 comments on commit de9bdab

Please sign in to comment.