[276306] Re-enable p2 repository
diff --git a/classes/export/generate1.php b/classes/export/generate1.php
index f0aebff..77e5972 100755
--- a/classes/export/generate1.php
+++ b/classes/export/generate1.php
@@ -19,6 +19,7 @@
* Sean Flanigan (Red Hat) - patch, bug 261584, wrong output folder
* Kit Lo (IBM) - patch, bug 270456, Unable to use Babel PTT to verify PDE in the eclipse SDK
* Kit Lo (IBM) - Bug 299402, Extract properties files from Eclipse project update sites for translation
+ * Kit Lo (IBM) - Bug 276306, Re-enable p2 repository
*******************************************************************************/
/*
@@ -513,18 +514,16 @@
$dbh = $dbc->disconnect();
-
- // now generate the metadata and add the non-greedy tags
-
+
/*
- * Leaving this out of generate1 to avoid p2 breakage
- *
- system("sh " . dirname(__FILE__) . "/runMetadata.sh ".
- METADATA_GENERATOR_LOCATION . " ${output_dir_for_train} ");
- system("xsltproc -o ${output_dir_for_train}content.xml ".
- dirname(__FILE__) . "/content.xsl ${output_dir_for_train}content.xml");
- system("cd ${output_dir_for_train} ; jar -fc content.jar content.xml ; jar -fc artifacts.jar artifacts.xml ; rm site.xml");
- */
+ * Generate the metadata and add the non-greedy tags
+ * Note: Not needed for Europa and Ganymede because p2 repository was not supported
+ */
+ if (strcmp($train_id, "europa") != 0 && strcmp($train_id, "ganymede") != 0) {
+ system("sh " . dirname(__FILE__) . "/runMetadata.sh ". METADATA_GENERATOR_LOCATION . " ${output_dir_for_train} ");
+ system("xsltproc -o ${output_dir_for_train}content.xml ". dirname(__FILE__) . "/content.xsl ${output_dir_for_train}content.xml");
+ system("cd ${output_dir_for_train} ; jar -fc content.jar content.xml ; jar -fc artifacts.jar artifacts.xml ; rm *.xml");
+ }
}
echo "Completed generating update site\n";
diff --git a/classes/export/runMetadata.sh b/classes/export/runMetadata.sh
index 4903d5d..030bd1f 100644
--- a/classes/export/runMetadata.sh
+++ b/classes/export/runMetadata.sh
@@ -1,3 +1,3 @@
-#!/bin/sh
-
-$1/eclipse -application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator -updateSite $2 -site file:$2/site.xml -metadataRepositoryName "Babel language packs update site" -append -reusePack200Files -vmargs -Xmx256m
\ No newline at end of file
+#!/bin/sh
+
+$1/eclipse -application org.eclipse.equinox.p2.publisher.UpdateSitePublisher -metadataRepository file:$2 -metadataRepositoryName "Babel Language Pack Metadata Repository" -artifactRepository file:$2 -artifactRepositoryName "Babel Language Pack Artifact Repository" -source $2