Bug 963137 - [rfe] perform complex packaging operations as a CLI user
[rfe] perform complex packaging operations as a CLI user
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Radek Holy
Fedora Extras Quality Assurance
:
: 1126078 1209648 1243141 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-15 04:39 EDT by Rahul Sundaram
Modified: 2017-08-01 07:48 EDT (History)
11 users (show)

See Also:
Fixed In Version: dnf-0.4.9-1.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-13 21:45:09 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rahul Sundaram 2013-05-15 04:39:52 EDT
Description of problem:

yum shell is quite useful when you want to combine operations that cannot be done via the command line. the most common case is adding a package and removing another in a single transaction when there are package conflicts. 

Examples:

remove fedora-bookmarks and install astronomy-bookmarks in a single transaction since both conflict with each other and has a virtual provide of system-bookmarks which is a dependency of other packages. 

a similar case is at 
https://fedoraproject.org/w/index.php?title=Features/ReplaceMySQLwithMariaDB#Steps_to_replace_MySQL_with_the_new_MariaDB_for_testing_purposes_in_Fedora_17_and_18

another at 

http://wiki.rsyslog.com/index.php/Install_rsyslog_with_yum
Comment 1 Ales Kozumplik 2013-05-15 05:13:55 EDT
I was kind of hoping we might get rid of yum shell, but these cases you mention do exist in real life. I'll keep this bug open as a general RFE for a way to perform operations like that.
Comment 2 Rahul Sundaram 2013-05-15 11:11:07 EDT
I am fine without yum shell as long as the important use cases are handled. this is the reason I provided some references to things that are not possible without the shell (assuming you don't use nodeps or whatever).
Comment 3 Ales Kozumplik 2013-11-27 09:22:50 EST
Radek, please handle this. DNF is going to provide something like 'yum shell' was. Basically, it's a way to let people do erase A and install B in one step so that erasing A doesn't take away all deps on it even though the provides would later be satisfied by B.

For start let's just have it very simple: install, erase, run. The implementation should use the public API where possible though for e.g. CLI parts this won't be achievable yet.
Comment 4 Radek Holy 2013-12-02 10:59:36 EST
Added as new "--allowerasing" switch by b9a7210db919fbf11f5281ed6c966b7446412eb0 on master.
So, "dnf --allowerasing install" command now detects any conflicting packages and suggests erasing them during the same transaction. It should cover all cases you have described and the heavyweight shell still would not be needed.
Comment 5 Rahul Sundaram 2013-12-02 13:36:16 EST
I would strongly suggest calling it --removeconflicts instead of --allowerasing which is very ambigious.
Comment 6 Rahul Sundaram 2013-12-02 13:39:40 EST
Also note that a more generic form is already implemented in yum.  From man yum


 swap   At it's simplest this is just a simpler way to remove one set of
              package(s) and install another set of package(s) without  having
              to  use  the "shell" command.  However you can specify different
              commands to call than just remove or install, and you  can  list
              multiple  packages (it splits using the "--" marker).  Note that
              option parsing will remove the first "--" in an argument list on
              the command line.

              Examples:

              swap foo bar
              swap -- remove foo -- install bar
              swap foo group install bar-grp
              swap -- group remove foo-grp -- group install bar-grp
Comment 7 Terje Røsten 2013-12-02 14:31:59 EST
Will this cover multiple packages on the install side? Just asking.
Comment 8 Terje Røsten 2013-12-02 16:13:27 EST
Yeah, seems to work as needed, thanks!
Comment 9 Radek Holy 2013-12-03 03:32:09 EST
Terje, yes, it should work with multiple packages.
Rahul, the switch generally allows erasing of packages while resolving dependencies. In your use cases, it works as I have described, in other cases, it simply allows erasing as a possible operation during the dependency resolution.
Comment 10 Fedora Update System 2013-12-03 11:39:45 EST
dnf-0.4.9-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dnf-0.4.9-1.fc20
Comment 11 Fedora Update System 2013-12-03 13:20:29 EST
Package dnf-0.4.9-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.4.9-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-22638/dnf-0.4.9-1.fc20
then log in and leave karma (feedback).
Comment 12 lnie 2013-12-05 01:24:38 EST
tested with 0.4.9-1.fc20,dnf --allowerasing works fine
Comment 13 Ales Kozumplik 2013-12-05 08:10:47 EST
*** Bug 1038504 has been marked as a duplicate of this bug. ***
Comment 14 Fedora Update System 2013-12-13 21:45:09 EST
dnf-0.4.9-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 15 Ales Kozumplik 2014-08-14 03:15:54 EDT
*** Bug 1126078 has been marked as a duplicate of this bug. ***
Comment 16 Radek Holy 2015-04-08 02:46:33 EDT
*** Bug 1209648 has been marked as a duplicate of this bug. ***
Comment 17 Ali Akcaagac 2015-04-08 03:23:24 EDT
As a reference to https://bugzilla.redhat.com/show_bug.cgi?id=1209648

I was requesting the exact "swap" feature as it exists in yum. Not a different (or slightly different) approach with different command set. Please keep in mind that dnf replaced yum and I (and other people as well) probably rely on an equal command set doing the same tasks as yum did.

Therefore please!

yum swap -- autoremove somepackage -- install somepackage

I rely on exact command parameters. Our infrastructure is not a play toy that can easily be replaced over night. Everything is documented and works for quite some time now.

Pointing me to:

http://dnf.readthedocs.org/en/latest/cli_vs_yum.html#packages-replacement-without-yum-shell-or-yum-swap

Was clearly not what I was asking for.
Comment 18 Radek Holy 2015-04-08 03:37:25 EDT
I apologize, I probably misunderstood "I don't see how to achieve this task once we switch to Fedora 22." then. OK, your comment reminds me the discussion in bug 1110780.
Comment 19 Ali Akcaagac 2015-04-08 04:30:46 EDT
(In reply to Radek Holy from comment #18)
> I apologize, I probably misunderstood "I don't see how to achieve this task
> once we switch to Fedora 22." then.
It means, that *I* might be in trouble once *I* switch to Fedora 22.

Let's assume this:

There is a company/organisation/entity that decided to switch from Fedora 20 to 22 once it is out. Besides new tools there is an expectation that basic things are working more or less the same way. Things like yum is to be expected to be the same.

I heard about dnf for quite some time now (you can't get past it if you use Fedora. You do hear about it quite often). Now with the deprecation of yum (pointing to dnf) I do run in trouble because I have set up *and written* an infrastructure around yum to achieve some tasks that I need in my workflow.

I really like to switch and have only *small* changes to the infrastructure at all (in best condition I won't want to touch it at all). Sadly the two major command set that I rely on are missing.

yum swap
yum --downloadonly and --downloaddir

It's not just about adding some "alias" it's the exact behaviour that I like to expect from these command lines.

I can not speak for the other bug report but the person in charge might have valid reasons for expressing his concerns.
Comment 20 Ali Akcaagac 2015-04-08 04:56:29 EDT
Why has this been closed ? The work flows are valid concerns.
Comment 21 Radek Holy 2015-07-15 02:06:19 EDT
*** Bug 1243141 has been marked as a duplicate of this bug. ***

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