On 12/02/2015 07:04 PM, Panu Matilainen wrote:
On 12/02/2015 04:44 PM, Roberto Ragusa wrote:
On 12/02/2015 02:42 PM, David Tardon wrote:
On Tue, Dec 01, 2015 at 02:20:34AM -0500, Dan Book wrote:
I have run into this before and it was very confusing, it really
should be
a separate command from remove for when you actually want to remove
what
dnf thinks is now "unused".
Why? Remove is the opposite of install. "dnf install foo" will install
package foo _and_ all its dependencies. So it is only logical that
"dnf remove foo" should remove package foo _and_ all its (unneeded)
dependencies.
Maybe it is not so simple.
There are dependencies with no use apart the main tool (tool requires
tool-libs),
but in some cases the dependency is useful on its own (e.g. fonts).
So, I counter your reasoning with this:
- dnf install foo (also installs bar)
- dnf install bar (oops, already installed, good)
- dnf remove foo (wow, why did it remove bar, I explicitly "installed"
it yesterday!)
Is dnf able to recognize that bar was "wanted" and not "accidental"?
http://dnf.readthedocs.org/en/latest/command_ref.html#mark-command-label
BTW, for something simple as this its faster to test than speculate:
[root@mursu ~]# dnf install evince
Last metadata expiration check performed 0:01:06 ago on Wed Dec 2
19:37:16 2015.
Dependencies resolved.
================================================================================
Package Arch Version Repository
Size
================================================================================
Installing:
evince x86_64 3.18.2-2.fc23 updates
2.3 M
evince-libs x86_64 3.18.2-2.fc23 updates
360 k
Transaction Summary
================================================================================
Install 2 Packages
Total download size: 2.7 M
Installed size: 10 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): evince-libs-3.18.2-2.fc23.x86_64.rpm 3.8 MB/s | 360 kB
00:00
(2/2): evince-3.18.2-2.fc23.x86_64.rpm 8.3 MB/s | 2.3 MB
00:00
--------------------------------------------------------------------------------
Total 1.7 MB/s | 2.7 MB
00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Installing : evince-libs-3.18.2-2.fc23.x86_64
1/2
Installing : evince-3.18.2-2.fc23.x86_64
2/2
Verifying : evince-3.18.2-2.fc23.x86_64
1/2
Verifying : evince-libs-3.18.2-2.fc23.x86_64
2/2
Installed:
evince.x86_64 3.18.2-2.fc23 evince-libs.x86_64 3.18.2-2.fc23
Complete!
[root@mursu ~]# dnf install evince-libs
Last metadata expiration check performed 0:01:21 ago on Wed Dec 2
19:37:16 2015.
Package evince-libs-3.18.2-2.fc23.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
[root@mursu ~]# dnf remove evince
Dependencies resolved.
================================================================================
Package Arch Version Repository
Size
================================================================================
Removing:
evince x86_64 3.18.2-2.fc23 @updates
9.3 M
evince-libs x86_64 3.18.2-2.fc23 @updates
1.1 M
Transaction Summary
================================================================================
Remove 2 Packages
Installed size: 10 M
Is this ok [y/N]: n
Operation aborted.
[root@mursu ~]#
So the answer is no, dnf does not consider "install" of an already
installed packages to be equivalent of "mark install". I think it should
- user asking for a package to be installed does not get any more
explicit than "install <package>".
- Panu -
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
http://lists.fedoraproject.org/admin/lists/devel@xxxxxxxxxxxxxxxxxxxxxxx