Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Babel » Downloading nightly Babel updates [was: Using NL plug-ins in RCP]
Downloading nightly Babel updates [was: Using NL plug-ins in RCP] [message #16596] Tue, 22 July 2008 07:07 Go to next message
Sean Flanigan is currently offline Sean FlaniganFriend
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.
Re: Downloading nightly Babel updates [was: Using NL plug-ins in RCP] [message #16636 is a reply to message #16596] Wed, 23 July 2008 00:25 Go to previous messageGo to next message
Sean Flanigan is currently offline Sean FlaniganFriend
Messages: 22
Registered: July 2009
Junior Member
Sean Flanigan wrote:
> 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.

Do they say replying to self is the first sign of madness? Or is it the
second?

Ah. Apparently it's not a good idea to interrupt the command-line
update operation, because it leaves incomplete files behind in the
'home' and/or 'eclipse' directories.

Removing those directories each time (or just in the event of failures)
should prevent the [Fatal error] above, and some other, similar errors
I've seen. Just as well I'm not running against my real 'eclipse'
directory. Or my real home directory...


Sean.
Re: Downloading nightly Babel updates [was: Using NL plug-ins in RCP] [message #16651 is a reply to message #16636] Wed, 23 July 2008 00:39 Go to previous message
Eclipse Webmaster is currently offline Eclipse WebmasterFriend
Messages: 607343
Registered: July 2009
Senior Member
Sean Flanigan wrote:
> Sean Flanigan wrote:
>> 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.
>
> Do they say replying to self is the first sign of madness? Or is it the
> second?
>
> Ah. Apparently it's not a good idea to interrupt the command-line
> update operation, because it leaves incomplete files behind in the
> 'home' and/or 'eclipse' directories.
>
> Removing those directories each time (or just in the event of failures)
> should prevent the [Fatal error] above, and some other, similar errors
> I've seen. Just as well I'm not running against my real 'eclipse'
> directory. Or my real home directory...
>
>
> Sean.

Thanks a bunch for posting this, Sean.
Re: Downloading nightly Babel updates [was: Using NL plug-ins in RCP] [message #572533 is a reply to message #16596] Wed, 23 July 2008 00:25 Go to previous message
Sean Flanigan is currently offline Sean FlaniganFriend
Messages: 22
Registered: July 2009
Junior Member
Sean Flanigan wrote:
> 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.

Do they say replying to self is the first sign of madness? Or is it the
second?

Ah. Apparently it's not a good idea to interrupt the command-line
update operation, because it leaves incomplete files behind in the
'home' and/or 'eclipse' directories.

Removing those directories each time (or just in the event of failures)
should prevent the [Fatal error] above, and some other, similar errors
I've seen. Just as well I'm not running against my real 'eclipse'
directory. Or my real home directory...


Sean.
Re: Downloading nightly Babel updates [was: Using NL plug-ins in RCP] [message #572554 is a reply to message #16636] Wed, 23 July 2008 00:39 Go to previous message
Eclipse Webmaster is currently offline Eclipse WebmasterFriend
Messages: 607343
Registered: July 2009
Senior Member
Sean Flanigan wrote:
> Sean Flanigan wrote:
>> 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.
>
> Do they say replying to self is the first sign of madness? Or is it the
> second?
>
> Ah. Apparently it's not a good idea to interrupt the command-line
> update operation, because it leaves incomplete files behind in the
> 'home' and/or 'eclipse' directories.
>
> Removing those directories each time (or just in the event of failures)
> should prevent the [Fatal error] above, and some other, similar errors
> I've seen. Just as well I'm not running against my real 'eclipse'
> directory. Or my real home directory...
>
>
> Sean.

Thanks a bunch for posting this, Sean.
Previous Topic:Downloading nightly Babel updates [was: Using NL plug-ins in RCP]
Next Topic:Translation tool - new features
Goto Forum:
  


Current Time: Sat Apr 27 01:29:53 GMT 2024

Powered by FUDForum. Page generated in 0.03636 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top