Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1934883 - [RFE] dnf: swap more than two packages in one transaction
Summary: [RFE] dnf: swap more than two packages in one transaction
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: dnf-community
TreeView+ depends on / blocked
 
Reported: 2021-03-03 22:49 UTC by Carl George 🤠
Modified: 2021-05-12 01:08 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Carl George 🤠 2021-03-03 22:49:47 UTC
Description of problem:
`yum swap` allowed swapping more than two packages using `--` as a delimiter between the packages to remove and the packages to install.  This no longer works with `dnf swap`.


Version-Release number of selected component (if applicable):
dnf-4.6.0-1.fc34.noarch


How reproducible:
always


Steps to Reproduce:
(the exact packages don't matter, these were picked at random)
1. dnf install color-filesystem emacs-filesystem
2. dnf swap -- color-filesystem emacs-filesystem -- kde-filesystem mesa-filesystem


Actual results:
dnf swap: error: unrecognized arguments: kde-filesystem mesa-filesystem


Expected results:
Uninstall of color-filesystem and emacs-filesystem, install of kde-filesystem and mesa-filesystem.


Additional info:
`dnf shell` can also be used to accomplish this task, but that requires interactive input, a separate file, or shell redirection.  `dnf swap` is an easy and convenient way to perform transactions like this in a single command non-interactively.  It is especially useful when building container images.

Comment 1 Neal Gompa 2021-03-03 23:00:34 UTC
This is similar to bug 1403465, though this one talks about restoring functionality that YUM previously had, and that bug talked about adding *new* syntax to support this.


Note You need to log in before you can comment on or make changes to this bug.