Package: dnf-plugins-core
Version: 4.3.1-2~bpo11+1
Severity: important
X-Debbugs-Cc: [email protected]
Dear Maintainer,
dnf-plugins-core provides a reposync implementation as the alternative of the
nonexist package yum-utils.
In /usr/lib/python3/dist-packages/dnf-plugins/reposync.py, it calls:
```
base._download_remote_payloads(payloads, drpm, progress, None, False)
```
However, in dnf 4.5.2, the current version in bullseye and bookworm, this
function only takes 4 positional arguments:
(/usr/lib/python3/dist-packages/dnf/base.py)
```
def _download_remote_payloads(self, payloads, drpm, progress, callback_total):
```
In dnf 4.14.0, the current version in sid, it takes 5 positional arguments:
```
def _download_remote_payloads(self, payloads, drpm, progress, callback_total,
fail_fast=True):
```
Thus the reposync plugin may not be usable in bookworm (and
bullseye-backports): You may meet following backtrace:
```
Traceback (most recent call last):
File "/usr/bin/dnf", line 58, in <module>
main.user_main(sys.argv[1:], exit_code=True)
File "/usr/lib/python3/dist-packages/dnf/cli/main.py", line 201, in user_main
errcode = main(args)
File "/usr/lib/python3/dist-packages/dnf/cli/main.py", line 67, in main
return _main(base, args, cli_class, option_parser_class)
File "/usr/lib/python3/dist-packages/dnf/cli/main.py", line 106, in _main
return cli_run(cli, base)
File "/usr/lib/python3/dist-packages/dnf/cli/main.py", line 122, in cli_run
cli.run()
File "/usr/lib/python3/dist-packages/dnf/cli/cli.py", line 1167, in run
return self.command.run()
File "/usr/lib/python3/dist-packages/dnf-plugins/reposync.py", line 157, in
run
self.download_packages(pkglist)
File "/usr/lib/python3/dist-packages/dnf-plugins/reposync.py", line 306, in
download_packages
base._download_remote_payloads(payloads, drpm, progress, None, False)
TypeError: _download_remote_payloads() takes 5 positional arguments but 6 were
given
```
For reproducing this bug, I created a config file (k8s.conf):
```
[main]
keepcache=0
cachedir=/tmp/
[kubernetes-el7-x86_64]
name=kubernetes-el7-x86_64
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
repo_gpgcheck=0
gpgcheck=0
enabled=1
```
And then:
```
dnf reposync -a x86_64 -c k8s.conf --delete -p /path/to/packages
```
Although I'm using the backported version of dnf-plugins-core, it's certain
that this bug should also affects bookworm (testing).
-- System Information:
Debian Release: 11.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.0.0-0.deb11.6-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages dnf-plugins-core depends on:
ii dnf 4.5.2-6
ii python3 3.9.2-3
ii python3-dbus 1.2.16-5
ii python3-dnf 4.5.2-6
dnf-plugins-core recommends no packages.
dnf-plugins-core suggests no packages.
-- Configuration Files:
/etc/dnf/plugins/local.conf changed [not included]
-- no debconf information