From 950cf3cea8075e3347d72aecbdfb26c8bb2832d4 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 4 Nov 2024 09:39:40 +0200 Subject: Don't pass --all option to dnf-list which is removed for dnf5 and is optional for earlier versions --- bpkg/system-package-manager-fedora.cxx | 3 +- bpkg/system-package-manager-fedora.test.testscript | 136 ++++++++++----------- 2 files changed, 70 insertions(+), 69 deletions(-) diff --git a/bpkg/system-package-manager-fedora.cxx b/bpkg/system-package-manager-fedora.cxx index 61ded1a..f12fa0c 100644 --- a/bpkg/system-package-manager-fedora.cxx +++ b/bpkg/system-package-manager-fedora.cxx @@ -204,13 +204,14 @@ namespace bpkg assert (n != 0 && n <= pis.size ()); + // Lists all packages: installed, available, or both. + // // The --quiet option makes sure we don't get 'Last metadata expiration // check: ' printed to stderr. It does not appear to affect // error diagnostics (try specifying a single unknown package). // cstrings args { "dnf", "list", - "--all", // Look for both installed and available. "--cacheonly", // Don't automatically update the metadata. "--quiet"}; diff --git a/bpkg/system-package-manager-fedora.test.testscript b/bpkg/system-package-manager-fedora.test.testscript index 3655514..5ec8a89 100644 --- a/bpkg/system-package-manager-fedora.test.testscript +++ b/bpkg/system-package-manager-fedora.test.testscript @@ -28,7 +28,7 @@ rpm.x86_64 4.17.1-3.fc35 updates rust-uuid+std-devel.noarch 1.2.1-1.fc35 updates EOI - LC_ALL=C dnf list --all --cacheonly --quiet openssl-libs openssl-devel openssl1.1 openssl1.1-devel libsigc++40 libcurl lrmi rust-uuid+std-devel rpm <- + LC_ALL=C dnf list --cacheonly --quiet openssl-libs openssl-devel openssl1.1 openssl1.1-devel libsigc++40 libcurl lrmi rust-uuid+std-devel rpm <- EOE openssl-libs '1:1.1.1q-1.fc35' 'x86_64' '1:1.1.1q-1.fc35' 'x86_64' openssl-devel '1:1.1.1q-1.fc35' 'x86_64' '1:1.1.1q-1.fc35' 'x86_64' @@ -47,7 +47,7 @@ rpm.x86_64 4.17.1-3.fc35 updates Available Packages EOI - LC_ALL=C dnf list --all --cacheonly --quiet libsigc++40 rpm <- + LC_ALL=C dnf list --cacheonly --quiet libsigc++40 rpm <- EOE libsigc++40 '' '' '' '' EOO @@ -61,7 +61,7 @@ lrmi.i686 0.10-28.fc35 fedora rpm.x86_64 4.17.1-3.fc35 updates EOI - LC_ALL=C dnf list --all --cacheonly --quiet lrmi rpm <- + LC_ALL=C dnf list --cacheonly --quiet lrmi rpm <- EOE lrmi '' '' '' '' EOO @@ -74,7 +74,7 @@ Available Packages rpm.x86_64 4.17.1-3.fc35 updates EOI - LC_ALL=C dnf list --all --cacheonly --quiet rpm rpm <- + LC_ALL=C dnf list --cacheonly --quiet rpm rpm <- EOE rpm '4.17.1-2.fc35' 'x86_64' '4.17.1-3.fc35' 'x86_64' EOO @@ -86,7 +86,7 @@ openssl-libs.i686 1:1.1.1q-1.fc35 @updates openssl-libs.x86_64 1:1.1.1q-1.fc35 @updates EOI - LC_ALL=C dnf list --all --cacheonly --quiet openssl-libs rpm <- + LC_ALL=C dnf list --cacheonly --quiet openssl-libs rpm <- error: rpm package doesn't exist EOE } @@ -461,9 +461,9 @@ dnf-repoquery-requires: libpq-devel 13.4-1.fc35 x86_64 true libpq-devel.requires dnf-list: libpq libpq.info EOI - LC_ALL=C dnf list --all --cacheonly --quiet libpq-devel pq-devel rpm >EOE != 0 dnf-list: libpq-devel pq-devel libpq-devel+pq-devel.info EOI - LC_ALL=C dnf list --all --cacheonly --quiet libpq-devel pq-devel rpm >EOE != 0 dnf-list: libpq-devel pq-devel libpq-devel+pq-devel.info EOI - LC_ALL=C dnf list --all --cacheonly --quiet libpq-devel pq-devel rpm >EOE != 0 dnf-list: libpq-devel pq-devel libpq-devel+pq-devel.info EOI - LC_ALL=C dnf list --all --cacheonly --quiet libpq-devel pq-devel rpm >EOE != 0 dnf-list: libsqlite3-devel sqlite3-devel libsqlite3-devel+sqlite3-devel.info EOI - LC_ALL=C dnf list --all --cacheonly --quiet libsqlite3-devel sqlite3-devel rpm >EOE != 0 dnf-list: sqlite3 sqlite3.info EOI - LC_ALL=C dnf list --all --cacheonly --quiet sqlite3 rpm