How to list all (including transient) dependencies of a package with dnf correctly?

This downloads 137 packages (including the root package):

dnf download --resolve --alldeps --downloaddir ~/dnftempdir python3-dnf-plugin-local
ls

alternatives-1.27-1.fc40.x86_64.rpm
audit-libs-4.0.2-1.fc40.x86_64.rpm
basesystem-11-20.fc40.noarch.rpm
bash-5.2.26-3.fc40.x86_64.rpm
bzip2-libs-1.0.8-18.fc40.x86_64.rpm
ca-certificates-2024.2.69_v8.0.401-1.0.fc40.noarch.rpm
coreutils-9.4-9.fc40.x86_64.rpm
coreutils-common-9.4-9.fc40.x86_64.rpm
createrepo_c-1.1.4-1.fc40.x86_64.rpm
createrepo_c-libs-1.1.4-1.fc40.x86_64.rpm
crypto-policies-20241011-1.git5930b9a.fc40.noarch.rpm
curl-8.6.0-10.fc40.x86_64.rpm
cyrus-sasl-lib-2.1.28-19.fc40.x86_64.rpm
dbus-libs-1.14.10-3.fc40.x86_64.rpm
dnf-data-4.22.0-1.fc40.noarch.rpm
drpm-0.5.2-5.fc40.x86_64.rpm
elfutils-default-yama-scope-0.192-7.fc40.noarch.rpm
elfutils-libelf-0.192-7.fc40.x86_64.rpm
elfutils-libs-0.192-7.fc40.x86_64.rpm
expat-2.6.3-1.fc40.x86_64.rpm
fedora-gpg-keys-40-2.noarch.rpm
fedora-release-40-40.noarch.rpm
fedora-release-common-40-40.noarch.rpm
fedora-release-identity-basic-40-40.noarch.rpm
fedora-repos-40-2.noarch.rpm
file-libs-5.45-4.fc40.x86_64.rpm
filesystem-3.18-8.fc40.x86_64.rpm
findutils-4.9.0-9.fc40.x86_64.rpm
gawk-5.3.0-3.fc40.x86_64.rpm
gdbm-libs-1.23-6.fc40.x86_64.rpm
glib2-2.80.3-1.fc40.x86_64.rpm
glibc-2.39-22.fc40.x86_64.rpm
glibc-common-2.39-22.fc40.x86_64.rpm
glibc-minimal-langpack-2.39-22.fc40.x86_64.rpm
gmp-6.2.1-8.fc40.x86_64.rpm
gnupg2-2.4.4-1.fc40.x86_64.rpm
gnutls-3.8.6-1.fc40.x86_64.rpm
grep-3.11-7.fc40.x86_64.rpm
ima-evm-utils-1.5-4.fc40.x86_64.rpm
json-c-0.17-3.fc40.x86_64.rpm
keyutils-libs-1.6.3-3.fc40.x86_64.rpm
krb5-libs-1.21.3-2.fc40.x86_64.rpm
libacl-2.3.2-1.fc40.x86_64.rpm
libarchive-3.7.2-7.fc40.x86_64.rpm
libassuan-2.5.7-1.fc40.x86_64.rpm
libattr-2.5.2-3.fc40.x86_64.rpm
libb2-0.98.1-11.fc40.x86_64.rpm
libblkid-2.40.2-1.fc40.x86_64.rpm
libbrotli-1.1.0-3.fc40.x86_64.rpm
libcap-2.69-8.fc40.x86_64.rpm
libcap-ng-0.8.4-4.fc40.x86_64.rpm
libcom_err-1.47.0-5.fc40.x86_64.rpm
libcomps-0.1.20-5.fc40.x86_64.rpm
libcurl-8.6.0-10.fc40.x86_64.rpm
libdnf-0.73.4-1.fc40.x86_64.rpm
libeconf-0.6.2-2.fc40.x86_64.rpm
libevent-2.1.12-12.fc40.x86_64.rpm
libffi-3.4.4-7.fc40.x86_64.rpm
libfsverity-1.4-12.fc40.x86_64.rpm
libgcc-14.2.1-3.fc40.x86_64.rpm
libgcrypt-1.10.3-3.fc40.x86_64.rpm
libgomp-14.2.1-3.fc40.x86_64.rpm
libgpg-error-1.49-1.fc40.x86_64.rpm
libidn2-2.3.7-1.fc40.x86_64.rpm
libksba-1.6.6-1.fc40.x86_64.rpm
libmodulemd-2.15.0-12.fc40.x86_64.rpm
libmount-2.40.2-1.fc40.x86_64.rpm
libnghttp2-1.59.0-3.fc40.x86_64.rpm
libnsl2-2.0.1-1.fc40.x86_64.rpm
libpsl-0.21.5-3.fc40.x86_64.rpm
librepo-1.19.0-1.fc40.x86_64.rpm
libselinux-3.7-5.fc40.x86_64.rpm
libsemanage-3.7-2.fc40.x86_64.rpm
libsepol-3.7-2.fc40.x86_64.rpm
libsmartcols-2.40.2-1.fc40.x86_64.rpm
libsolv-0.7.31-1.fc40.x86_64.rpm
libssh-0.10.6-5.fc40.x86_64.rpm
libssh-config-0.10.6-5.fc40.noarch.rpm
libstdc+±14.2.1-3.fc40.x86_64.rpm
libtasn1-4.19.0-6.fc40.x86_64.rpm
libtirpc-1.3.6-1.fc40.x86_64.rpm
libtool-ltdl-2.4.7-10.fc40.x86_64.rpm
libunistring-1.1-7.fc40.x86_64.rpm
libuuid-2.40.2-1.fc40.x86_64.rpm
libverto-0.3.2-8.fc40.x86_64.rpm
libxcrypt-4.4.36-11.fc40.x86_64.rpm
libxml2-2.12.8-1.fc40.x86_64.rpm
libyaml-0.2.5-14.fc40.x86_64.rpm
libzstd-1.5.6-1.fc40.x86_64.rpm
lua-libs-5.4.6-5.fc40.x86_64.rpm
lz4-libs-1.9.4-6.fc40.x86_64.rpm
mpdecimal-2.5.1-9.fc40.x86_64.rpm
mpfr-4.2.1-4.fc40.x86_64.rpm
ncurses-base-6.4-12.20240127.fc40.noarch.rpm
ncurses-libs-6.4-12.20240127.fc40.x86_64.rpm
nettle-3.9.1-6.fc40.x86_64.rpm
npth-1.7-1.fc40.x86_64.rpm
openldap-2.6.7-1.fc40.x86_64.rpm
openssl-libs-3.2.2-3.fc40.x86_64.rpm
p11-kit-0.25.5-1.fc40.x86_64.rpm
p11-kit-trust-0.25.5-1.fc40.x86_64.rpm
pam-libs-1.6.1-5.fc40.x86_64.rpm
pcre2-10.44-1.fc40.x86_64.rpm
pcre2-syntax-10.44-1.fc40.noarch.rpm
popt-1.19-6.fc40.x86_64.rpm
publicsuffix-list-dafsa-20240107-3.fc40.noarch.rpm
python3-3.12.7-1.fc40.x86_64.rpm
python3-dateutil-2.8.2-13.fc40.noarch.rpm
python3-dbus-1.3.2-6.fc40.x86_64.rpm
python3-distro-1.9.0-3.fc40.noarch.rpm
python3-dnf-4.22.0-1.fc40.noarch.rpm
python3-dnf-plugin-local-4.10.0-1.fc40.noarch.rpm
python3-dnf-plugins-core-4.10.0-1.fc40.noarch.rpm
python3-hawkey-0.73.4-1.fc40.x86_64.rpm
python3-libcomps-0.1.20-5.fc40.x86_64.rpm
python3-libdnf-0.73.4-1.fc40.x86_64.rpm
python3-libs-3.12.7-1.fc40.x86_64.rpm
python3-rpm-4.19.1.1-1.fc40.x86_64.rpm
python3-six-1.16.0-14.fc40.noarch.rpm
python3-systemd-235-9.fc40.x86_64.rpm
python-pip-wheel-23.3.2-2.fc40.noarch.rpm
readline-8.2-8.fc40.x86_64.rpm
rpm-4.19.1.1-1.fc40.x86_64.rpm
rpm-build-libs-4.19.1.1-1.fc40.x86_64.rpm
rpm-libs-4.19.1.1-1.fc40.x86_64.rpm
rpm-sequoia-1.7.0-3.fc40.x86_64.rpm
rpm-sign-libs-4.19.1.1-1.fc40.x86_64.rpm
sed-4.9-1.fc40.x86_64.rpm
setup-2.14.5-2.fc40.noarch.rpm
shadow-utils-4.15.1-4.fc40.x86_64.rpm
sqlite-libs-3.45.1-2.fc40.x86_64.rpm
systemd-libs-255.15-1.fc40.x86_64.rpm
tpm2-tss-4.1.3-1.fc40.x86_64.rpm
tzdata-2024a-5.fc40.noarch.rpm
xz-libs-5.4.6-3.fc40.x86_64.rpm
zchunk-libs-1.5.1-1.fc40.x86_64.rpm
zlib-ng-compat-2.1.7-2.fc40.x86_64.rpm

This however prints 481 packages (excluding the root package):

dnf repoquery --requires --resolve --recursive python3-dnf-plugin-local
output

alternatives-0:1.27-1.fc40.x86_64
audit-libs-0:4.0.2-1.fc40.i686
audit-libs-0:4.0.2-1.fc40.x86_64
basesystem-0:11-20.fc40.noarch
bash-0:5.2.26-3.fc40.x86_64
bzip2-libs-0:1.0.8-18.fc40.i686
bzip2-libs-0:1.0.8-18.fc40.x86_64
ca-certificates-0:2024.2.69_v8.0.401-1.0.fc40.noarch
composefs-libs-0:1.0.6-1.fc40.i686
composefs-libs-0:1.0.6-1.fc40.x86_64
coreutils-0:9.4-9.fc40.x86_64
coreutils-common-0:9.4-9.fc40.x86_64
coreutils-single-0:9.4-9.fc40.x86_64
createrepo_c-0:1.1.4-1.fc40.x86_64
createrepo_c-libs-0:1.1.4-1.fc40.i686
createrepo_c-libs-0:1.1.4-1.fc40.x86_64
crypto-policies-0:20241011-1.git5930b9a.fc40.noarch
curl-0:8.6.0-10.fc40.x86_64
cyrus-sasl-lib-0:2.1.28-19.fc40.i686
cyrus-sasl-lib-0:2.1.28-19.fc40.x86_64
dbus-libs-1:1.14.10-3.fc40.x86_64
dnf-data-0:4.22.0-1.fc40.noarch
drpm-0:0.5.2-5.fc40.i686
drpm-0:0.5.2-5.fc40.x86_64
elfutils-default-yama-scope-0:0.192-7.fc40.noarch
elfutils-libelf-0:0.192-7.fc40.x86_64
elfutils-libs-0:0.192-7.fc40.x86_64
expat-0:2.6.3-1.fc40.i686
expat-0:2.6.3-1.fc40.x86_64
fedora-gpg-keys-0:40-2.noarch
fedora-iot-config-0:1-1.fc40.noarch
fedora-release-0:40-40.noarch
fedora-release-budgie-0:40-40.noarch
fedora-release-budgie-atomic-0:40-40.noarch
fedora-release-cinnamon-0:40-40.noarch
fedora-release-cloud-0:40-40.noarch
fedora-release-common-0:40-40.noarch
fedora-release-compneuro-0:40-40.noarch
fedora-release-container-0:40-40.noarch
fedora-release-coreos-0:40-40.noarch
fedora-release-designsuite-0:40-40.noarch
fedora-release-i3-0:40-40.noarch
fedora-release-identity-basic-0:40-40.noarch
fedora-release-identity-budgie-0:40-40.noarch
fedora-release-identity-budgie-atomic-0:40-40.noarch
fedora-release-identity-cinnamon-0:40-40.noarch
fedora-release-identity-cloud-0:40-40.noarch
fedora-release-identity-compneuro-0:40-40.noarch
fedora-release-identity-container-0:40-40.noarch
fedora-release-identity-coreos-0:40-40.noarch
fedora-release-identity-designsuite-0:40-40.noarch
fedora-release-identity-i3-0:40-40.noarch
fedora-release-identity-iot-0:40-40.noarch
fedora-release-identity-kde-0:40-40.noarch
fedora-release-identity-kinoite-0:40-40.noarch
fedora-release-identity-lxqt-0:40-40.noarch
fedora-release-identity-matecompiz-0:40-40.noarch
fedora-release-identity-mobility-0:40-40.noarch
fedora-release-identity-server-0:40-40.noarch
fedora-release-identity-silverblue-0:40-40.noarch
fedora-release-identity-snappy-0:40-40.noarch
fedora-release-identity-soas-0:40-40.noarch
fedora-release-identity-sway-0:40-40.noarch
fedora-release-identity-sway-atomic-0:40-40.noarch
fedora-release-identity-toolbx-0:40-40.noarch
fedora-release-identity-workstation-0:40-40.noarch
fedora-release-identity-xfce-0:40-40.noarch
fedora-release-iot-0:40-40.noarch
fedora-release-kde-0:40-40.noarch
fedora-release-kinoite-0:40-40.noarch
fedora-release-lxqt-0:40-40.noarch
fedora-release-matecompiz-0:40-40.noarch
fedora-release-mobility-0:40-40.noarch
fedora-release-ostree-desktop-0:40-40.noarch
fedora-release-server-0:40-40.noarch
fedora-release-silverblue-0:40-40.noarch
fedora-release-snappy-0:40-40.noarch
fedora-release-soas-0:40-40.noarch
fedora-release-sway-0:40-40.noarch
fedora-release-sway-atomic-0:40-40.noarch
fedora-release-toolbx-0:40-40.noarch
fedora-release-workstation-0:40-40.noarch
fedora-release-xfce-0:40-40.noarch
fedora-repos-0:40-2.noarch
file-libs-0:5.45-4.fc40.x86_64
filesystem-0:3.18-8.fc40.x86_64
findutils-1:4.9.0-9.fc40.x86_64
gawk-0:5.3.0-3.fc40.i686
gawk-0:5.3.0-3.fc40.x86_64
gdbm-libs-1:1.23-6.fc40.i686
gdbm-libs-1:1.23-6.fc40.x86_64
generic-release-0:40-0.1.noarch
generic-release-common-0:40-0.1.noarch
glib2-0:2.80.3-1.fc40.i686
glib2-0:2.80.3-1.fc40.x86_64
glibc-0:2.39-22.fc40.i686
glibc-0:2.39-22.fc40.x86_64
glibc-all-langpacks-0:2.39-22.fc40.x86_64
glibc-common-0:2.39-22.fc40.x86_64
glibc-gconv-extra-0:2.39-22.fc40.i686
glibc-gconv-extra-0:2.39-22.fc40.x86_64
glibc-langpack-aa-0:2.39-22.fc40.x86_64
glibc-langpack-af-0:2.39-22.fc40.x86_64
glibc-langpack-agr-0:2.39-22.fc40.x86_64
glibc-langpack-ak-0:2.39-22.fc40.x86_64
glibc-langpack-am-0:2.39-22.fc40.x86_64
glibc-langpack-an-0:2.39-22.fc40.x86_64
glibc-langpack-anp-0:2.39-22.fc40.x86_64
glibc-langpack-ar-0:2.39-22.fc40.x86_64
glibc-langpack-as-0:2.39-22.fc40.x86_64
glibc-langpack-ast-0:2.39-22.fc40.x86_64
glibc-langpack-ayc-0:2.39-22.fc40.x86_64
glibc-langpack-az-0:2.39-22.fc40.x86_64
glibc-langpack-be-0:2.39-22.fc40.x86_64
glibc-langpack-bem-0:2.39-22.fc40.x86_64
glibc-langpack-ber-0:2.39-22.fc40.x86_64
glibc-langpack-bg-0:2.39-22.fc40.x86_64
glibc-langpack-bhb-0:2.39-22.fc40.x86_64
glibc-langpack-bho-0:2.39-22.fc40.x86_64
glibc-langpack-bi-0:2.39-22.fc40.x86_64
glibc-langpack-bn-0:2.39-22.fc40.x86_64
glibc-langpack-bo-0:2.39-22.fc40.x86_64
glibc-langpack-br-0:2.39-22.fc40.x86_64
glibc-langpack-brx-0:2.39-22.fc40.x86_64
glibc-langpack-bs-0:2.39-22.fc40.x86_64
glibc-langpack-byn-0:2.39-22.fc40.x86_64
glibc-langpack-ca-0:2.39-22.fc40.x86_64
glibc-langpack-ce-0:2.39-22.fc40.x86_64
glibc-langpack-chr-0:2.39-22.fc40.x86_64
glibc-langpack-ckb-0:2.39-22.fc40.x86_64
glibc-langpack-cmn-0:2.39-22.fc40.x86_64
glibc-langpack-crh-0:2.39-22.fc40.x86_64
glibc-langpack-cs-0:2.39-22.fc40.x86_64
glibc-langpack-csb-0:2.39-22.fc40.x86_64
glibc-langpack-cv-0:2.39-22.fc40.x86_64
glibc-langpack-cy-0:2.39-22.fc40.x86_64
glibc-langpack-da-0:2.39-22.fc40.x86_64
glibc-langpack-de-0:2.39-22.fc40.x86_64
glibc-langpack-doi-0:2.39-22.fc40.x86_64
glibc-langpack-dsb-0:2.39-22.fc40.x86_64
glibc-langpack-dv-0:2.39-22.fc40.x86_64
glibc-langpack-dz-0:2.39-22.fc40.x86_64
glibc-langpack-el-0:2.39-22.fc40.x86_64
glibc-langpack-en-0:2.39-22.fc40.x86_64
glibc-langpack-eo-0:2.39-22.fc40.x86_64
glibc-langpack-es-0:2.39-22.fc40.x86_64
glibc-langpack-et-0:2.39-22.fc40.x86_64
glibc-langpack-eu-0:2.39-22.fc40.x86_64
glibc-langpack-fa-0:2.39-22.fc40.x86_64
glibc-langpack-ff-0:2.39-22.fc40.x86_64
glibc-langpack-fi-0:2.39-22.fc40.x86_64
glibc-langpack-fil-0:2.39-22.fc40.x86_64
glibc-langpack-fo-0:2.39-22.fc40.x86_64
glibc-langpack-fr-0:2.39-22.fc40.x86_64
glibc-langpack-fur-0:2.39-22.fc40.x86_64
glibc-langpack-fy-0:2.39-22.fc40.x86_64
glibc-langpack-ga-0:2.39-22.fc40.x86_64
glibc-langpack-gbm-0:2.39-22.fc40.x86_64
glibc-langpack-gd-0:2.39-22.fc40.x86_64
glibc-langpack-gez-0:2.39-22.fc40.x86_64
glibc-langpack-gl-0:2.39-22.fc40.x86_64
glibc-langpack-gu-0:2.39-22.fc40.x86_64
glibc-langpack-gv-0:2.39-22.fc40.x86_64
glibc-langpack-ha-0:2.39-22.fc40.x86_64
glibc-langpack-hak-0:2.39-22.fc40.x86_64
glibc-langpack-he-0:2.39-22.fc40.x86_64
glibc-langpack-hi-0:2.39-22.fc40.x86_64
glibc-langpack-hif-0:2.39-22.fc40.x86_64
glibc-langpack-hne-0:2.39-22.fc40.x86_64
glibc-langpack-hr-0:2.39-22.fc40.x86_64
glibc-langpack-hsb-0:2.39-22.fc40.x86_64
glibc-langpack-ht-0:2.39-22.fc40.x86_64
glibc-langpack-hu-0:2.39-22.fc40.x86_64
glibc-langpack-hy-0:2.39-22.fc40.x86_64
glibc-langpack-ia-0:2.39-22.fc40.x86_64
glibc-langpack-id-0:2.39-22.fc40.x86_64
glibc-langpack-ig-0:2.39-22.fc40.x86_64
glibc-langpack-ik-0:2.39-22.fc40.x86_64
glibc-langpack-is-0:2.39-22.fc40.x86_64
glibc-langpack-it-0:2.39-22.fc40.x86_64
glibc-langpack-iu-0:2.39-22.fc40.x86_64
glibc-langpack-ja-0:2.39-22.fc40.x86_64
glibc-langpack-ka-0:2.39-22.fc40.x86_64
glibc-langpack-kab-0:2.39-22.fc40.x86_64
glibc-langpack-kk-0:2.39-22.fc40.x86_64
glibc-langpack-kl-0:2.39-22.fc40.x86_64
glibc-langpack-km-0:2.39-22.fc40.x86_64
glibc-langpack-kn-0:2.39-22.fc40.x86_64
glibc-langpack-ko-0:2.39-22.fc40.x86_64
glibc-langpack-kok-0:2.39-22.fc40.x86_64
glibc-langpack-ks-0:2.39-22.fc40.x86_64
glibc-langpack-ku-0:2.39-22.fc40.x86_64
glibc-langpack-kv-0:2.39-22.fc40.x86_64
glibc-langpack-kw-0:2.39-22.fc40.x86_64
glibc-langpack-ky-0:2.39-22.fc40.x86_64
glibc-langpack-lb-0:2.39-22.fc40.x86_64
glibc-langpack-lg-0:2.39-22.fc40.x86_64
glibc-langpack-li-0:2.39-22.fc40.x86_64
glibc-langpack-lij-0:2.39-22.fc40.x86_64
glibc-langpack-ln-0:2.39-22.fc40.x86_64
glibc-langpack-lo-0:2.39-22.fc40.x86_64
glibc-langpack-lt-0:2.39-22.fc40.x86_64
glibc-langpack-lv-0:2.39-22.fc40.x86_64
glibc-langpack-lzh-0:2.39-22.fc40.x86_64
glibc-langpack-mag-0:2.39-22.fc40.x86_64
glibc-langpack-mai-0:2.39-22.fc40.x86_64
glibc-langpack-mfe-0:2.39-22.fc40.x86_64
glibc-langpack-mg-0:2.39-22.fc40.x86_64
glibc-langpack-mhr-0:2.39-22.fc40.x86_64
glibc-langpack-mi-0:2.39-22.fc40.x86_64
glibc-langpack-miq-0:2.39-22.fc40.x86_64
glibc-langpack-mjw-0:2.39-22.fc40.x86_64
glibc-langpack-mk-0:2.39-22.fc40.x86_64
glibc-langpack-ml-0:2.39-22.fc40.x86_64
glibc-langpack-mn-0:2.39-22.fc40.x86_64
glibc-langpack-mni-0:2.39-22.fc40.x86_64
glibc-langpack-mnw-0:2.39-22.fc40.x86_64
glibc-langpack-mr-0:2.39-22.fc40.x86_64
glibc-langpack-ms-0:2.39-22.fc40.x86_64
glibc-langpack-mt-0:2.39-22.fc40.x86_64
glibc-langpack-my-0:2.39-22.fc40.x86_64
glibc-langpack-nan-0:2.39-22.fc40.x86_64
glibc-langpack-nb-0:2.39-22.fc40.x86_64
glibc-langpack-nds-0:2.39-22.fc40.x86_64
glibc-langpack-ne-0:2.39-22.fc40.x86_64
glibc-langpack-nhn-0:2.39-22.fc40.x86_64
glibc-langpack-niu-0:2.39-22.fc40.x86_64
glibc-langpack-nl-0:2.39-22.fc40.x86_64
glibc-langpack-nn-0:2.39-22.fc40.x86_64
glibc-langpack-nr-0:2.39-22.fc40.x86_64
glibc-langpack-nso-0:2.39-22.fc40.x86_64
glibc-langpack-oc-0:2.39-22.fc40.x86_64
glibc-langpack-om-0:2.39-22.fc40.x86_64
glibc-langpack-or-0:2.39-22.fc40.x86_64
glibc-langpack-os-0:2.39-22.fc40.x86_64
glibc-langpack-pa-0:2.39-22.fc40.x86_64
glibc-langpack-pap-0:2.39-22.fc40.x86_64
glibc-langpack-pl-0:2.39-22.fc40.x86_64
glibc-langpack-ps-0:2.39-22.fc40.x86_64
glibc-langpack-pt-0:2.39-22.fc40.x86_64
glibc-langpack-quz-0:2.39-22.fc40.x86_64
glibc-langpack-raj-0:2.39-22.fc40.x86_64
glibc-langpack-rif-0:2.39-22.fc40.x86_64
glibc-langpack-ro-0:2.39-22.fc40.x86_64
glibc-langpack-ru-0:2.39-22.fc40.x86_64
glibc-langpack-rw-0:2.39-22.fc40.x86_64
glibc-langpack-sa-0:2.39-22.fc40.x86_64
glibc-langpack-sah-0:2.39-22.fc40.x86_64
glibc-langpack-sat-0:2.39-22.fc40.x86_64
glibc-langpack-sc-0:2.39-22.fc40.x86_64
glibc-langpack-sd-0:2.39-22.fc40.x86_64
glibc-langpack-se-0:2.39-22.fc40.x86_64
glibc-langpack-sgs-0:2.39-22.fc40.x86_64
glibc-langpack-shn-0:2.39-22.fc40.x86_64
glibc-langpack-shs-0:2.39-22.fc40.x86_64
glibc-langpack-si-0:2.39-22.fc40.x86_64
glibc-langpack-sid-0:2.39-22.fc40.x86_64
glibc-langpack-sk-0:2.39-22.fc40.x86_64
glibc-langpack-sl-0:2.39-22.fc40.x86_64
glibc-langpack-sm-0:2.39-22.fc40.x86_64
glibc-langpack-so-0:2.39-22.fc40.x86_64
glibc-langpack-sq-0:2.39-22.fc40.x86_64
glibc-langpack-sr-0:2.39-22.fc40.x86_64
glibc-langpack-ss-0:2.39-22.fc40.x86_64
glibc-langpack-ssy-0:2.39-22.fc40.x86_64
glibc-langpack-st-0:2.39-22.fc40.x86_64
glibc-langpack-su-0:2.39-22.fc40.x86_64
glibc-langpack-sv-0:2.39-22.fc40.x86_64
glibc-langpack-sw-0:2.39-22.fc40.x86_64
glibc-langpack-syr-0:2.39-22.fc40.x86_64
glibc-langpack-szl-0:2.39-22.fc40.x86_64
glibc-langpack-ta-0:2.39-22.fc40.x86_64
glibc-langpack-tcy-0:2.39-22.fc40.x86_64
glibc-langpack-te-0:2.39-22.fc40.x86_64
glibc-langpack-tg-0:2.39-22.fc40.x86_64
glibc-langpack-th-0:2.39-22.fc40.x86_64
glibc-langpack-the-0:2.39-22.fc40.x86_64
glibc-langpack-ti-0:2.39-22.fc40.x86_64
glibc-langpack-tig-0:2.39-22.fc40.x86_64
glibc-langpack-tk-0:2.39-22.fc40.x86_64
glibc-langpack-tl-0:2.39-22.fc40.x86_64
glibc-langpack-tn-0:2.39-22.fc40.x86_64
glibc-langpack-to-0:2.39-22.fc40.x86_64
glibc-langpack-tok-0:2.39-22.fc40.x86_64
glibc-langpack-tpi-0:2.39-22.fc40.x86_64
glibc-langpack-tr-0:2.39-22.fc40.x86_64
glibc-langpack-ts-0:2.39-22.fc40.x86_64
glibc-langpack-tt-0:2.39-22.fc40.x86_64
glibc-langpack-ug-0:2.39-22.fc40.x86_64
glibc-langpack-uk-0:2.39-22.fc40.x86_64
glibc-langpack-unm-0:2.39-22.fc40.x86_64
glibc-langpack-ur-0:2.39-22.fc40.x86_64
glibc-langpack-uz-0:2.39-22.fc40.x86_64
glibc-langpack-ve-0:2.39-22.fc40.x86_64
glibc-langpack-vi-0:2.39-22.fc40.x86_64
glibc-langpack-wa-0:2.39-22.fc40.x86_64
glibc-langpack-wae-0:2.39-22.fc40.x86_64
glibc-langpack-wal-0:2.39-22.fc40.x86_64
glibc-langpack-wo-0:2.39-22.fc40.x86_64
glibc-langpack-xh-0:2.39-22.fc40.x86_64
glibc-langpack-yi-0:2.39-22.fc40.x86_64
glibc-langpack-yo-0:2.39-22.fc40.x86_64
glibc-langpack-yue-0:2.39-22.fc40.x86_64
glibc-langpack-yuw-0:2.39-22.fc40.x86_64
glibc-langpack-zgh-0:2.39-22.fc40.x86_64
glibc-langpack-zh-0:2.39-22.fc40.x86_64
glibc-langpack-zu-0:2.39-22.fc40.x86_64
glibc-minimal-langpack-0:2.39-22.fc40.x86_64
gmp-1:6.2.1-8.fc40.i686
gmp-1:6.2.1-8.fc40.x86_64
gnupg2-0:2.4.4-1.fc40.x86_64
gnutls-0:3.8.6-1.fc40.i686
gnutls-0:3.8.6-1.fc40.x86_64
gpgme-0:1.23.2-3.fc40.i686
gpgme-0:1.23.2-3.fc40.x86_64
grep-0:3.11-7.fc40.x86_64
ima-evm-utils-0:1.5-4.fc40.x86_64
json-c-0:0.17-3.fc40.x86_64
keyutils-libs-0:1.6.3-3.fc40.i686
keyutils-libs-0:1.6.3-3.fc40.x86_64
krb5-libs-0:1.21.3-2.fc40.i686
krb5-libs-0:1.21.3-2.fc40.x86_64
libacl-0:2.3.2-1.fc40.i686
libacl-0:2.3.2-1.fc40.x86_64
libarchive-0:3.7.2-7.fc40.i686
libarchive-0:3.7.2-7.fc40.x86_64
libassuan-0:2.5.7-1.fc40.i686
libassuan-0:2.5.7-1.fc40.x86_64
libattr-0:2.5.2-3.fc40.i686
libattr-0:2.5.2-3.fc40.x86_64
libb2-0:0.98.1-11.fc40.i686
libb2-0:0.98.1-11.fc40.x86_64
libblkid-0:2.40.2-1.fc40.i686
libblkid-0:2.40.2-1.fc40.x86_64
libbrotli-0:1.1.0-3.fc40.i686
libbrotli-0:1.1.0-3.fc40.x86_64
libcap-0:2.69-8.fc40.i686
libcap-0:2.69-8.fc40.x86_64
libcap-ng-0:0.8.4-4.fc40.i686
libcap-ng-0:0.8.4-4.fc40.x86_64
libcom_err-0:1.47.0-5.fc40.i686
libcom_err-0:1.47.0-5.fc40.x86_64
libcomps-0:0.1.20-5.fc40.x86_64
libcurl-0:8.6.0-10.fc40.i686
libcurl-0:8.6.0-10.fc40.x86_64
libcurl-minimal-0:8.6.0-10.fc40.i686
libcurl-minimal-0:8.6.0-10.fc40.x86_64
libdnf-0:0.73.4-1.fc40.x86_64
libeconf-0:0.6.2-2.fc40.i686
libeconf-0:0.6.2-2.fc40.x86_64
libevent-0:2.1.12-12.fc40.i686
libevent-0:2.1.12-12.fc40.x86_64
libffi-0:3.4.4-7.fc40.i686
libffi-0:3.4.4-7.fc40.x86_64
libfsverity-0:1.4-12.fc40.x86_64
libgcc-0:14.2.1-3.fc40.i686
libgcc-0:14.2.1-3.fc40.x86_64
libgcrypt-0:1.10.3-3.fc40.i686
libgcrypt-0:1.10.3-3.fc40.x86_64
libgomp-0:14.2.1-3.fc40.i686
libgomp-0:14.2.1-3.fc40.x86_64
libgpg-error-0:1.49-1.fc40.i686
libgpg-error-0:1.49-1.fc40.x86_64
libidn2-0:2.3.7-1.fc40.i686
libidn2-0:2.3.7-1.fc40.x86_64
libksba-0:1.6.6-1.fc40.x86_64
libmodulemd-0:2.15.0-12.fc40.i686
libmodulemd-0:2.15.0-12.fc40.x86_64
libmount-0:2.40.2-1.fc40.i686
libmount-0:2.40.2-1.fc40.x86_64
libnghttp2-0:1.59.0-3.fc40.i686
libnghttp2-0:1.59.0-3.fc40.x86_64
libnsl2-0:2.0.1-1.fc40.i686
libnsl2-0:2.0.1-1.fc40.x86_64
libpsl-0:0.21.5-3.fc40.i686
libpsl-0:0.21.5-3.fc40.x86_64
librepo-0:1.19.0-1.fc40.x86_64
libreport-filesystem-0:2.17.15-1.fc40.noarch
libselinux-0:3.7-5.fc40.i686
libselinux-0:3.7-5.fc40.x86_64
libsemanage-0:3.7-2.fc40.x86_64
libsepol-0:3.7-2.fc40.i686
libsepol-0:3.7-2.fc40.x86_64
libsmartcols-0:2.40.2-1.fc40.x86_64
libsolv-0:0.7.31-1.fc40.x86_64
libssh-0:0.10.6-5.fc40.i686
libssh-0:0.10.6-5.fc40.x86_64
libssh-config-0:0.10.6-5.fc40.noarch
libstdc+±0:14.2.1-3.fc40.x86_64
libtasn1-0:4.19.0-6.fc40.i686
libtasn1-0:4.19.0-6.fc40.x86_64
libtirpc-0:1.3.6-1.fc40.i686
libtirpc-0:1.3.6-1.fc40.x86_64
libtool-ltdl-0:2.4.7-10.fc40.i686
libtool-ltdl-0:2.4.7-10.fc40.x86_64
libunistring-0:1.1-7.fc40.i686
libunistring-0:1.1-7.fc40.x86_64
libuuid-0:2.40.2-1.fc40.i686
libuuid-0:2.40.2-1.fc40.x86_64
libverto-0:0.3.2-8.fc40.i686
libverto-0:0.3.2-8.fc40.x86_64
libxcrypt-0:4.4.36-11.fc40.i686
libxcrypt-0:4.4.36-11.fc40.x86_64
libxml2-0:2.12.8-1.fc40.i686
libxml2-0:2.12.8-1.fc40.x86_64
libyaml-0:0.2.5-14.fc40.i686
libyaml-0:0.2.5-14.fc40.x86_64
libzstd-0:1.5.6-1.fc40.i686
libzstd-0:1.5.6-1.fc40.x86_64
lua-libs-0:5.4.6-5.fc40.i686
lua-libs-0:5.4.6-5.fc40.x86_64
lz4-libs-0:1.9.4-6.fc40.i686
lz4-libs-0:1.9.4-6.fc40.x86_64
mpdecimal-0:2.5.1-9.fc40.i686
mpdecimal-0:2.5.1-9.fc40.x86_64
mpfr-0:4.2.1-4.fc40.i686
mpfr-0:4.2.1-4.fc40.x86_64
ncurses-base-0:6.4-12.20240127.fc40.noarch
ncurses-libs-0:6.4-12.20240127.fc40.i686
ncurses-libs-0:6.4-12.20240127.fc40.x86_64
nettle-0:3.9.1-6.fc40.i686
nettle-0:3.9.1-6.fc40.x86_64
npth-0:1.7-1.fc40.x86_64
openldap-0:2.6.7-1.fc40.i686
openldap-0:2.6.7-1.fc40.x86_64
openssl-libs-1:3.2.2-3.fc40.i686
openssl-libs-1:3.2.2-3.fc40.x86_64
ostree-libs-0:2024.9-1.fc40.i686
ostree-libs-0:2024.9-1.fc40.x86_64
p11-kit-0:0.25.5-1.fc40.i686
p11-kit-0:0.25.5-1.fc40.x86_64
p11-kit-trust-0:0.25.5-1.fc40.i686
p11-kit-trust-0:0.25.5-1.fc40.x86_64
pam-libs-0:1.6.1-5.fc40.i686
pam-libs-0:1.6.1-5.fc40.x86_64
pcre2-0:10.44-1.fc40.i686
pcre2-0:10.44-1.fc40.x86_64
pcre2-syntax-0:10.44-1.fc40.noarch
popt-0:1.19-6.fc40.i686
popt-0:1.19-6.fc40.x86_64
publicsuffix-list-dafsa-0:20240107-3.fc40.noarch
python-pip-wheel-0:23.3.2-2.fc40.noarch
python3-0:3.12.7-1.fc40.i686
python3-0:3.12.7-1.fc40.x86_64
python3-dateutil-1:2.8.2-13.fc40.noarch
python3-dbus-0:1.3.2-6.fc40.x86_64
python3-distro-0:1.9.0-3.fc40.noarch
python3-dnf-0:4.22.0-1.fc40.noarch
python3-dnf-plugins-core-0:4.10.0-1.fc40.noarch
python3-hawkey-0:0.73.4-1.fc40.x86_64
python3-libcomps-0:0.1.20-5.fc40.x86_64
python3-libdnf-0:0.73.4-1.fc40.x86_64
python3-libs-0:3.12.7-1.fc40.i686
python3-libs-0:3.12.7-1.fc40.x86_64
python3-rpm-0:4.19.1.1-1.fc40.x86_64
python3-six-0:1.16.0-14.fc40.noarch
python3-systemd-0:235-9.fc40.x86_64
readline-0:8.2-8.fc40.i686
readline-0:8.2-8.fc40.x86_64
rpm-0:4.19.1.1-1.fc40.x86_64
rpm-build-libs-0:4.19.1.1-1.fc40.x86_64
rpm-libs-0:4.19.1.1-1.fc40.i686
rpm-libs-0:4.19.1.1-1.fc40.x86_64
rpm-sequoia-0:1.7.0-3.fc40.i686
rpm-sequoia-0:1.7.0-3.fc40.x86_64
rpm-sign-libs-0:4.19.1.1-1.fc40.x86_64
sed-0:4.9-1.fc40.x86_64
setup-0:2.14.5-2.fc40.noarch
shadow-utils-2:4.15.1-4.fc40.x86_64
sqlite-libs-0:3.45.1-2.fc40.i686
sqlite-libs-0:3.45.1-2.fc40.x86_64
systemd-libs-0:255.15-1.fc40.i686
systemd-libs-0:255.15-1.fc40.x86_64
tpm2-tss-0:4.1.3-1.fc40.x86_64
tzdata-0:2024a-5.fc40.noarch
xz-libs-1:5.4.6-3.fc40.i686
xz-libs-1:5.4.6-3.fc40.x86_64
zchunk-libs-0:1.5.1-1.fc40.i686
zchunk-libs-0:1.5.1-1.fc40.x86_64
zlib-ng-compat-0:2.1.7-2.fc40.i686
zlib-ng-compat-0:2.1.7-2.fc40.x86_64

I want to have those 136 (137) packages listed (without download).

(I have install_weak_deps=False in my config, not sure if that counts)

I’m not sure there’s a good way to do this …
The download pulls in what meets the dependencies, the repoquery lists all the packages that could meet the dependencies.

You could try to filter out some packages based on excluding the packages that meet the dependencies you don’t need or want and limiting the arch to what’s applicable to your machine. This feels a really cumbersome though…

An example based on the above package using dnf4. The dnf5 syntax is a little different.
dnf rq --requires --resolve --recursive --arch noarch --arch x86_64 --exclude="glibc-langpack* glibc-all-langpacks fedora-re*-[dklmostwx]* fedora-re*-iot fedora-re*-i3 *cinnam* *cloud* *compneuro* *container* *coreos* *budgie*" python3-dnf-plugin-local

1 Like

I liked your solution, but, I don’t like it :sweat_smile:
I wish this was more straightforward, dnf download does it so neatly.

1 Like

This looks like an XY problem.
What goal do you actually want to achieve?
Let’s assume we can list these dependencies.
So what do you want to do with this list?

I wish this was more straightforward, dnf download does it so neatly.

You can add the --url argument right?

dnf download --resolve --alldeps --url python3-dnf-plugin-local

--url allows you to see the packages including the resolved deps as urls but not actually downloading them. I removed the --downloaddir since in that case you’re not downloading anything but it’s just showing the remote urls of the packages

2 Likes

I wanted to install this package and its dependencies in my container from files that are already on my host so that I can avoid downloading packages in the preliminary step of setting up dnf-plugin-local. Given a list of packages needed, either via the dnf cache with files as given by find /var/cache/dnf/ -type f -name "*.rpm" or with the files that dnf-plugin-local keeps within /var/lib/dnf/plugins/local/. Third option – and indeed easier than the former 2 in hindsight – being using dnf download, offline installing packages – I had them installed already – and then passing them to the container. All these would avoid repeated downloads.

In the meanwhile I could do this via dnf --repofrompath=templocal,/var/lib/dnf/plugins/local/ --repo=templocal install python3-dnf-plugin-local and it just worked. It is the simplest of them all. (The path here is rw mounted from host with idmap shifting, that’s how I share the packages among Incus host and containers, it’s working nicely.)

Nonetheless, the solution provided by @marko3209 is good. I wasn’t sure about how reliable URL’s can be but I suppose they can work. In this form I will be using it in the future:

dnf download --resolve --alldeps --url {{package}} | sed 's:.*/::; s/\.rpm$//'
2 Likes

Basically, you just need to set up a shared DNF cache:
Lazy or caching dnf mirror recommendations? - #3 by vgaetera

DNF can be forced to use this cache in offline mode:
dnf5: DNF5 Package Management Utility | dnf5 System Administration | Man Pages | ManKier

It works even without creating a local repo.

That’s valueable. Once I transitioned to f41 and dnf5, especially. It seems to me it is less versitile though. It can’t automatically download missing packages for example. Having the dnf-plugin-local package migrated would likely be the best going forward.

DNF can populate the cache without installing packages:
dnf5-install: Install Command | dnf5 System Administration | Man Pages | ManKier

You can also map it in RW mode to add missing packages.

It would still be nice to get a dependency tree from dnf5.