chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] reinstall all eggs


From: Alex Shinn
Subject: [Chicken-users] reinstall all eggs
Date: Fri, 20 Apr 2007 22:59:56 +0900

Hi,

On 4/19/07, Andre Kuehne <address@hidden> wrote:

Yes i know. It works as you described it. Although there are some
packages which have no version information, so these would get
reinstalled.

Unfortunately that's true for some older packages, but hopefully these
will be updated soon.

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.

--
Alex




reply via email to

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