Bug 1311037

Summary: RFE: implement yum shell
Product: [Fedora] Fedora Reporter: Remi Collet <fedora>
Component: dnfAssignee: rpm-software-management
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: admiller, agk, andrew.howard, ben.harper, carl, dtrainor, fedora, gregswift, jason.e.parks, jdulaney, jmracek, me, mluscon, mwoodson, packaging-team-maint, pbrobinson, pfrields, pnemade, tonysk8, vmukhame
Target Milestone: ---Keywords: FutureFeature, Triaged, UseCase
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-14 09:42:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Remi Collet 2016-02-23 08:48:12 UTC
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 12:34:33 UTC
have you tried `dnf downgrade /tmp/sqlite-3.10.2.... --allowerasing`?

Comment 2 Remi Collet 2016-02-29 12:50:30 UTC
--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
======================================================================================================================================================
Downgrading:
 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 12:03:16 UTC
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 14:07:49 UTC
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 14:13:45 UTC
I would also like to have something like yum shell for dnf.

Comment 6 Greg Swift 2016-06-16 15:31:26 UTC
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

vs

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





Mentioning Docker counts like triple for this usecase right? (kidding)

Comment 7 Adam Miller 2016-06-16 16:36:44 UTC
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 16:39:21 UTC
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 Mairi Dulaney 2016-06-16 16:55:39 UTC
I'm +1 to dnf shell.

Comment 12 Peter Robinson 2016-06-17 13:57:36 UTC
(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 17:49:07 UTC
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

and

#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 09:25:52 UTC
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 15:25:08 UTC
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 18:36:33 UTC
`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 09:42:43 UTC
The shell command was implemented in dnf-2.1.0-1, that was released into rawhide.