Thanks Ricardo, this is similar to what we're thinking just that this 
uses files and the approach we're considering is symbolic links...

I haven't used FreeBSD much but I think the question here is how does it 
maintain the +REQUIRED_BY ? Does each program edit these files and add 
their dependencies ?

....this isn't a bad mechanism for storing the info, the solution I am 
working on is similar but uses symbolic links so we should be able to 
just remove the broken links to remove the programs from the list....

All, please keep the input coming

Ricardo Nabinger Sanchez wrote:
> On Wed, 04 Jul 2007 20:16:28 -0400
> Anshuman Aggarwal <[EMAIL PROTECTED]> wrote:
>
>   
>> Great idea, I'm going to put the prototype implementation together 
>> ....since the prototype might be just as involved as the logic needed
>> in Compile,RemoveProgram...
>>
>> The solution which includes all ideas discussed below, will show
>> broken links for missing dependencies as well ...
>>     
>
> Not really important, but I hope this may add up to the discussed ideas.
> In FreeBSD, one can check for (possibly) unneeded packages with:
>
>       % find /var/db/pkg -name +REQUIRED_BY -size 0
>
> Sample output:
>
> % find /var/db/pkg/ -name +REQUIRED_BY -size 0
> /var/db/pkg/gnu-automake-1.10/+REQUIRED_BY
> /var/db/pkg/libesmtp-1.0.4_1,1/+REQUIRED_BY
> /var/db/pkg/xpdf-3.02/+REQUIRED_BY
> /var/db/pkg/faces-1.7.7_7/+REQUIRED_BY
> /var/db/pkg/ImageMagick-6.2.9.8/+REQUIRED_BY
> /var/db/pkg/vcdimager-0.7.23_3/+REQUIRED_BY
> /var/db/pkg/xosd-2.2.12_1/+REQUIRED_BY
> /var/db/pkg/sdl_image-1.2.5/+REQUIRED_BY
> /var/db/pkg/ffmpeg-devel-0.4.9.c.2006032300_4/+REQUIRED_BY
>
> Those packages are either build dependencies (like gnu-automake) or
> leaves (like xpdf).  The former were once necessary (build dependency,
> for instance), and may be removed because no one needs them anymore
> (like libesmtp).  A connected package's +REQUIRED_BY links to other
> packages, like:
>
> % cat /var/db/pkg/qca-1.0/+REQUIRED_BY 
> psi-0.10
>
> However, application packages usually don't have +REQUIRED_BY:
>
> % ls /var/db/pkg/vim-7.0.224/+REQUIRED_BY
> ls: /var/db/pkg/vim-7.0.224/+REQUIRED_BY: No such file or directory
>
> AFAICT, pkg_delete doesn't remove those +REQUIRED_BY files, so one can
> easily check which packages are good choices for removal, looking for a
> zero-sized +REQUIRED_BY file in its port directory.
>
>   
_______________________________________________
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel

Reply via email to