Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » p2.inf addRepository with archived repo?
p2.inf addRepository with archived repo? [message #876254] Thu, 24 May 2012 08:38 Go to next message
js Missing name is currently offline js Missing nameFriend
Messages: 73
Registered: July 2009
Member
I am trying to enable update of my rcp application. Previously I had the following in my p2.inf file which worked fine:

instructions.configure=\
  addRepository(type:0,location:http${#58}//myhost:8081/repos/my.repo);\
  addRepository(type:1,location:http${#58}//myhost:8081/repos/my.repo);


but now I store archived versions of the repos

http://myhost/repos/my.repo.zip


so I have tried to update my p2.inf file to:

instructions.configure=\
  addRepository(type:0,location:http${#58}//myhost:8081/repos/my.repo.zip);\
  addRepository(type:1,location:http${#58}//myhost:8081/repos/my.repo.zip);


but it does not work. What is the syntax for adding archived repositories to the p2.inf file?
Re: p2.inf addRepository with archived repo? [message #876354 is a reply to message #876254] Thu, 24 May 2012 12:43 Go to previous messageGo to next message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

Am 24.05.2012 10:38, schrieb js Mising name:
> instructions.configure=\
> addRepository(type:0,location:http${#58}//myhost:8081/repos/my.repo.zip);\
> addRepository(type:1,location:http${#58}//myhost:8081/repos/my.repo.zip);

I'm not sure it will work over HTTP. It may download the whole ZIP on
every single requests. Not sure if there is some smart caching involved.

But they way it works with archived repos is that you give it a ZIP URL.

For example:
"zip:http://myhost:8081/repos/my.repo.zip!"

p2 will then access items in the ZIP using URLs like
"zip:http://myhost:8081/repos/my.repo.zip!/content.jar", etc.

-Gunnar

--
Gunnar Wagenknecht
gunnar@xxxxxxxx
http://wagenknecht.org/
Re: p2.inf addRepository with archived repo? [message #876370 is a reply to message #876354] Thu, 24 May 2012 13:22 Go to previous messageGo to next message
js Missing name is currently offline js Missing nameFriend
Messages: 73
Registered: July 2009
Member
Ok but where do you put the 'zip' in the p2.inf file?

I have tried:

 instructions.configure=\
 addRepository(type:0,location:zip:http${#58}//myhost:8081/repos/my.repo.zip);\
 addRepository(type:1,location:zip:http${#58}//myhost:8081/repos/my.repo.zip);


but it does not work.
Re: p2.inf addRepository with archived repo? [message #876391 is a reply to message #876370] Thu, 24 May 2012 13:57 Go to previous messageGo to next message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

Am 24.05.2012 15:22, schrieb js Mising name:
> addRepository(type:1,location:zip:http${#58}//myhost:8081/repos/my.repo.zip);


You still need to encode the ':' after ZIP and the '!' at the end is
also important.

-Gunnar

--
Gunnar Wagenknecht
gunnar@xxxxxxxx
http://wagenknecht.org/
Re: p2.inf addRepository with archived repo? [message #876802 is a reply to message #876391] Fri, 25 May 2012 09:55 Go to previous messageGo to next message
js Missing name is currently offline js Missing nameFriend
Messages: 73
Registered: July 2009
Member
What do you mean by "encoding"? On this page (near the bottom):


http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_actions_touchpoints.html

there is a table of the "Variables Available in all phases" which says that:

: = ${#58}

I have tried:

addRepository(type:1,location:zip${#58}http${#58}//myhost/repos/my.repo.zip!);


but when I try to update I get:

!SUBENTRY 1 org.eclipse.equinox.p2.repository 4 1006 2012-05-25 11:50:05.406
!MESSAGE Malformed reference to remote file: zip:http://myhost/repos/my.repo.zip!/content.xml
!STACK 0
java.net.MalformedURLException: unknown protocol: zip
        at java.net.URL.<init>(Unknown Source)
        at java.net.URL.<init>(Unknown Source)
        at java.net.URL.<init>(Unknown Source)



Re: p2.inf addRepository with archived repo? [message #876810 is a reply to message #876802] Fri, 25 May 2012 10:04 Go to previous messageGo to next message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

Am 25.05.2012 11:55, schrieb js Mising name:
> java.net.MalformedURLException: unknown protocol: zip

I'm afraid that this indicates that it's not possible to reference an
archived update site from a remote location (i.e., not on the local file
system).

-Gunnar

--
Gunnar Wagenknecht
gunnar@xxxxxxxx
http://wagenknecht.org/
Re: p2.inf addRepository with archived repo? [message #876850 is a reply to message #876810] Fri, 25 May 2012 11:44 Go to previous message
js Missing name is currently offline js Missing nameFriend
Messages: 73
Registered: July 2009
Member
prefixing with 'jar' instead of 'zip' works:

addRepository(type:1,location:jar${#58}http${#58}//myhost/repos/my.repo.zip!);


Smile

[Updated on: Fri, 25 May 2012 11:50]

Report message to a moderator

Previous Topic:What are configurators and how to auto-discover bundles and start them?
Next Topic:&quot;Gray&quot; feature icon meaning in software site add dialog
Goto Forum:
  


Current Time: Tue Oct 26 16:38:03 GMT 2021

Powered by FUDForum. Page generated in 0.01659 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top