On Wed, Aug 5, 2009 at 9:32 PM, Jacob Meuser<jake...@sdf.lonestar.org> wrote:
> On Wed, Aug 05, 2009 at 06:58:48PM -0400, Luis Useche wrote:
>> On Wed, Aug 5, 2009 at 3:59 PM, Stephen Takacs<perl...@gmail.com> wrote:
>> > Luis Useche wrote:
>> >> 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".
>> >
>> > That might be a solution if you're stricly using package/ports.  But
>> > consider what happens when you manually build and install other programs
>> > that came in the form of plain old source code tarballs (make && make
>> > install, etc.)  Most of these programs will have library dependencies
>> > and some of those libraries will have already been installed as
>> > dependencies of "official" packages.  If you remove the whole shebang (a
>> > package and all its unique deps) then your custom-built programs won't
>> > find some of their libs anymore...
>> >
>>
>> It is really have to solve those twisted cases. I think the 'manually
>> installed' bit can solve most of the 'safe deletion' problems and can
>> be very useful.
>
> I think the person who installed the packages should keep a list of
> what packages they want and compare that to `pkg_info -t`.

My point is that the system should (semi?)automatically create this
list for you.

>> In your hypothetical case, when you install those libraries to be able
>> to compile your third-party application, the package will be
>> automatically marked as 'manually installed', meaning that it can only
>> be removed if you explicitly say so.
>
> not if the libraries were installed as dependenies of some other package.
>
> that's why this whole "record what was intentionaly installed" thing
> just won't work as well as you think.

You can re-install the package you want and that won't be deleted anymore.

>> One thing I forgot to mention before is that I have used a couple of
>> package managers that support this functionality and it works very
>> well in my experience. It can successfully solve most of the of safely
>> deletion packages with its dependencies.
>
> if you know what packages you want, comparing that list with what's
> installed is easy.
>
> here's a simple scenario:
>
> 1) install OBSD
> 2) pkg_add kdebase
> 3) pkg_delete --delete-all-dependencies-I-did-not-specifically-add kdebase
> 4) pkg_add gnome-desktop
>
> that would delete and re-add numerous pakages.  entirely wasteful.

I see this as a really unlikely scenario. Besides, it probably will
take more time but you won't have unecessary files you don't need in
your system. This could be translated into more space consumed,
increased fsck times and probably slower file system (the ffs
allocation has less flexibility). If you have a really huge disk,
probably you don't care. In my specific case is not about the space
but rather to have a clean file system.


> I often intentionally first pkg_add the package I want that brings in
> the most dependencies (many of which I do want, even if they were not
> dependencies), because it's easier than specifying all the dependencies.

This can be easily solvable by adding a option: "mark all the
dependencies as manually installed".

> the only way what you suggest could be really useful is if there were a
> way to "whitelist" installed packages.  but isn't it just as easy to
> keep track of what packages you know you want and compare that to
> `pkg_info -t`?

We can add options as I previously suggested to build your own
"whitelist" but automatically.

Luis.

Reply via email to