I have a proposed solution for the Dependency issue...based on the
tradition of links already deeply integrated in our beloved
Gobo...presently any broken links indicate an unclean removal of a
program/library etc....no harm done typically yet ideally the remove
program would take care of it...in the same trend...I have thought
about this quite a bit so please let me know if you have any
questions...
This is done through a system wide folder:
/System/Links/Dependencies
Anytime a program (incl. libraries etc.) depends on another...Compile
once satisfying the dependencies will create link(s) in
/System/Links/Dependencies/Glibc (new folder.)
ls -Rl
.:
total 0
drwxr-xr-x 2 gobo root 80 2007-07-01 07:47 >=2.4
./>=2.4:
total 0
lrwxrwxrwx 1 gobo root 25 2007-07-01 07:47 ALSA-Lib--1.0.13 ->
/Programs/ALSA-Lib/1.0.13
Now, if any software is removed like ALSA for instance, the link will
become invalid (or the link will be removed by RemoveProgram)...once a
folder for Glibc is empty, you know that NO program/library depends on
it...also the name of the directory indicates the version dependency
so you know if you can upgrade or delete the older versions
A similar mechanism can also be used to track dependencies for a
gentoo USE flag like concept...like below:
A clear benefit is that you just need to do an ls to see what all
depends on a package or what all is compiled using the GTK flag...
This approach ensures that the filesystem also has the complete
metadata (right now the links give us partial metadata about programs
installed) ...so backing up the links (and then parsing broken ones)
can help us track the state of the OS
I am keen to start working on the Compile, InstallPackage,
RemoveProgram etc. scripts to start implementing this but want to get
everyone's view and support on this proposed architecture
Quoting MJ Ray <[EMAIL PROTECTED]>:
> MLA-Gobo <[EMAIL PROTECTED]> wrote:
>> [...] I'm thinking of something like deborphan; show those programs that
>> nothing depends upon. [...]
>
> Here's a script that finds Programs which nothing depends on and
> haven't been accessed in the last 30 days. Think of it as like
> deborphan - popcon = ListUnpopular
>
> #!/usr/bin/env zsh
> . GoboPath
>
> # print banner
> cat >&2 <<EOF
> ListUnpopular 1.0 - show programs which are not used in a month
> (Copyright 2007 MJ Ray. Released under GNU GPL v2.)
>
> EOF
>
> typeset -A vidita
>
> # Pass one, memorise all seen deps
> find ${goboPrograms} -maxdepth 1 -type d -printf '%P\n' | while read
> prog ; do
> cut -f1 '-d ' ${goboPrograms}/$prog/Current/Resources/Dependencies
> 2>/dev/null | while read depdo ; do
> vidita[$depdo]=1
> done
> done
>
> # Pass two, check stuff we don't dep on
> find ${goboPrograms} -maxdepth 1 -type d -printf '%P\n' | while read
> prog ; do
> if [ -z "${vidita[$prog]}" ] \
> && [ -e "${goboPrograms}/$prog/Current/" ] \
> && [ -z "$(find ${goboPrograms}/$prog/Current/ -path
> '*/Resources' -prune -o -type f -atime -30 -print )" ] ; then
> echo $prog
> fi
> done
>
> Hope that helps,
> --
> MJ Ray - see/vidu http://mjr.towers.org.uk/email.html
> Experienced webmaster-developers for hire http://www.ttllp.co.uk/
> Also: statistician, sysadmin, online shop builder, workers co-op.
> Writing on koha, debian, sat TV, Kewstoke http://mjr.towers.org.uk/
> _______________________________________________
> gobolinux-devel mailing list
> [email protected]
> http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel
>
_______________________________________________
gobolinux-devel mailing list
[email protected]
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel