View Issue Details

IDProjectCategoryView StatusLast Update
0008948Rocky-Linux-9dnfpublic2025-02-01 15:25
ReporterTom Tyler Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Summary0008948: dnf install with multiple packages silently omits package if unrelated package has an error.
Description**Title:** dnf install with multiple packages silently omits package if unrelated package has an error.

Alternate title: Doing 'dnf install -y' with a list of parameters doesn't work reliably; install one package at a time.

**Environment:**

- OS: Rocky Linux 9.5

_Note_: I'm testing on Rocky Linux, but the root cause issue could be upstream with RHEL. Just in case, I filed this issue there as well, as https://github.com/rpm-software-management/dnf/issues/2202

- DNF Version:
```
$ dnf --version
4.14.0
  Installed: dnf-0:4.14.0-17.el9.noarch at Mon 18 Nov 2024 07:53:24 PM GMT
  Built : Rocky Linux Build System (Peridot) <releng@rockylinux.org> at Tue 05 Nov 2024 06:52:35 PM GMT

  Installed: rpm-0:4.16.1.3-34.el9.0.1.x86_64 at Mon 18 Nov 2024 07:53:11 PM GMT
  Built : Rocky Linux Build System (Peridot) <releng@rockylinux.org> at Mon 04 Nov 2024 08:51:43 PM GMT
```

When running a package install with a list of parameters that includes `rsync` and a package that is not available (e.g., `mailx`), the `rsync` package is not processed. Yum reports `No match for argument: mailx` (which is appropriate), but there is no mention of `rsync` at all, despite `yum info rsync` confirming its availability.

**Workarounds:**

Avoid multi-package installations, and instead install each package independently, e.g.:

```
for pkg in rsync bc mailx cronie; do
    yum install -y "$pkg"
done
```

That will install all packages that can be successfully installed, and give errors for any that cannot -- i.e. the same expectation for providing a list of parameters.
Steps To ReproduceAll steps are to be executed **as root**:

1. Ensure rsync is not installed:
```
bash
yum remove -y rsync
```

2. Verify rsync is absent.
```
which rsync
rpm -q rsync
```

3. Refresh metadata

```
yum clean all && yum makecache && rpm --rebuilddb && echo ALL_OK
```

Ensure the `ALL_OK` is displayed.

4. Do a multi-package install including a valid but uninstalled package and a missing package:

```
yum install -y bc cronie curl mailx make openssl openssl-devel rsync sos sysstat tar tuned wget which zlib zlib-devel
```

**Observed Behavior:**

* Yum outputs information for several packages but makes no mention of `rsync` at all.
* Running `yum install -y rsync` separately successfully installs `rsync`.

**Expected Behavior:**

* `dnf` should display some kind of output for all packages in the list, attempting to install all of them.

Additional InformationAdditional Notes:

* This issue appears to occur when a `dnf install -y` is done with a list of parameters and when at least one package in the list is missing (`mailx` in this case).
* I have verified that repository metadata is current, using `yum clean all`, `yum makecache`, `rpm --rebuilddb`, and `yum info rsync` to confirm its availability.

TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2025-02-01 15:25 Tom Tyler New Issue