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

Bug 349061

Summary: [releng] Add p2.index files to RAP repos
Product: [RT] RAP Reporter: Beyhan Veliev <beyhan.veliev>
Component: RelengAssignee: Project Inbox <rap-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 1.5   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
p2 index file
none
p2 index file for a composite repository
none
updated p2 index file
none
updated p2 index file for a composite repository none

Description Beyhan Veliev CLA 2011-06-10 11:29:02 EDT
The p2.index file provides a description of the kind of repository available at a particular location. This file is located next to the p2 metadata files (compositeContent.jar, content.jar, ...) that it describes. It is a java property file. The presence of this file in a repository will cause p2 to replace its default lookup order for repository to match the one specified in the file.
Comment 1 Beyhan Veliev CLA 2011-06-10 11:32:27 EDT
Created attachment 197794 [details]
p2 index file

This p2.index file is for a p2-repository which has the metadata in jarred form (content.jar, artifacts.jar)
Comment 2 Beyhan Veliev CLA 2011-06-10 11:34:39 EDT
Created attachment 197795 [details]
p2 index file for a composite repository

This p2.index file is for a composite p2-repository which has the metadata i xml form (compositeContent.xml and compositeArtifacts.xml)
Comment 3 Ralf Sternberg CLA 2011-07-04 12:27:49 EDT
Beyhan, where do you got these examples from? The wiki page [1] suggests a slightly different syntax.
The p2.index files are also being discussed in bug 347448.

[1] http://wiki.eclipse.org/Equinox/p2/p2_index
Comment 4 Beyhan Veliev CLA 2011-07-05 08:51:58 EDT
(In reply to comment #3)
> Beyhan, where do you got these examples from? The wiki page [1] suggests a
> slightly different syntax.
> The p2.index files are also being discussed in bug 347448.
> 
> [1] http://wiki.eclipse.org/Equinox/p2/p2_index

I took them from the wiki page [1]. As it seems the examples were wrong and someone corrected them now. I didn't test them because the effort for a local set up is too high. Anyway, I'll updated them.
Comment 5 Beyhan Veliev CLA 2011-07-05 08:58:08 EDT
Created attachment 199115 [details]
updated p2 index file
Comment 6 Beyhan Veliev CLA 2011-07-05 09:00:54 EDT
Created attachment 199116 [details]
updated p2 index file for a composite repository
Comment 7 Markus Knauer CLA 2015-11-06 05:23:30 EST
We do this for all our p2 repositories since many releases.

Since 3.0 we create .xz compressed files in addition to the old .jar files (e.g. content.jar and content.xml.xz). These files are referenced in the p2.index file like this:

version=1
metadata.repository.factory.order= content.xml.xz,content.xml,!
artifact.repository.factory.order= artifacts.xml.xz,artifacts.xml,!

Closing this bug now.