Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 243178

Summary: provide p2 metadata for old Eclipse update sites
Product: Community Reporter: Eugene Kuleshov <ekuleshov>
Component: Cross-ProjectAssignee: Cross-Project issues <cross-project.inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: bjorn.freeman-benson, david_williams, mober.at+eclipse, nboldt
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Eugene Kuleshov CLA 2008-08-05 11:25:54 EDT
As part of unification our provisioning tools for target platform, we are using p2 to fetch required features and plugins from Eclipse update sites. This works nicely for Eclipse 3.4/Ganymede update site, but not for Europa and Callisto update sites.

It would be really helpful to generate p2 metadata for those legacy update sites using p2 metadata generator. http://wiki.eclipse.org/Equinox_p2_Metadata_Generator

This tool can be run on existing sites and produce metadata for all published artifacts. Here is possible command line that can be used to generate metadata (it has to use somewhat odd params on windows because of the slash issues):

@echo off
del C:\dev\sonatype\m2eclipse-sonatype\update-stage\artifacts.xml
del C:\dev\sonatype\m2eclipse-sonatype\update-stage\content.xml

set update_site_dir=C:\dev\m2e\update-stage
set update_site_url=file:C:/dev/m2e/update-stage
set update_site_name=Update Site %update_site_dir%
set update_site_artifacts=Artifacts %update_site_dir%

set args=-nosplash
set args=%args% -application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator
set args=%args% -updateSite %update_site_url%/site.xml
set args=%args% -site %update_site_xml%
set args=%args% -metadataRepository %update_site_url%
set args=%args% -metadataRepositoryName %update_site_name%
set args=%args% -artifactRepository %update_site_url%
set args=%args% -artifactRepositoryName "%update_site_artifacts%"
set args=%args% -noDefaultIUs -compress -vmargs -Xmx1024m
eclipsec.exe %args%
Comment 1 Bjorn Freeman-Benson CLA 2008-08-05 13:37:49 EDT
The eclipse.org download servers are Linux, not Windows, but if you'll paste the exact command line in to this bug, I'll see if I have permissions to run it on the update sites.
Comment 2 Martin Oberhuber CLA 2008-08-05 13:59:59 EDT
Here is what I've successfully been using for DSDP-NAB on build.eclpise.org: Replace ${SITE} with the directory of the update site. Replace the NAB specific stuff as needed.


#Use Java5 on build.eclipse.org - need JRE for pack200
JDK=/shared/dsdp/JDKs/ibm-java2-ppc-50
export PATH=${JDK}/jre/bin:${JDK}/bin:$PATH

#Get an Eclipse Basebuilder
basebuilder=${HOME}/org.eclipse.releng.basebuilder
basebuilderTag=RC2_34
if [ ! -d ${basebuilder} ]; then
  echo "Getting Basebuilder ${basebuilderTag}"
  cd "${HOME}"
  cvs -Q -d :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse co -r ${basebuilderTag} org.eclipse.releng.basebuilder
fi

#Create P2 metadata
echo "Creating P2 metadata..."
#Always create from scratch
cd ${SITE}
for x in content.xml content.jar content.jar.pack.gz artifacts.xml artifacts.jar
 artifacts.jar.pack.gz ; do
  if [ -f $x ]; then rm -f $x; fi
done
java -jar ${basebuilder}/plugins/org.eclipse.equinox.launcher.jar \
    -application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator \
    -updateSite ${SITE}/ \
    -site file:${SITE}/site.xml \
    -metadataRepository file:${SITE}/ \
    -metadataRepositoryName "NAB Update Site" \
    -artifactRepository file:${SITE}/ \
    -artifactRepositoryName "NAB Artifacts" \
    -compress \
    -reusePack200Files \
    -noDefaultIUs \
    -vmargs -Xmx256M
Comment 4 David Williams CLA 2008-08-05 14:09:26 EDT
I believe this is a pure dup of bug 235955. 

I realize I'm in a minority, but I'm still not that adding P2 meta data to a site that was not designed for it is a safe thing to do, or at least, that is would work as expected. There are known problem, such as bug 231453 (where not all features are installed). 

I believe the original reasons bug 235955 was opened have been fixed. 

This new request sounds like something new, but I do not really know what it is, or what the use case is. Some "unified provisioning tools" is going to install ... what? Callisto and Europa level installations? 





*** This bug has been marked as a duplicate of bug 235955 ***