Bug 467225 - feature request for RPM
feature request for RPM
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
10
All Linux
medium Severity low
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
http://forums.fedoraforum.org/showthr...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-16 09:50 EDT by bee
Modified: 2009-07-28 07:34 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-28 07:34:07 EDT
Type: ---
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 bee 2008-10-16 09:50:34 EDT
Description of problem:
Whenever you are going to uninstall (with YUM) some applications installed (by YUM), it won't uninstall unused dependencies. So the uninstallation process isn't complete; it isn't a full rollback as you would expect.
The "package-cleanup" tool inside "yum-utils" is useful to find and later manually remove unused libs, but it isn't reliable. It's because having no dependencies doesn't mean that the installed packages is useless. SO, if you are going to type "package-cleanup --leaves --all" you'll see in that list also useful application you want to keep (like filezilla, openoffice, and many other).

I've suggested a solution ( http://forums.fedoraforum.org/showpost.php?p=1097145&postcount=5 ) but i don't know if it's possible.
I was thinking about insert for each installed package one more flag, called "EndUserApplication" (or whatever is the name you like) to point out if that package is a end-user application (like openoffice-base) or a dependency.
In this way, it would be a lot simple to remove unused (but installed) packages, without having to fear and to check if any of those packages is a end-user app or if it's a no-more useful dependency.
You would have in any package that new flag, for example in any end-user application "EndUserApplication: yes" and in any dependency package of that application "EndUserApplication: no", so when you are going to remove the main software (the real end-user application) you ca also remove all the unused dependencies, if they have the flag "EndUserApplication" set to "no". In this way you know that you are free to remove them too!
For backward compatibility, you cold have another flag value ("EndUserApplication: unknown") used by default for old RPMs without the "EndUserApplication" flag set neither to "yes" or "no". In this way, the behavior of YUM must be the same of "EndUserApplication: yes" to avoid problems.

I know you will have to change how YUM&RPMs work and the .spec files of any RPM package; but i think that it would be a useful feature and it may deserve that effort.

bye!! :)
Comment 1 Ignacio Vazquez-Abrams 2008-10-16 10:00:12 EDT
How do you differentiate tools such as xmlstarlet which could be both an end-user tool *and* an intermediate dependency?
Comment 2 Vince Schiavoni 2008-10-16 10:10:19 EDT
I'll second the motion: I've often desired a way to cull unnecessary packages
without removing potentially useful stuff that has no hard deps, but which if
removed might cripple other apps and/or reduce their features/capabilities. In
particular, as the OP suggests: how to remove unneeded deps dragged in by
installation of one package, which is then quickly removed, leaving a pile of
"useless" packages in it's wake? Could RPM as it exists possibly sort out "soft
deps" and list packages whose removal would impact the functionality of other
packages, without necessarily crippling them/violating hard dep requirements?

@Ignacio Vazquez-Abrams: That's what we're asking you!!!

Regards,
VJSchiavoni
Comment 3 bee 2008-10-16 13:44:23 EDT
Sorry Ignacio if i can't talk about "xmlstarlet", but i just don't know what is it :-/

I'll make another example, i hope you were talking about this anyway...
(if i'm not wrong)In Fedora 7, "curl" (one utility to download files...) was in only one package.
In Fedora 9, curl was in two packages called: "curl" and "libcurl".
The first with the manual and the executable file; the second with the libs.
If packages are created in a good way (like curl for F9), it's simple to uninstall "curl" (EndUserApplication:yes) but keeping "libcurl" (EndUserApplication:no) IF other software rely on "libcurl" (because you can check it). 
If you remove all the software that have dependencies on "libcurl": because libcurl is set with "EndUserApplication:no" you can uninstall libcurl too (as it's not necessary anymore)!
What if some software is rely on "curl"--the end user application?
Simple, as that software has a dependency-links to "curl", then you cannot remove "curl" nor "libcurl" without removing also the others applications (as you know, right now; yum will remove any software that depends on all the packages you are going to remove)

bye!
Comment 4 Vince Schiavoni 2008-10-16 18:48:17 EDT
Sorry, nevermind: yum-remove-with-leaves is the plugin we're looking for, so it seems to already exist.

VJS
Comment 5 Bug Zapper 2008-11-25 22:55:10 EST
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 6 bee 2008-12-09 10:50:26 EST
Ok. After a long test with "yum-remove-with-leaves", i feel free to say that (unlucky) "yum-remove-with-leaves" is more similar to a virus than to what i was talking about as that yum plugin wants to destroy your system at each update.

bye!!!
Comment 7 Jeff Johnson 2008-12-09 16:50:10 EST
Re: comment #1

You differentiate by looking at dynamic usage statistics such as st->st_atime
for all files in a package to determine whether any file within a package has been
recently used. Yes noatime on a mount point forces other metrics than st->st_atime
to be used instead. Any metric related to whether a file within a package has
been recently used will work if st->st_atime updating is disabled.

What works rather poorly is to attempt to remove package leaf nodes in the dependency
graph blindly. Better metrics, even installtime, are better hints to "unused" than
the fact that a package is a leaf node because there are often missing, implicit,
dependencies because of poor packaging, that cause packages to appear to be
leaf nodes when they are not.
Comment 8 Charles-Henri d'Adhémar 2009-01-09 09:54:11 EST
Hello Bug Zapper,

Since this is a feature request (explicitly named) and according to http://fedoraproject.org/wiki/BugZappers/HouseKeeping
This bug report should not have been rebased from rawhide to F10.

Instead the bug may have been setup wrong and should be changed to enhancement instead of bug ...

Thanks !
Comment 9 bee 2009-07-28 07:34:07 EDT
nobody cares!!
so i'll close it!

bye!
Bee!!! -- http://honeybeenet.altervista.org/beesu/

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