Description of problem: Comparison (yum vs dnf) of trying to install an existing package: 1) yum : $ sudo yum install stellarium Loaded plugins: langpacks, presto, refresh-packagekit Package stellarium-0.11.4a-1.fc18.i686 already installed and latest version Nothing to do 2) dnf: $ sudo dnf install stellarium Setting up Install Process Resolving Dependencies --> Starting dependency resolution --> Finished dependency resolution Nothing to do dnf is not informing that package is installed and hence "nothing to do". Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Similar to yum, dnf should inform the user that a package is already installed, and hence "nothing to do" shows up. Additional info:
Hello, thank you for the report. I'll look to see what can be done about this.
Michael, I'd like to ask you how to best deal with this. When I have a job such as the following one: queue_push2(&q, SOLVER_INSTALL|SOLVER_SOLVABLE_NAME, p); where p is a name of an installed package, then running the solver returns '0' and there are no problems: it saw p is installed already and so everything is fine. Is there a way however to learn from the solver that this job item was skipped because the packag is already installed? Or should I, in case of no error and empty resulting transaction, check that the current installed state already satisfies the job? Thank you, Ales
There currently is no way to ask the solver about a job. But you don't need a solver run to detect that a job is already fulfilled, you can easily check this with just a couple lines of code. Things to consider: - you probably shouldn't check for an empty transaction, consider "dnf install stellarium zsh", the user might expect a message about stellarium already being installed even if zsh needs to be installed. - Does "yum install stellarium" update stellarium to the latest version? The error message seems to indicate that. - what about erasures? Does "yum erase some-not-installed-pkg" also print such a message?
(In reply to comment #3) > Things to consider: > > - Does "yum install stellarium" update stellarium to the latest version? > The error message seems to indicate that. It seems to be doing that.. tried for nautilus: $ sudo yum install nautilus Loaded plugins: langpacks, presto, refresh-packagekit Resolving Dependencies --> Running transaction check ---> Package nautilus.i686 0:3.6.3-3.fc18 will be updated --> Processing Dependency: nautilus = 3.6.3-3.fc18 for package: nautilus-extensions-3.6.3-3.fc18.i686 ---> Package nautilus.i686 0:3.6.3-4.fc18 will be an update --> Running transaction check ---> Package nautilus-extensions.i686 0:3.6.3-3.fc18 will be updated ---> Package nautilus-extensions.i686 0:3.6.3-4.fc18 will be an update --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================ Package Arch Version Repository Size ================================================================================================================ Updating: nautilus i686 3.6.3-4.fc18 updates 2.6 M Updating for dependencies: nautilus-extensions i686 3.6.3-4.fc18 updates 63 k Transaction Summary ================================================================================================================ Upgrade 1 Package (+1 Dependent package) Total download size: 2.7 M Is this ok [y/N]: > > - what about erasures? Does "yum erase some-not-installed-pkg" also print > such a message? Example message for some-not-installed package: $ sudo yum erase emacs Loaded plugins: langpacks, presto, refresh-packagekit No Match for argument: emacs No Packages marked for removal
(In reply to comment #3) > There currently is no way to ask the solver about a job. But you don't need > a solver run to detect that a job is already fulfilled, you can easily check > this with just a couple lines of code. Yes, I think I'll eventually be doing that. > > Things to consider: > > - you probably shouldn't check for an empty transaction, consider > "dnf install stellarium zsh", the user might expect a message about > stellarium already being installed even if zsh needs to be installed. Hm, good point. > > - Does "yum install stellarium" update stellarium to the latest version? > The error message seems to indicate that. It does and so does DNF at the moment. So seeing that package of that name is already installed before the resolving shouldn't by itself cause an error. Tricky. > - what about erasures? Does "yum erase some-not-installed-pkg" also print > such a message? Yes.
About 'dnf install stellarium' doing an update: I don't think it does. It doesn't auto-update if you do a: queue_push2(&q, SOLVER_INSTALL|SOLVER_SOLVABLE_NAME, p); It does autoupdate if you add that SOLVER_ORUPDATE flag I added for the mancoosi cudf tests.
(In reply to comment #6) > About 'dnf install stellarium' doing an update: I don't think it does. It > doesn't auto-update if you do a: > queue_push2(&q, SOLVER_INSTALL|SOLVER_SOLVABLE_NAME, p); > > It does autoupdate if you add that SOLVER_ORUPDATE flag I added for the > mancoosi cudf tests. You're right I just tested it, DNF doesn't autoupdate.
I made a first attempt at the fix in c76b9df, reporter, you can try with dnf-0.2.20.
Just updated to dnf-0.2.20. $ rpm -qa | grep dnf dnf-0.2.20-1.gitdec970f.fc18.noarch Seems to be working fine with respect to the bug reported here. $ sudo dnf install opencv Setting up Install Process Package opencv-2.4.3-3.fc18.i686 is already installed, skipping. Nothing to do Comparing with yum: $ sudo yum install opencv Loaded plugins: langpacks, presto, refresh-packagekit Package opencv-2.4.3-3.fc18.i686 already installed and latest version Nothing to do