Downloading nightly Babel updates [was: Using NL plug-ins in RCP] [message #16596] |
Tue, 22 July 2008 07:07 |
Sean Flanigan Messages: 22 Registered: July 2009 |
Junior Member |
|
|
Patrick Godeau wrote:
> It is possible to download NL plug-ins from the nightly build update
> site with some fiddling (this require to bypass robots.txt, I use "wget
> -erobots=off") but this is not acceptable for the average developer.
> I also had to write a Python script to get NL plug-ins for all wanted
> languages.
Rather than use wget, you might prefer to use the command-line interface
to the Eclipse P2 update manager. It turned out to be easier than I'd
expected...
I'm writing a script to do that at the moment, although I plan to
package as RPMs rather than langpack zips. The downloading bit
currently looks a bit like this:
#!/bin/sh
locale=es
UPDATE_SITE= http://download.eclipse.org/technology/babel/update-site/gan ymede/
ECLIPSE_BIN=~/apps/eclipse-ganymede/eclipse/eclipse
DEST=./eclipse
PROFILE=${locale}-Profile
WORKDIR=work/$locale
mkdir -p $DEST home
mkdir -p $WORKDIR
echo "Downloading all translations for locale \"$locale\". This might
take a few minutes..."
# work around the fact that p2 doesn't seem to
# support updates from command-line:
rm -fr \
$DEST/p2/org.eclipse.equinox.p2.engine/profileRegistry/$PROF ILE.profile
time $ECLIPSE_BIN \
--launcher.suppressErrors \
-nosplash \
-application org.eclipse.equinox.p2.director.app.application \
-metadataRepository $UPDATE_SITE \
-artifactRepository $UPDATE_SITE \
-installIU org.eclipse.nls.$locale.feature.group \
-destination $DEST \
-profile $PROFILE \
-profileProperties org.eclipse.update.install.features=true \
-bundlepool $WORKDIR \
-p2.os linux \
-p2.ws gtk \
-p2.arch x86 \
-roaming \
-vmargs \
-Duser.home=home \
-Declipse.p2.data.area=$DEST/p2
#EOF
Most of those options are ripped straight from here -
http://wiki.eclipse.org/Equinox_p2_director_application#Inst alling_a_complete_product
- but I found that I also had to suppress the splash screen and the
error dialog for it to work well in a script.
Note that this script doesn't delete files from previous nightly files,
which means it runs pretty quickly when there are no new updates, but
some sort of cleanup would be needed in most cases, eg cronjobs.
It takes a few minutes to run, even though it only seems to download
about 10 MB (depending on the locale). I haven't looked into why it
takes that long.
Oh, and just in case you thought I had it all perfect and polished,
sometimes P2 will complain like this:
~/ttt> ./t.sh
Downloading all translations for locale "ja". This might take a few
minutes...
[Fatal Error] :24163:2694: Premature end of file.
Installing org.eclipse.nls.ja.feature.group 0.2.0.v20080720043402.
Operation completed in 270080 ms.
real 4m33.265s
user 0m21.601s
sys 0m2.365s
~/ttt>
It seems to carry on anyway, but it might be missing some of the plugins
when that happens.
Regards
Sean.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03636 seconds