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.