Show apt sources and preferences used in the CI builds

This may be useful to understand where do the packages come from.
This commit is contained in:
Vadim Zeitlin 2021-03-23 12:57:40 +01:00
parent 51d796b88b
commit c471699187

View File

@ -11,6 +11,13 @@ SUDO=sudo
case $(uname -s) in
Linux)
if [ -f /etc/apt/sources.list ]; then
# Show information about the repositories and priorities used.
echo 'APT sources used:'
$SUDO grep --no-messages '^[^#]' /etc/apt/sources.list /etc/apt/sources.list.d/* || true
echo 'APT preferences:'
$SUDO grep --no-messages '^[^#]' /etc/apt/preferences /etc/apt/preferences.d/* || true
echo '--- End of APT files dump ---'
run_apt() {
echo "Running apt-get $@"