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

Bug 403805

Summary: [CBI] test framework zipped repo (and others) contains pack.gz files
Product: [Eclipse Project] Platform Reporter: David Williams <david_williams>
Component: RelengAssignee: David Williams <david_williams>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jan.sievers
Version: 4.3   
Target Milestone: 4.3 M7   
Hardware: PC   
OS: Linux   
Whiteboard:

Description David Williams CLA 2013-03-19 11:48:40 EDT
+++ This bug was initially created as a clone of Bug #402708 +++

Traditionally we have not included pack.gz files in repos that are meant to be downloaded, and installed on hard drive (only for those that are meant to be fetched over a network). 

I'm opening this bug based on the assumption that Tycho produces these "zipped repos" for us automatically ... I'll confess I've not looked closely at the part of the code that creates them. But, assuming that's true, then I think this is either a bug in Tycho, that it includes the pack.gz files in zipped repos, or, if there is a reason for it, for some use-cases, then it should be an option to not include them. 

The reason is, if someone downloads these zipped archives to their hard drive, to use as a "local archived repo", then p2 never uses the pack.gz files, it just reads the jars directly, so the packed version of the files are "wasted space".
Comment 1 Jan Sievers CLA 2013-03-19 12:02:14 EDT
CBI configured includePacked=true:

http://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/tree/eclipse-platform-parent/pom.xml#n379

see bug 377357

and yes, docs are missing - bug 384359
Comment 2 David Williams CLA 2013-03-19 13:14:51 EDT
Thanks Jan. That helps. I think there is only one case we want the pack.gz files, that's for our "one big repo" we do end up deploying to web. 
/eclipse.platform.releng.aggregator/eclipse.platform.repository

Unfortunately, it looks like we (currently) make that my mirroring the smaller repos into one big one (so therefore expect them to "have everything"). 

I'll have to give it some thought on how to "get both cases" ... have my cake and eat it too :) 

At worse, we can post-process the smaller ones to remove IUs, but was hoping to avoid "special case code" outside the POMs. 

But, very helpful.
Comment 3 David Williams CLA 2013-03-21 21:48:51 EDT
I'm made a "test fix" in following commit. 

http://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/commit/?id=ad630a5dd2443ffd42ed136c64f4bdb150cb2b3f

It sets the "main" (parent) value to false, but then added a whole "configuration" section to creating the eclipse-repository element. 

  <packaging>eclipse-repository</packaging>
  <build>
    <plugins>
      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>target-platform-configuration</artifactId>
        <version>${tycho.version}</version>
        <configuration>
          <includePackedArtifacts>true</includePackedArtifacts>
        </configuration>
      </plugin>

I'll do a test build with these two changes to make sure it works at all, but will want to add/change the one in eclipse-repository so that the unsigned case (such as Nightly builds) are not packed either. Because, without the signing and conditioning from the 'sign profile' in eclipse-parent, it makes no sense to pack the final result. But, since half guessing at a solution here, thought this much deserved a test run (on build machine only ... it will be signed, but not published to downloads).
Comment 4 David Williams CLA 2013-03-22 10:18:49 EDT
(In reply to comment #3)
> I'm made a "test fix" in following commit. 
> 
> http://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/
> commit/?id=ad630a5dd2443ffd42ed136c64f4bdb150cb2b3f
> 
> It sets the "main" (parent) value to false, but then added a whole
> "configuration" section to creating the eclipse-repository element. 
> 
>   <packaging>eclipse-repository</packaging>
>   <build>
>     <plugins>
>       <plugin>
>         <groupId>org.eclipse.tycho</groupId>
>         <artifactId>target-platform-configuration</artifactId>
>         <version>${tycho.version}</version>
>         <configuration>
>           <includePackedArtifacts>true</includePackedArtifacts>
>         </configuration>
>       </plugin>
> 
> I'll do a test build with these two changes to make sure it works at all,
> but will want to add/change the one in eclipse-repository so that the
> unsigned case (such as Nightly builds) are not packed either....

My test build appeared to work exactly as desired. Not putting pack.gz files in the "zipped repos", but included them in the "final repo". 

So, what I'd like to do (or, think I need to do) is having something like 

<includePackedArtifacts>${packFinalRepo}</includePackedArtifacts>

and the only question is the best way to set that variable. Ideally, I could set it in the false by default, but let the eclipse-sign profile set it to true, if the eclipse-sign profile is "activated" (by command line parameter). 

But, not sure if maven variables are mutable in that way?
Comment 5 David Williams CLA 2013-03-23 12:35:49 EDT
*** Bug 402708 has been marked as a duplicate of this bug. ***
Comment 6 David Williams CLA 2013-03-23 12:41:52 EDT
Actually, I don't think there's any harm is "packing" the unsigned, unconditioned version of the jars in nightly build. They all still "verify". They are just unsigned. (And, since unsigned, no need to pre-condition). There's still an advantage to packing them, for those that routinely update to latest nightly build (in their special nightly install). 

So, bottom line, I think I'll count this as "done", and worry about not packing them if some specific problem with doing so is reported. 

My only concern is that this particular "configuration" is undocumented for "eclipse-repository" ... but ... perhaps it is somehow obvious to experienced maven programmers?
Comment 7 David Williams CLA 2013-03-23 12:43:03 EDT
Can be verified in I-build from 3/26 onward.
Comment 8 David Williams CLA 2013-05-30 16:44:14 EDT
mass change to 'verified', as these bugs are either routine or obviously fixed build breaks.