Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Re: [emf-dev] Possible bug in EMF all-in-one distribution

Here is another script that addresses your last concerns. It will keep canonical entries if there is no descriptor with a processing step in it. This means that if jars of plug-ins that can't be packed or feature jars won't be removed.
I have tested this on a local data set, but please verify the output as I'm learning XSLT as I provide you new copies of the attached file :)

(See attached file: artifacts.xsl)

PaScaL

Inactive hide details for Re: [p2-dev] Re: [emf-dev] Possible bug in EMF all-in-one distributionRe: [p2-dev] Re: [emf-dev] Possible bug in EMF all-in-one distribution




Re: [p2-dev] Re: [emf-dev] Possible bug in EMF all-in-one distribution

Nick Boldt

to:

P2 developer discussions

09/14/2009 02:06 PM


Sent by:

p2-dev-bounces@xxxxxxxxxxx

Cc:

Eclipse Modelling Framework
Please respond to P2 developer discussions





OK, but not *all* jars can be packed, so would this xsl remove refs to
.jars which *should* be there? Is it smart enough to check for refs to
BOTH .jar and .jar.pack.gz and only remove where dupes occur?

N

Pascal Rapicault wrote:
>  > IMHO the fact that p2 doesn't check locally for a .jar.pack.gz before
>  > going to the web is still a bug in p2. A local repo, whether a zip or
>  > a folder, ought to have the same 'see if there's a packed jar just in
>  > case' behaviour - isn't that like one line of
>  > if-jar-exists-then-install,elseif-jar.pack.gz-exists-then-install-
>  > else-check-the-web code?
>    If it was that simple... The thing is that when you are installing
> from a local repository (file: URL) it is always cheaper to get the
> canonical jar because you don't have to do the unpacking. As I said in
> my last message, p2 could be made more resilient and exhaust all the
> descriptors such that if the canonical jar because was missing it could
> try to obtain the file in other form
> (
https://bugs.eclipse.org/bugs/show_bug.cgi?id=289351). Unfortunately
> this is not for 3.5.
>    
>
>  > And since the zip is installable as a zip, which is easier/faster than
>  > unpacking it first, and can be installed via director using the jar:
>  > prefix, I consider this a WORKSFORME.
> The fact that people can't take the repository and use it in a zipped or
> unzipped form is still problematic and I don't think this is a
> WORKSFORME. The core of the problem is that the artifact repository
> created claims it has artifacts that it does not have (there are
> descriptors in the artifacts.xml indicating that the repo has canonical
> jars but they are not present). Even if p2 was fixed in newer versions,
> this repository would still not work on older versions of p2, or would
> not pass a repository verification tool (to be released
>
https://bugs.eclipse.org/bugs/show_bug.cgi?id=277246).
> In order to remove the invalid entries from the repository I have
> attached an XSL tranform that will remove from the artifacts.xml every
> artifact descriptors that is referring to a canonical jar except for
> features. This should fix the problem you have.
>
> /(See attached file: artifacts.xsl)/
>
> HTH
>
> PaScaL
>
>  >
>  > If you disagree, open a bug and I'll point you at the code that does
>  > the jar packing, metadata gen, and zip packaging. Patches welcome.
>  >
>  > Nick
>  >
>  > On 9/11/09, Dalton, Tom <tom.dalton@xxxxxxx> wrote:
>  > > Hi,
>  > >
>  > > I had some problems recently with the EMF all-in-one distribution - the
>  > > update site .zip file. I raised the issue with the P2 team (who
> maintain
>  > > Eclipse's update features) and they say it's a bug in your
> distribution.
>  > > Please see the attached email chain for the details.
>  > >
>  > > Cheers,
>  > >
>  > > Tom Dalton
>  > >
>  > >
>  > > ________________________________
>  > >
>  > >    From: p2-dev-bounces@xxxxxxxxxxx
>  > > [mailto:p2-dev-bounces@xxxxxxxxxxx] On Behalf Of Dalton, Tom
>  > >    Sent: 11 September 2009 12:27
>  > >    To: P2 developer discussions
>  > >    Subject: RE: [p2-dev] Issue running p2 director
>  > >    
>  > >    
>  > >    Thank you for the response - I'll let the EMF team know there's
>  > > a problem at their end.
>  > >    
>  > >    Using the jar:file type URI to point at the .zip seems to work
>  > > in the meantime, so I'm a very happy bunny.
>  > >    
>  > >    Cheers,
>  > >    
>  > >    Tom
>  > >
>  > >
>  > > ________________________________
>  > >
>  > >       From: p2-dev-bounces@xxxxxxxxxxx
>  > > [mailto:p2-dev-bounces@xxxxxxxxxxx] On Behalf Of Pascal Rapicault
>  > >       Sent: 10 September 2009 18:00
>  > >       To: P2 developer discussions
>  > >       Cc: p2-dev@xxxxxxxxxxx; p2-dev-bounces@xxxxxxxxxxx
>  > >       Subject: Re: [p2-dev] Issue running p2 director
>  > >      
>  > >      
>  > >
>  > >       The artifact repository contained in this archive is
>  > > inconsistent. It has been made inconsistent by the EMF build process
>  > > which deletes the canonical jars to only leave the pack'ed one, but
> does
>  > > not update the artifact repository index (artifacts.jar) to reflect
> this
>  > > change. Please report this problem to the EMF team.
>  > >      
>  > >       The reason why this is working in the case of a zip'ed
>  > > repo is because p2 treats it as a non-local repo and installs from the
>  > > pack file which it finds. However when the repository is exploded
> on the
>  > > file system, p2 first tries to download the JAR because the artifact
>  > > repository index (artifacts.jar) indicates that it contains it even
>  > > though it does not have it. If this reference had not been available in
>  > > the artifact repo index, then p2 would have resorted to use the pack'ed
>  > > files.
>  > >       That said, the code in MirrorRequest#perform in the
>  > > p2.artifact.repository bundle could be made for insistent and try every
>  > > descriptor rather than just the first one.
>  > >      
>  > >       Did you try to point the director app at the archive
>  > > using as a repository the JAR URI (jar:file:/c:/archive.zip!/ or
> see the
>  > > URI that gets created for you when you add the archive through the UI)?
>  > >       HTH
>  > >       PaScaL
>  > >      
>  > >      
>  > >      
>  > >
>  > >       [p2-dev] Issue running p2 director
>  > >      
>  > >      
>  > >      
>  > >
>  > >    
>  > >
>  > > [p2-dev] Issue running p2 director  
>  > >
>  > > Dalton, Tom    
>  > > to:  
>  > > p2-dev  
>  > >
>  > > 09/10/2009 06:57 AM
>  > >
>  > >
>  > >
>  > > Sent by:  
>  > > p2-dev-bounces@xxxxxxxxxxx  
>  > > Please respond to P2 developer discussions
>  > >    
>  > >
>  > > ________________________________
>  > >
>  > >
>  > >
>  > >       Hi,
>  > >
>  > >       I'm using the Eclipse 3.5 CDT on a non-networked machine
>  > > and I want to add the EMF framework to it. I have downloaded the EMF
>  > > update site .zip from
>  > >
>  > >      
>  > >
http://www.eclipse.org/modeling/emf/downloads/?project=emf
>  > > <
http://www.eclipse.org/modeling/emf/downloads/?project=emf>
>  > >       Specifically I got
>  > >
>
http://www.eclipse.org/modeling/download.php?file=/modeling/emf/emf/down
>  > > loads/drops/2.5.0/R200906151043/emf-xsd-Update-2.5.0.zip
>  > >
> <
http://www.eclipse.org/modeling/download.php?file=/modeling/emf/emf/dow
>  > > nloads/drops/2.5.0/R200906151043/emf-xsd-Update-2.5.0.zip>
>  > >
>  > >       Now, if I install that update though the Eclipse UI by
>  > > selecting the zip file itself, everything works. However, if I
> unzip the
>  > > file to somewhere temporary and then try to install from that location,
>  > > it gets to about 60% though and then bombs out with a mass of 'file not
>  > > found' errors, because it seems to be looking for the plugins as plain
>  > > .jar files instead of the actual .jar.pack.gz files.
>  > >
>  > >       This difference in behaviours seems to me to be a bug,
>  > > albeit with a workaround (install direct from the zip rather than
>  > > extracting it myself). So that would be fine, except that I need to
>  > > automat the eclipse build (I need to add a lot more than just EMF and
>  > > need to do this for a lot of people).
>  > >
>  > >       So I started looking at the P2 director command line
>  > > stuff described at:
>  > >
>  > >      
>  > >
>
http://help.eclipse.org/galileo/topic/org.eclipse.platform.doc.isv/guide
>  > > /p2_director.html
>  > >
> <
http://help.eclipse.org/galileo/topic/org.eclipse.platform.doc.isv/guid
>  > > e/p2_director.html>
>  > >       And
>  > >      
>  > >
>
http://wiki.eclipse.org/Equinox_p2_director_application#Installing_.2F_u
>  > > ninstalling_IUs_into_a_target_product
>  > >
> <
http://wiki.eclipse.org/Equinox_p2_director_application#Installing_.2F_
>  > > uninstalling_IUs_into_a_target_product>
>  > >
>  > >       However, when using these methods, if I set the
>  > > -repository to point at the zip file itself, it moans that its not a
>  > > valid repository. If I point it at my manually unzipped directory, it
>  > > starts off ok, but then bombs out with the same file not found
> errors as
>  > > described above.
>  > >
>  > >       So two questions:
>  > >       1. Are these file not found errors the symptoms of a
>  > > bug?
>  > >       2. Is there a way to duplicate the UI install-from-zip
>  > > behaviour via the command line P2 director (which would provide me with
>  > > a solution to my problem).
>  > >
>  > >       Thanks a lot for any help provided!
>  > >
>  > >       Tom Dalton
>  > > _______________________________________________
>  > >       p2-dev mailing list
>  > >       p2-dev@xxxxxxxxxxx
>  > >      
https://dev.eclipse.org/mailman/listinfo/p2-dev
>  > >      
>  > >
>  > >      
>  > >
>  > >
>  >
>  > --
>  > Sent from my mobile device
>  >
>  > Nick Boldt :: JBoss by Red Hat
>  > Productization Lead :: JBoss Tools & Dev Studio
>  > Release Engineer :: Dash Athena
>  >
http://nick.divbyzero.com
>  > _______________________________________________
>  > p2-dev mailing list
>  > p2-dev@xxxxxxxxxxx
>  >
https://dev.eclipse.org/mailman/listinfo/p2-dev
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> p2-dev mailing list
> p2-dev@xxxxxxxxxxx
>
https://dev.eclipse.org/mailman/listinfo/p2-dev

--
Nick Boldt ::
http://nick.divbyzero.com
Release Engineer :: Eclipse Modeling & Dash Athena
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev

GIF image

GIF image

GIF image

Attachment: artifacts.xsl
Description: Binary data


Back to the top