On Tue, Aug 4, 2009 at 1:01 PM, Ted Unangst<ted.unan...@gmail.com> wrote: > On Tue, Aug 4, 2009 at 12:47 PM, Luis Useche<use...@gmail.com> wrote: >> This is really close but it is not there quite yet. Even with this >> script, there could be situations where you end up deleting things you >> don't want. For instance, let say you install xfce. After some time, >> you decided to install some package X that depend on xfce and other >> library L used only by X. When using your script, it will remove not >> only L but also xfce (which you did not want to remove because you >> installed it manually). >> >> Besides, there is another problem with the script. If you imagine the >> packages installed in the system as a tree of dependencies, you can >> see that your script will only remove two levels of the branch you >> want to delete. Example: X depends on Y that depends on Z: X -> Y -> >> Z. In your script, X and Y will be removed but Z will not. >> >> It seems like an additional information should be added to the package >> database. A bit indicating if the package was installed manually by >> the user (admin?) or not. Then, the package can only be deleted if the >> the user explicitly say so as oppose to "automatic deletion as >> dependency". > > This still doesn't work. If I pkg_add eclipse, then later decide I'm > going back to vim, that doesn't mean I want all my java programs to > suddenly stop working. What's installed manually vs not is not > reliable. I don't think I've ever actually requested installing > unzip, but it's on every computer I use and I use it all the time.
True. However this situation is easily solvable by installing the jvm manually and you are done. Instead, removing the deletable dependencies is a harder problem to solve. Moreover, I am uncertain if the problem can be solved with the tools that exist at this point in time. For the unzip case, I think it is a "base" application. The unzip problem can be easily solvable by marking all the base packages as "manually installed". Luis Useche use...@gmail.com