[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] how to mirror an update-site and dependencies using p2

Hi Folks,

I've been digging around how to mirror an update-site with dependencies.
Now I know how to mirror an update-site but *without dependencies*.

All that I want is to resolve the dependencies of the mirror site as the
way eclipse does using GUI.

What I'm trying to do is mirror m2eclipse's update-site plugin with it's
dependencies.

Mirroring only m2eclipse works fine the way I'm doing below, but I don't get the dependencies
org.eclipse.zest.* which are necessary to get the plugin working completely.

Is there any way to use p2 mirror the update site resolving the
dependencies like the way the user interface does it?

My script to mirror update-sites:
-------
 #!/bin/bash
 set -xe
 PROXYHOST="proxy.machine"
 PROXYPORT="PPORT"
 PROXYUSER="USER"
 PROXYPASSWD="PWD"
 ECLIPSESOURCELINK="http://eclipse.c3sl.ufpr.br/technology/epp/downloads/release/galileo/SR2/eclipse-jee-galileo-SR2-linux-gtk.tar.gz";
 ECLIPSETGZ=$(echo $ECLIPSESOURCELINK | awk 'BEGIN{FS="/"}{print $NF}')
 ECLIPSEDIR="./eclipse"

  updirs=( 'http://m2eclipse.sonatype.org/sites/m2e/|m2e' 'http://m2eclipse.sonatype.org/sites/m2e-extras/|m2e-extras' 'http://download.eclipse.org/tools/gef/updates/releases/|gef') 
 
 export JAVA_HOME="/usr/lib/jvm/java-6-sun"
 
 if ! [ -e $ECLIPSETGZ ]; then 
 	if ![ ${PROXYUSER}x == ""x ]; 
 	then
 		curl -O -U ${PROXYUSER}:${PROXYPASSWD} --proxy-anyauth --proxy ${PROXYHOST}:${PROXYPORT} ${ECLIPSESOURCELINK}
 	fi
 fi
 
 rm -fr $ECLIPSEDIR
 tar xzf $ECLIPSETGZ
 
 for updir in ${updirs[@]};
 do
 	update=${updir%%|*}
 	dir=${updir##*|}
 	if ! [ -d $dir ] ; then
 		mkdir $dir
 	fi
 	java -Dhttp.proxyHost=${PROXYHOST} -Dhttp.proxyPort=${PROXYPORT} -jar ${ECLIPSEDIR}/plugins/org.eclipse.equinox.launcher_*.jar -application org.eclipse.update.core.standaloneUpdate -command mirror -from $update -to $dir
 done
-------


Thanks in advance,

Leslie