From 552da81d139e62b23aac2381b76bdad4e867af2a Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Wed, 28 Apr 2021 16:51:16 +0500 Subject: [PATCH] [ubuntu] Document GHC apt repository (#3268) --- .../linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 | 3 ++- images/linux/scripts/installers/haskell.sh | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 9388ded0..96cc4b56 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -251,7 +251,8 @@ function Build-PHPTable { function Get-GHCVersion { $(ghc --version) -match "version (?\d+\.\d+\.\d+)" | Out-Null $ghcVersion = $Matches.version - return "GHC $ghcVersion" + $aptSourceRepo = Get-AptSourceRepository -PackageName "ghc" + return "GHC $ghcVersion (apt source repository: $aptSourceRepo)" } function Get-GHCupVersion { diff --git a/images/linux/scripts/installers/haskell.sh b/images/linux/scripts/installers/haskell.sh index 725ab8bc..2ab93c78 100644 --- a/images/linux/scripts/installers/haskell.sh +++ b/images/linux/scripts/installers/haskell.sh @@ -49,4 +49,8 @@ ln -s "/opt/ghc/$defaultGHCVersion/bin/ghc" "/usr/bin/ghc" # Install the latest stable release of haskell stack curl -sSL https://get.haskellstack.org/ | sh -invoke_tests "Haskell" \ No newline at end of file +# remove PPA repo +echo "ghc ppa:hvr/ghc" >> $HELPER_SCRIPTS/apt-sources.txt +add-apt-repository --remove ppa:hvr/ghc + +invoke_tests "Haskell"