Package: software-properties-common Version: 0.99.30-4 Severity: important File: /usr/bin/add-apt-repository X-Debbugs-Cc: mo...@roscom.com
-- System Information: Debian Release: 12.0 APT prefers stable-security APT policy: (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 5.10.25-linuxkit (SMP w/8 CPU threads) Kernel taint flags: TAINT_OOT_MODULE Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: unable to detect Versions of packages software-properties-common depends on: ii ca-certificates 20230311 ii gir1.2-glib-2.0 1.74.0-3 ii gir1.2-packagekitglib-1.0 1.2.6-5 ii packagekit 1.2.6-5 ii python-apt-common 2.6.0 ii python3 3.11.2-1+b1 ii python3-dbus 1.3.2-4+b1 ii python3-gi 3.42.2-3+b1 ii python3-software-properties 0.99.30-4 software-properties-common recommends no packages. software-properties-common suggests no packages. -- no debconf information The first run of add-apt-repository creates an empty list file and the package can't be found by apt-get-install. Running add-apt-repository a second time creates the correct list file. add-apt-repository "$(curl https://packages.microsoft.com/config/debian/11/prod.list)" More info: https://packages.microsoft.com/debian/11/prod Adding repository. Adding deb entry to /etc/apt/sources.list.d/archive_uri-https_packages_microsoft_com_debian_11_prod-bookworm.list Adding disabled deb-src entry to /etc/apt/sources.list.d/archive_uri-https_packages_microsoft_com_debian_11_prod-bookworm.list ls -al /etc/apt/sources.list.d/archive_uri-https_packages_microsoft_com_debian_11_prod-bookworm.list -rw-r--r-- 1 root root 0 Jul 13 21:41 /etc/apt/sources.list.d/archive_uri-https_packages_microsoft_com_debian_11_prod-bookworm.list add-apt-repository "$(curl https://packages.microsoft.com/config/debian/11/prod.list)" More info: https://packages.microsoft.com/debian/11/prod Adding repository. Adding deb entry to /etc/apt/sources.list.d/archive_uri-https_packages_microsoft_com_debian_11_prod-bookworm.list Adding disabled deb-src entry to /etc/apt/sources.list.d/archive_uri-https_packages_microsoft_com_debian_11_prod-bookworm.list ls -al /etc/apt/sources.list.d/archive_uri-https_packages_microsoft_com_debian_11_prod-bookworm.list -rw-r--r-- 1 root root 184 Jul 13 21:41 /etc/apt/sources.list.d/archive_uri-https_packages_microsoft_com_debian_11_prod-bookworm.list Here is a docker file that can be run to reproduce the problem. It uses a single add-apt-repository and fails with E: Unable to locate package msodbcsql17 FROM debian AS base # Install MSSQL ODBC driver. RUN apt-get update && apt-get install --fix-missing --yes curl apt-utils gnupg2 software-properties-common \ && curl -sSL https://packages.microsoft.com/keys/microsoft.asc > /etc/apt/trusted.gpg.d/microsoft.asc \ && add-apt-repository -d "$(curl https://packages.microsoft.com/config/debian/11/prod.list)" \ && add-apt-repository -d -L \ && ls -al /etc/apt/sources.list.d/ \ && apt-get update \ && apt-get install --yes --fix-missing \ && apt-get install --yes unixodbc-dev \ && ACCEPT_EULA=Y apt-get install --yes msodbcsql17 \ && apt-get autoremove --purge --yes \ && apt-get clean \ && apt-get autoclean