On 2011-09-05 15:27, Andrew Z wrote:
On Mon, Sep 5, 2011 at 6:04 PM, Garrett Holmstrom <[email protected] <mailto:[email protected]>> wrote: On 2011-09-05 12:51, Andrew Z wrote: On Mon, Sep 5, 2011 at 3:43 PM, Garrett Holmstrom <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>__> wrote: On 2011-09-05 8:16, Andrew Z wrote: i'm not sure why there is a difference in the output of "rpm -q --whatrequires " and "yum remove" The rest of the packages depend on the .so file, not the package name: [5508] gholms@lux ~ % rpm -q --whatrequires 'libxklavier.so.15()(64bit)' libxklavier-4.0-7.el6.x86_64 libgnomekbd-2.28.2-2.el6.x86_____64 kdebase-workspace-4.3.4-19.____el6.x86_64 gnome-settings-daemon-2.28.2-____11.el6.x86_64 control-center-2.28.1-25.____el6.x86_64 gdm-2.30.4-21.el6_0.1.x86_64 gnome-applets-2.28.0-7.el6.____x86_64 gnome-screensaver-2.28.3-8.____el6.x86_64 -- Garrett Holmstrom --- -- slowly descending into more confusion .... Garret, can you please run "yum remove libxklavier"? It would be better to just explain what is actually happening. The libxklavier package provides three things: [5610] gholms@lux ~ % rpm -q --provides libxklavier.x86_64 libxklavier.so.15()(64bit) libxklavier = 4.0-7.el6 libxklavier(x86-64) = 4.0-7.el6 The first of these is the library itself, namely /usr/lib64/libxklavier.so.15. rpmbuild automatically adds dependencies of this type to packages that link against shared libraries. The rest are used for things that depend on the package by name. For instance, this includes gnome-applets-2.28.0-7.el6.__x86_64's dependency on "libxklavier >= 4.0". By having yum remove the libxklavier package you remove all three of these, but your rpm query only searched for things that depend on the second. To get an accurate list of what directly depends on a package you must check *everything* that the package provides. [5616] gholms@lux ~ % rpm -q --provides libxklavier.x86_64 | sed 's/=.*//' | xargs rpm -q --whatrequires | sort | uniq control-center-2.28.1-25.el6.__x86_64 gdm-2.30.4-21.el6_0.1.x86_64 gnome-applets-2.28.0-7.el6.__x86_64 gnome-screensaver-2.28.3-8.__el6.x86_64 gnome-settings-daemon-2.28.2-__11.el6.x86_64 kdebase-workspace-4.3.4-19.__el6.x86_64 libgnomekbd-2.28.2-2.el6.x86___64 libxklavier-4.0-7.el6.x86_64 no package requires libxklavier(x86-64) -- Garrett Holmstrom Garrett, i think i'm hang up on the definition of "requires". To me it means "won't work if removed". But with this definition i have problem digesting the difference in "Yum remove" output and your (really cool) one line.
That is exactly what "requires" means here. rpm enforces these dependencies by refusing to allow you to remove something when something else depends upon it. Yum knows this, so when you tell yum to remove a package it generally removes everything that depends upon it as well. So if you remove libxklavier.x86_64 then it will also remove everything in the list given by the above rpm query. Everything that depends on *those* packages, then, also gets removed, and so forth. This is what yum means by "removing for dependencies".
-- Garrett Holmstrom
