Citando Ryan Schmidt :
>  On Oct 5, 2007, at 09:41, ara.t.howard wrote:
> 
> > On Oct 4, 2007, at 11:14 PM, Erwan David wrote:
> >
> >> I also doubt portupgrade will work with macports. But some features are
> >> interesting. An exemple is the fact that in upgrading it will order the
> >> recompilations thus avoiding recompiling 6 or 7 time the same library, as
> >> macports do.
> >
> > yeah it's pretty slick.  non-essential, but slick.
> >
> > porting it, no pun intended, might be fun.  i read the code and it's very 
> > easy - i just know nothing of macports or else i might try.
> 
>  You probably wouldn't so much be porting it, as taking ideas from it and 
>  reimplementing them for MacPorts. I imagine MacPorts already does some of 
>  the things portupgrade does. For those features of portupgrade that you 
>  would like MacPorts to have, you would probably want to open a discussion on 
>  the macports-dev list, explain what you want the feature to do, how it would 
>  work, what the syntax would be, what the behavior would be. After there's 
>  consensus that this is a good feature to add, then hacking on the base code 
>  could begin. Note that MacPorts is written in Tcl.
> 

I don't know exactly what's the use of portupgrade, but I wrote a small
dirty zsh script that writes the dependents of a port and its dependents
(recursively). As it may be wanted by some people and may be quite usefull
for having a coherent tree when a lib is updated, here it is. There may
however be problems of order of rebuild...

Hope some will like it,

Emmanuel
#!/bin/zsh

if [ $# != 1 ]; then
        print "Usage: $0 <port>"
        exit 1
else
        theport=$1
        if [ ! -e deps.ports ]; then
                port dependents installed > deps.ports
        fi
        typeset -U dependents
        typeset -U newdeps
        typeset -U tempdeps
        newdeps=($(grep " ${theport}$" deps.ports | cut -d ' ' -f 1))
        dependents+=($newdeps)
        while [ $newdeps[0] ]; do
                tempdeps=()
                for i in $newdeps; do
                        temp=($(grep ${i}$ deps.ports | cut -d ' ' -f 1))
                        dependents+=($temp)
                        tempdeps+=($temp)
                done
                newdeps=($tempdeps)
        done
        print $dependents
fi

Attachment: pgp94vWXPA9LU.pgp
Description: PGP signature

_______________________________________________
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/macports-users

Reply via email to