Bug 1311037 - RFE: implement yum shell
RFE: implement yum shell
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
: FutureFeature, Triaged, UseCase
Depends On:
  Show dependency treegraph
Reported: 2016-02-23 03:48 EST by Remi Collet
Modified: 2017-03-14 05:42 EDT (History)
20 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-03-14 05:42:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Remi Collet 2016-02-23 03:48:12 EST
Related to #1311032

Because of the split of sqlite into a new sqlite-libs, no way to downgrade

$ yum shell
> remove sqlite-libs
> downgrade /tmp/sqlite-3.10.2....
> run

How to do the same with DNF ?
Comment 1 Honza Silhan 2016-02-29 07:34:33 EST
have you tried `dnf downgrade /tmp/sqlite-3.10.2.... --allowerasing`?
Comment 2 Remi Collet 2016-02-29 07:50:30 EST
--allowerasing works now because there is an explicit conflict added in sqlite 3.11.0-2

package sqlite-libs-3.11.0-2.fc23.x86_64 conflicts with sqlite < 3.11.0-1 provided by sqlite-3.10.2-1.fc23.x86_64.

But not without this explicit conflicts

# LANG=C dnf downgrade /tmp/sqlite*3.10.2-1.fc23.x86_64.rpm --allowerasing
Dependencies resolved.
 Package                              Arch                           Version                               Repository                            Size
 sqlite                               x86_64                         3.10.2-1.fc23                         @commandline                         475 k
 sqlite-devel                         x86_64                         3.10.2-1.fc23                         @commandline                         127 k
 sqlite-tcl                           x86_64                         3.10.2-1.fc23                         @commandline                          41 k

Transaction Summary
Downgrade  3 Packages

Total size: 644 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction check error:
  file /usr/lib64/libsqlite3.so.0.8.6 from install of sqlite-3.10.2-1.fc23.x86_64 conflicts with file from package sqlite-libs-3.11.0-1.fc23.x86_64

Error Summary

So this bug is not about the specific sqlite issue (which have a workaround), but more to provide a use case of "yum shell", and why it is needed.
Comment 3 Michal Luscon 2016-03-14 08:03:16 EDT
We are still reluctant to implement a yum shell equivalent. The main reason is that this functionality has been requested only by a negligible amount of DNF users so far. Anyway, I will keep this bug open for the tracking of interest.
Comment 4 Carl George 2016-06-16 10:07:49 EDT
I am interested in having a dnf shell as well.  Being able to explicitly describe the transaction you want to take place is extremely useful for troubleshooting.  As Remi pointed out above, unforeseen situations occur in packaging (both in base and third party repositories) that necessitate the power provided by a transaction shell.
Comment 5 bharper 2016-06-16 10:13:45 EDT
I would also like to have something like yum shell for dnf.
Comment 6 Greg Swift 2016-06-16 11:31:26 EDT
I used to use yum shell in Dockerfiles. Now I can't.  This provides a more controlled use of dnf by only calling dnf once.

RUN dnf -y update && \
    dnf -y install git && \
    dnf clean all


RUN printf "update
            install git
            clean all" |
    dnf shell --assumeyes

Mentioning Docker counts like triple for this usecase right? (kidding)
Comment 7 Adam Miller 2016-06-16 12:36:44 EDT
I would like to add myself to the list of interested parties, much for the same reason Greg Swift brought up in Comment #6 around the Docker use case.
Comment 8 jason.e.parks 2016-06-16 12:39:21 EDT
We are using yum shell with our automation systems as well as the docker use case. I would like to add my support for "yum shell" equivalent to dnf
Comment 9 John Dulaney 2016-06-16 12:55:39 EDT
I'm +1 to dnf shell.
Comment 12 Peter Robinson 2016-06-17 09:57:36 EDT
(In reply to Adam Miller from comment #7)
> I would like to add myself to the list of interested parties, much for the
> same reason Greg Swift brought up in Comment #6 around the Docker use case.

+1 from me too
Comment 13 Greg Swift 2016-06-21 13:49:07 EDT
Asking around our support floor I found that one of the most common use cases was using shell to perform upgrades of various packages to newer 'major' versions, such as with IUS packages.

#yum shell
remove mysql-libs
install mysqlclient16
transaction solve
transaction run


#yum shell
remove php55u (other related packages)
install php56u (other related packages)
transaction solve
transaction run
Comment 14 Fedora Admin XMLRPC Client 2016-07-08 05:25:52 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 15 Honza Silhan 2016-07-25 11:25:08 EDT
We are still considering the implementation in DNF.

So far the gathered input from users shows that `yum shell` is popular and can do following what `--allowerasing` does not cover:
* less verbose task definition
* as temporary workaround (when packages not packaged properly, DNF does not correctly handle some use cases like kernel downgrade, etc.)

WRT comment 13 we have actually received very positive feedback about DNF dealing with IUS repository.
Comment 16 Carl George 2016-08-01 14:36:33 EDT
`dnf --allowerasing` is indeed quite handy for installing replacement IUS packages (php??u, mysql??u).  However, since that requires the incoming packages conflict with the outgoing packages, it does not work with IUS parallel-installable packages (python??u).

In any case, as useful as the allowerasing flag is, a transaction shell would provide more power, flexibility, and verbosity.
Comment 17 Jaroslav Mracek 2017-03-14 05:42:43 EDT
The shell command was implemented in dnf-2.1.0-1, that was released into rawhide.

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