Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 267282 - [Publisher] Features should always be "unzipped"
Summary: [Publisher] Features should always be "unzipped"
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Ian Bull CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 276972 (view as bug list)
Depends on:
Blocks: 269995
  Show dependency tree
 
Reported: 2009-03-05 19:24 EST by Ian Bull CLA
Modified: 2014-02-04 06:41 EST (History)
5 users (show)

See Also:


Attachments
Always unzip features when they are installed (2.25 KB, patch)
2009-03-06 14:09 EST, Ian Bull CLA
no flags Details | Diff
mylyn/context/zip (4.03 KB, application/octet-stream)
2009-03-06 14:11 EST, Ian Bull CLA
no flags Details
Updated path (with test case) (7.57 KB, patch)
2009-04-01 18:56 EDT, Ian Bull CLA
aniefer: iplog+
Details | Diff
mylyn/context/zip (46.01 KB, application/octet-stream)
2009-04-01 18:56 EDT, Ian Bull CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Bull CLA 2009-03-05 19:24:29 EST
For features to be useful on disk, they need to be unzipped.  However, the publisher currently has the following logic:

if the feature path doesn't exist, or the feature is a dir, (when publishing) then unzip. Otherwise, don't.

However, if we publisher from an update site, the features are always zipped, so they don't get unzipped when installed. Is there a case for not unzipping a feature?
Comment 1 Pascal Rapicault CLA 2009-03-05 23:28:27 EST
Features are only useful to UM unzipped. Are you saying that when we are installing from an old style update site the feature never gets unzipped? Could you please confirm what is going on there?
Also could you please look into creating a patch?
Comment 2 Ian Bull CLA 2009-03-06 00:36:16 EST
I don't know if it is happening with a remote update site, but I have tested it with a local update site action, and features are not being unzipped.

I will run with this bug Pascal.
Comment 3 Ian Bull CLA 2009-03-06 13:47:55 EST
Pascal,

I have looked at this, and it is only a problem in "LocalUpdateSiteAction".  Also, LocalUpdateSiteAction is never used in p2.  (Even when you point to a local update site, it uses the RemoteUpdateSiteAction with a URI).

So, this is not actually a problem in the eclipse platform builds, but only a problem if somebody is building on p2.  However, the fix affects code that is part of the sdk build (the fix is in features action).  

The fix is simply to always add the unzip touchpoint to a feature jar.

Do we want to do this for 3.5? Or it is safer to have people use the workaround (just use a remote update site with a URI, even if you are using local update sites).

Comment 4 Ian Bull CLA 2009-03-06 14:09:23 EST
Created attachment 127850 [details]
Always unzip features when they are installed

This patch always unzips features when they are intalled.
Comment 5 Ian Bull CLA 2009-03-06 14:11:36 EST
Created attachment 127851 [details]
mylyn/context/zip
Comment 6 John Arthorne CLA 2009-03-11 11:35:38 EDT
This needs to be revised in light of discussion from Monday's p2 call.
Comment 7 Ian Bull CLA 2009-03-11 11:37:46 EDT
Yep, and I was wrong. There is a use of it in the SDK, the FeaturesAndBundlesPublisherApplication may suffer from this. I will test this out and report back.
Comment 8 Ian Bull CLA 2009-04-01 18:56:00 EDT
Created attachment 130630 [details]
Updated path (with test case)

It turns out this is actually a problem (in the UpdateSitePublisherApplicaiton).  This patch addresses the problem by always adding the touchpoint data to unzip the features (features need to be unzipped). This patch also includes a test case.
Comment 9 Ian Bull CLA 2009-04-01 18:56:04 EDT
Created attachment 130631 [details]
mylyn/context/zip
Comment 10 Ian Bull CLA 2009-04-01 18:56:44 EDT
Pascal, do you think you (or John) can review this?
Comment 11 Thomas Hallgren CLA 2009-04-02 09:52:57 EDT
I can verify that the patch works.
Comment 12 Andrew Niefer CLA 2009-04-06 17:43:48 EDT
done
Comment 13 Pascal Rapicault CLA 2009-05-20 12:02:01 EDT
*** Bug 276972 has been marked as a duplicate of this bug. ***
Comment 14 Aaron Digulla CLA 2014-02-04 06:41:07 EST
I see these messages in my console when running JUnit Plug-in Tests:

!ENTRY org.eclipse.update.configurator 4 0 2014-02-04 12:36:57.033
!MESSAGE Unable to find feature.xml in directory: /.../p2-repo/features/org.eclipse.mylyn.docs.intent.exporter.feature_0.8.1.201308291003.jar

In my case, the target platform is initialized from a local folder which contains a p2 update site.

In there, all features and plug-ins are zipped.

Is this the same bug or a new one?