Re: Delete packages with dependencies

2009-08-30 Thread Marc Espie
On Wed, Aug 19, 2009 at 02:02:07PM -0400, Luis Useche wrote: > Do I have to do something else here? It seems like this discussion > cooled down a bit. Is the patch in review? Is the patch been > considered for inclusion? Are there any changes I can do to make more > suitable for inclusion? I don't

Re: Delete packages with dependencies

2009-08-19 Thread Luis Useche
Do I have to do something else here? It seems like this discussion cooled down a bit. Is the patch in review? Is the patch been considered for inclusion? Are there any changes I can do to make more suitable for inclusion? I don't exactly how these things work and if I followed the regular path to s

Re: Delete packages with dependencies

2009-08-15 Thread Marc Espie
On Wed, Aug 05, 2009 at 03:59:42PM -0400, Stephen Takacs wrote: > 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.)

Re: Delete packages with dependencies

2009-08-08 Thread Luis Useche
There a couple of things I forgot to mention. I found that a package can be marked as 'manually installed' if 'pkg_add' is ran with the name of the package, even though it is already installed. Likewise, 'pkg_add -a' will set the package as 'automatically installed'. It is a good idea to check fi

Re: Delete packages with dependencies

2009-08-07 Thread Luis Useche
I have the first attempt of the dependencies deletion option. I modified 'pkg_delete' to include an option -r that perform this task. The main idea is to traverse the graph of package dependencies with some kind of bfs algorithm. The queue is initialized with the original packages to be removed. P

Re: Delete packages with dependencies

2009-08-06 Thread Luis Useche
> find /var/db/pkg -name \+CONTENTS -exec grep manual-installation {} /dev/null > \; Then the information does exist. This is good. The only thing missing now is the script that use this information for dependencies deletion. I'll see what I can do. Luis.

Re: Delete packages with dependencies

2009-08-06 Thread Jacob Meuser
On Thu, Aug 06, 2009 at 09:04:53AM -0400, Luis Useche wrote: > On Wed, Aug 5, 2009 at 10:23 PM, Jacob Meuser > wrote: > > some further thoughts ... > > > > On Thu, Aug 06, 2009 at 01:32:07AM +, Jacob Meuser wrote: > >> On Wed, Aug 05, 2009 at 06:58:48PM -0400, Luis Useche wrote: > >> > On Wed,

Re: Delete packages with dependencies

2009-08-06 Thread Luis Useche
On Wed, Aug 5, 2009 at 10:23 PM, Jacob Meuser wrote: > some further thoughts ... > > On Thu, Aug 06, 2009 at 01:32:07AM +, Jacob Meuser 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 wrote: >> > > Luis Useche wrote: >>

Re: Delete packages with dependencies

2009-08-05 Thread Ted Unangst
On Wed, Aug 5, 2009 at 10:19 PM, Luis Useche wrote: > 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 slow

Re: Delete packages with dependencies

2009-08-05 Thread Jacob Meuser
some further thoughts ... On Thu, Aug 06, 2009 at 01:32:07AM +, Jacob Meuser 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 wrote: > > > Luis Useche wrote: > > >> It seems like an additional information should be added t

Re: Delete packages with dependencies

2009-08-05 Thread Luis Useche
On Wed, Aug 5, 2009 at 9:32 PM, Jacob Meuser 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 wrote: >> > Luis Useche wrote: >> >> It seems like an additional information should be added to the package >> >> database. A bit indi

Re: Delete packages with dependencies

2009-08-05 Thread Jacob Meuser
On Wed, Aug 05, 2009 at 06:58:48PM -0400, Luis Useche wrote: > On Wed, Aug 5, 2009 at 3:59 PM, Stephen Takacs 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 u

Re: Delete packages with dependencies

2009-08-05 Thread Luis Useche
On Wed, Aug 5, 2009 at 3:59 PM, Stephen Takacs 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 >> th

Re: Delete packages with dependencies

2009-08-05 Thread Stephen Takacs
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

Re: Delete packages with dependencies

2009-08-05 Thread Mike Erdely
On Tue, Aug 04, 2009 at 11:11:17AM -0400, Luis Useche wrote: > Hello Guys, > > I was wondering if there is some tool that delete the packages > specified along with their "deletable" dependencies. Deletable means > packages that pkg_add added automatically (as dependencies of the > installed one)

Re: Delete packages with dependencies

2009-08-05 Thread Daniele Pilenga
On Tue, Aug 04, 2009 at 11:11:17AM -0400, Luis Useche wrote: > Hello Guys, > > I was wondering if there is some tool that delete the packages > specified along with their "deletable" dependencies. Deletable means > packages that pkg_add added automatically (as dependencies of the > installed one) a

Re: Delete packages with dependencies

2009-08-04 Thread Luis Useche
>> 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

Re: Delete packages with dependencies

2009-08-04 Thread Luis Useche
On Tue, Aug 4, 2009 at 1:01 PM, Ted Unangst wrote: > On Tue, Aug 4, 2009 at 12:47 PM, Luis Useche 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 x

Re: Delete packages with dependencies

2009-08-04 Thread Darrin Chandler
On Tue, Aug 04, 2009 at 12:47:49PM -0400, Luis Useche wrote: > On Tue, Aug 4, 2009 at 12:14 PM, Darrin > Chandler wrote: > > On Tue, Aug 04, 2009 at 11:30:44AM -0400, Luis Useche wrote: > >> On Tue, Aug 4, 2009 at 11:20 AM, Bret S. Lambert > >> wrote: > >> > pkg_delete `pkg_info -t` will almost do

Re: Delete packages with dependencies

2009-08-04 Thread Ted Unangst
On Tue, Aug 4, 2009 at 12:47 PM, Luis Useche 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 pack

Re: Delete packages with dependencies

2009-08-04 Thread Luis Useche
On Tue, Aug 4, 2009 at 12:14 PM, Darrin Chandler wrote: > On Tue, Aug 04, 2009 at 11:30:44AM -0400, Luis Useche wrote: >> On Tue, Aug 4, 2009 at 11:20 AM, Bret S. Lambert >> wrote: >> > pkg_delete `pkg_info -t` will almost do what you're looking for ;) >> >> The problem with this command is that i

Re: Delete packages with dependencies

2009-08-04 Thread Darrin Chandler
On Tue, Aug 04, 2009 at 11:30:44AM -0400, Luis Useche wrote: > On Tue, Aug 4, 2009 at 11:20 AM, Bret S. Lambert > wrote: > > pkg_delete `pkg_info -t` will almost do what you're looking for ;) > > The problem with this command is that it will remove packages > installed for the end user. In my cas

Re: Delete packages with dependencies

2009-08-04 Thread neal hogan
> >From the "-F dependencies" option I understand that pkg_delete will > remove all the packages that depend on the listed package. For > instance, if you run: "pkg_delete -F dependencies xpdf-utils", it will > remove xpdf as well. Ya, you're right. Sorrry for the noise. > > Luis Useche > use...

Re: Delete packages with dependencies

2009-08-04 Thread Luis Useche
On Tue, Aug 4, 2009 at 11:32 AM, neal hogan wrote: > On Tue, Aug 04, 2009 at 11:11:17AM -0400, Luis Useche wrote: >> Hello Guys, >> >> I was wondering if there is some tool that delete the packages >> specified along with their "deletable" dependencies. Deletable means >> packages that pkg_add adde

Re: Delete packages with dependencies

2009-08-04 Thread neal hogan
On Tue, Aug 04, 2009 at 11:11:17AM -0400, Luis Useche wrote: > Hello Guys, > > I was wondering if there is some tool that delete the packages > specified along with their "deletable" dependencies. Deletable means > packages that pkg_add added automatically (as dependencies of the > installed one)

Re: Delete packages with dependencies

2009-08-04 Thread Luis Useche
On Tue, Aug 4, 2009 at 11:20 AM, Bret S. Lambert wrote: > On Tue, Aug 04, 2009 at 11:11:17AM -0400, Luis Useche wrote: >> Hello Guys, >> >> I was wondering if there is some tool that delete the packages >> specified along with their "deletable" dependencies. Deletable means >> packages that pkg_add

Re: Delete packages with dependencies

2009-08-04 Thread neal hogan
On Tue, Aug 04, 2009 at 11:11:17AM -0400, Luis Useche wrote: > Hello Guys, > > I was wondering if there is some tool that delete the packages > specified along with their "deletable" dependencies. Deletable means > packages that pkg_add added automatically (as dependencies of the > installed one)

Re: Delete packages with dependencies

2009-08-04 Thread Bret S. Lambert
On Tue, Aug 04, 2009 at 11:11:17AM -0400, Luis Useche wrote: > Hello Guys, > > I was wondering if there is some tool that delete the packages > specified along with their "deletable" dependencies. Deletable means > packages that pkg_add added automatically (as dependencies of the > installed one)

Delete packages with dependencies

2009-08-04 Thread Luis Useche
Hello Guys, I was wondering if there is some tool that delete the packages specified along with their "deletable" dependencies. Deletable means packages that pkg_add added automatically (as dependencies of the installed one) and are not dependency of another package. This will ensure (in most of t