diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index eb64d6850..35a74f684 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -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" } diff --git a/images/linux/scripts/base/apt.sh b/images/linux/scripts/base/apt.sh index 3fc447f01..da0ad4313 100644 --- a/images/linux/scripts/base/apt.sh +++ b/images/linux/scripts/base/apt.sh @@ -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 @@ -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://raw.githubusercontent.com/ilikenwf/apt-fast/master/quick-install.sh)"