Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324906 - content.xml is too big (20 MB+)
Summary: content.xml is too big (20 MB+)
Status: RESOLVED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4.2+   Edit
Assignee: DJ Houghton CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 315773 328826
Blocks:
  Show dependency tree
 
Reported: 2010-09-09 17:02 EDT by DJ Houghton CLA
Modified: 2010-10-27 09:33 EDT (History)
5 users (show)

See Also:


Attachments
initial patch (10.95 KB, patch)
2010-09-13 14:38 EDT, DJ Houghton CLA
no flags Details | Diff
patch (8.77 KB, patch)
2010-09-14 09:32 EDT, DJ Houghton CLA
no flags Details | Diff
patch (10.59 KB, patch)
2010-09-16 15:04 EDT, DJ Houghton CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description DJ Houghton CLA 2010-09-09 17:02:43 EDT
Bug cloned to track potential release into 3.4.x maintenance branch.

+++ This bug was initially created as a clone of Bug #315773 +++

The path to the file is usually like this:

configuration\org.eclipse.osgi\bundles\74\data\1175256916\content.xml.

If the product is installed from an update site on first launch, this file can grow quite big. It has very similar content to .profile files. I believe it should be gzipped as the latter one.
Comment 1 DJ Houghton CLA 2010-09-13 14:38:33 EDT
Created attachment 178767 [details]
initial patch

Initial patch against 3.4.x. Please check it out and let me know if it works in your environment. Thanks.
Comment 2 Szymon Ptaszkiewicz CLA 2010-09-14 05:42:49 EDT
(In reply to comment #1)
> Created an attachment (id=178767) [details]
> initial patch
> 
> Initial patch against 3.4.x. Please check it out and let me know if it works in
> your environment. Thanks.

I've got error after applying the patch to 3_4_maintenance branch in project org.eclipse.equinox.p2.extensionlocation saying "The constructor RepositoryListener(BundleContext, String, null, boolean) is undefined". DJ, which branch/version have you used?
Comment 3 DJ Houghton CLA 2010-09-14 08:06:49 EDT
Oops, I missed that change. I'll post an updated patch soon. I'm using the R3_4_maintenance branch.
Comment 4 DJ Houghton CLA 2010-09-14 09:32:52 EDT
Created attachment 178829 [details]
patch

Here is another patch. Less fancy and doesn't change the constructor, just adds a new one and modifies calls to it.
Comment 5 Szymon Ptaszkiewicz CLA 2010-09-16 04:30:30 EDT
(In reply to comment #4)
> Created an attachment (id=178829) [details]
> patch
> 
> Here is another patch. Less fancy and doesn't change the constructor, just adds
> a new one and modifies calls to it.

It works, however I found notable difference between how it works in 3.6 (HEAD) and 3.4.2 (R3_4_maintenance). In 3.6 only content.xml is replaced with content.jar whereas in 3.4.2 also artifacts.xml stored in the same folder is wrapped into jar file. DJ, is that deliberate behaviour?
Comment 6 DJ Houghton CLA 2010-09-16 15:04:54 EDT
Created attachment 179060 [details]
patch

No, sorry. Been a busy week. I've attached a new patch which fixes that problem and another bug which I noticed. I tested with a simple drop-ins scenario and it worked ok. Let me know what you think.
Comment 7 Szymon Ptaszkiewicz CLA 2010-09-27 04:04:12 EDT
I can still see JARed also artifacts.xml in the same folder next to content.jar.
Comment 8 DJ Houghton CLA 2010-09-27 09:48:02 EDT
Are you saying that you get a content.jar, artifacts.jar and an artifacts.xml file? 

I just tried it again and I am only getting the 2 JARs, and not any extra XML files.

I am testing by putting some bundles in the dropins folder. What method are you using? Perhaps there is another code path which isn't covered?
Comment 9 Szymon Ptaszkiewicz CLA 2010-10-06 11:54:34 EDT
(In reply to comment #8)
> Are you saying that you get a content.jar, artifacts.jar and an artifacts.xml
> file? 
> 
> I just tried it again and I am only getting the 2 JARs, and not any extra XML
> files.
> 

Exactly, 2 jars, this is what I meant. I get artifacts.jar and content.jar, but in version from HEAD I get artifacts.xml and content.jar.

> I am testing by putting some bundles in the dropins folder. What method are you
> using? Perhaps there is another code path which isn't covered?

I am also copying some plug-ins to dropins folder.
Comment 10 DJ Houghton CLA 2010-10-06 11:58:31 EDT
This requirement is no longer needed by the customer so we won't back-port the fix.
Closing.