[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Why did P2 fail to install IU from a composite repository?

Hi Sam,

Looking at the compositeContent.jar there are no children defined in the repository. You'd also need to use the p2.composite.metadata.repository.add task in order to add children to it as at the moment your script is just adding to the artifact repository.

Matthew

Inactive hide details for sam zhou ---04/28/2009 12:44:02 PM---I create a composite repository pointing to Eclipse 3.5M6 and Orsam zhou ---04/28/2009 12:44:02 PM---I create a composite repository pointing to Eclipse 3.5M6 and Orbit P2 REPO (at a local web server) using the following Ant scr


From:

sam zhou <zhou3r@xxxxxxxxx>

To:

p2-dev@xxxxxxxxxxx

Date:

04/28/2009 12:44 PM

Subject:

[p2-dev] Why did P2 fail to install IU from a composite repository?




I create a composite repository pointing to Eclipse 3.5M6 and Orbit P2 REPO (at a local web server) using the following Ant scripts,
       
        <property name="compositeSiteDir" value="d:\tmp\MyCompositeRemoteRepo" />

        <delete dir="${compositeSiteDir}" />
        <mkdir dir="${compositeSiteDir}" />       
       
        <!-- create a composite repo -->
        <p2.composite.artifact.repository.create location="
file://${compositeSiteDir}" name="My Composite Repository"  />
        <p2.composite.metadata.repository.create location="
file://${compositeSiteDir}" name="My Composite Repository" compressed="true" failonexists="false"/>
           
        <!-- add 2 children -->
        <p2.composite.artifact.repository.add location="
file://${compositeSiteDir}" child="http://localhost:8080/repo/S-3.5M6-200903130100/" />
        <p2.composite.artifact.repository.add location="
file://${compositeSiteDir}" child="http://localhost:8080/repo/Orbit-I20090320075422/" />

The script generate two compositeArtifacts.jar and compositeContent.jar with the following xml inside.

compositeArtifacts.jar
----------------------
<?xml version='1.0' encoding='UTF-8'?>
<?compositeArtifactRepository version='1.0.0'?>
<repository name='My Composite Repository' type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1'>
  <properties size='2'>
    <property name='p2.compressed' value='true'/>
    <property name='p2.timestamp' value='1240932747625'/>
  </properties>
  <children size='2'>
    <child location='
http://localhost:8080/repo/S-3.5M6-200903130100/'/>
    <child location='
http://localhost:8080/repo/Orbit-I20090320075422/'/>
  </children>
</repository>

compositeContent.jar
--------------------
<?xml version='1.0' encoding='UTF-8'?>
<?compositeMetadataRepository version='1.0.0'?>
<repository name='My Composite Repository' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1'>
  <properties size='2'>
    <property name='p2.compressed' value='true'/>
    <property name='p2.timestamp' value='1240932747531'/>
  </properties>
</repository>

So far so good. If I use the following Ant script directly install Equinox from Eclipse P2 REPO, everything get installed correctly.

        <property name="rt.dir" value="D:\apps\p2director" />
        <property name="p2.director.install.path" value="d:\tmp\MyP2Install"/>
       
        <exec executable="java" failonerror="false" dir="${rt.dir}" timeout="900000">
            <arg line="-Declipse.p2.data.area=${p2.director.install.path}/p2" />
            <arg line="-Xdebug" />
            <arg line="-jar ${rt.dir}/plugins/org.eclipse.equinox.launcher_1.0.200.N20090318-2000.jar" />
            <arg line="-application org.eclipse.equinox.p2.director.app.application" />
            <arg line="-nosplash" />
            <arg line="--launcher.suppressErrors" />
            <arg line="-consoleLog" />
            <arg line="-flavor tooling" />
            <arg line="-installIU org.eclipse.equinox.feature.group" />
            <arg line="-p2.os win32" />
            <arg line="-
p2.ws win32" />
            <arg line="-p2.arch x86" />
            <arg line="-roaming" />
            <arg line="-profile MyProfile" />
            <arg line="-profileProperties org.eclipse.update.install.features=true" />
            <arg line="-metadataRepository
http://localhost:8080/repo/S-3.5M6-200903130100/" />
            <arg line="-artifactRepository
http://localhost:8080/repo/S-3.5M6-200903130100/" />
            <arg line="-destination ${p2.director.install.path}" />
            <arg line="-bundlepool ${p2.director.install.path}" />
        </exec>
       
However, if I change -metadataRepository/-metadataRepository from
http://localhost:8080/repo/S-3.5M6-200903130100/ to http://localhost:8080/repo/MyCompositeRemoteRepo/, I got installable unit not found exception. Do anyone know why P2 failed to install from the composite repository? Thanks a lot.

---------------------exception-----------------------
install.p2.directly:
   [delete] Deleting directory d:\tmp\MyP2Install
     [exec] !SESSION 2009-04-28 12:34:13.625 -----------------------------------------------
     [exec] eclipse.buildId=unknown
     [exec] java.version=1.5.0_14
     [exec] java.vendor=Sun Microsystems Inc.
     [exec] BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
     [exec] Framework arguments:  -application org.eclipse.equinox.p2.director.app.application --launcher.suppressErrors -flavor tooling -installIU org.eclipse.equinox.feature.group -p2.os win32 -
p2.ws win32 -p2.arch x86 -roaming -profile MyProfile -profileProperties org.eclipse.update.install.features=true -metadataRepository http://localhost:8080/repo/MyCompositeRemoteRepo/ -artifactRepository http://localhost:8080/repo/MyCompositeRemoteRepo/ -destination d:\tmp\MyP2Install -bundlepool d:\tmp\MyP2Install
     [exec] Command-line arguments:  -application org.eclipse.equinox.p2.director.app.application --launcher.suppressErrors -consoleLog -flavor tooling -installIU org.eclipse.equinox.feature.group -p2.os win32 -
p2.ws win32 -p2.arch x86 -roaming -profile MyProfile -profileProperties org.eclipse.update.install.features=true -metadataRepository http://localhost:8080/repo/MyCompositeRemoteRepo/ -artifactRepository http://localhost:8080/repo/MyCompositeRemoteRepo/ -destination d:\tmp\MyP2Install -bundlepool d:\tmp\MyP2Install
     [exec]
     [exec] !ENTRY org.eclipse.equinox.p2.director.app 4 0 2009-04-28 12:34:15.796
     [exec] !MESSAGE The installable unit org.eclipse.equinox.feature.group has not been found.
     [exec] The installable unit org.eclipse.equinox.feature.group has not been found.


Thanks.
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev


GIF image

GIF image