Skip to content

Commit f1f22bd

Browse files
committed
installation uninstallation nuances
1 parent 29c8b9d commit f1f22bd

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

eng/pipelines/pr-validation-pipeline.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -570,9 +570,9 @@ jobs:
570570
echo "Failed to restore AdventureWorks2022 database"
571571
fi
572572
573-
# Clean up
574-
rm -f /tmp/AdventureWorks2022.bak
575-
docker exec sqlserver-$(distroName) rm -f /tmp/AdventureWorks2022.bak
573+
# Clean up (ignore errors if files are locked)
574+
rm -f /tmp/AdventureWorks2022.bak || true
575+
docker exec sqlserver-$(distroName) rm -f /tmp/AdventureWorks2022.bak || true
576576
fi
577577
displayName: 'Download and restore AdventureWorks2022 database in $(distroName)'
578578
condition: and(eq(variables['distroName'], 'Ubuntu'), eq(variables['useAzureSQL'], 'false'))
@@ -594,14 +594,19 @@ jobs:
594594
echo 'Reinstalling ODBC Driver for benchmarking...'
595595
export DEBIAN_FRONTEND=noninteractive
596596
597+
# Remove duplicate repository sources if they exist
598+
rm -f /etc/apt/sources.list.d/microsoft-prod.list
599+
597600
# Add Microsoft repository
598601
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
599602
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list
600603
apt-get update
601604
605+
# Install unixodbc first (provides libodbcinst.so.2 needed by msodbcsql18)
606+
apt-get install -y unixodbc unixodbc-dev
607+
602608
# Install ODBC Driver 18
603609
ACCEPT_EULA=Y apt-get install -y msodbcsql18
604-
apt-get install -y unixodbc-dev
605610
606611
echo 'Installing pyodbc for benchmarking...'
607612
pip install pyodbc

0 commit comments

Comments
 (0)