chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] reinstall all eggs


From: Andre Kuehne
Subject: Re: [Chicken-users] reinstall all eggs
Date: Fri, 20 Apr 2007 20:49:08 +0200
User-agent: Thunderbird 1.5.0.10 (X11/20070221)

Alex Shinn wrote:
On 4/19/07, Andre Kuehne <address@hidden> wrote:
I just tried a variation of your example (with -l instead of -C) to
reinstall all installed eggs (regardless if they have updates or
not). This might be usefull after an upgrade of chicken itself.

Ah, OK.  For this you could use the second command, and instead of
listing the uninstalled eggs (comm -1 -3 = set difference), list the
installed eggs (comm -1 -2 = set intersection):

$ chicken-setup -fetch-tree | grep '^[ (](' |\
   perl -ape 's/^[ (]\(([^ ]+)(?: .*)?$/\1/' | sort > pkg.txt
$ chicken-setup -l | cut -d" " -f 1 | sort | comm -1 -2 - pkg.txt

To continue after errors you could just put it in a loop:

$ cd TEMP_DIRECTORY
$ rm -rf *.egg *.egg-dir pkg.txt failed.txt
$ chicken-setup -fetch-tree | grep '^[ (](' |\
   perl -ape 's/^[ (]\(([^ ]+)(?: .*)?$/\1/' | sort > pkg.txt
$ for egg in `chicken-setup -l | cut -d" " -f 1 | sort |
               comm -1 -2 - pkg.txt`; do
    chicken-setup -d $egg || echo $egg >> failed.txt
 done

Which will attempt to reinstalled each egg exactly once and output a
list of failures in failed.txt.

Thank you. I wasn't aware of the -fetch-tree option.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]