Last Comment Bug 298498 - Allow extension XPIs to ship multiple independent extensions
: Allow extension XPIs to ship multiple independent extensions
Status: RESOLVED FIXED
:
Product: Toolkit
Classification: Components
Component: Startup and Profile System (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla1.8beta4
Assigned To: Robert Strong [:rstrong] (use needinfo to contact me)
:
Mentors:
http://wiki.mozilla.org/Extension_Man...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-22 11:36 PDT by Benjamin Smedberg AWAY UNTIL 2-AUG-2016 [:bsmedberg]
Modified: 2008-07-31 03:02 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
work in progress (6.33 KB, patch)
2005-07-09 01:09 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
no flags Details | Diff | Splinter Review
better still (16.64 KB, patch)
2005-07-10 00:52 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
no flags Details | Diff | Splinter Review
patch (15.07 KB, patch)
2005-07-10 18:10 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
no flags Details | Diff | Splinter Review
slightly cleaner (14.98 KB, patch)
2005-07-10 18:27 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
benjamin: first‑review+
Details | Diff | Splinter Review
patch (14.47 KB, patch)
2005-07-11 22:02 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
benjamin: first‑review+
asa: approval1.8b4+
Details | Diff | Splinter Review

Description Benjamin Smedberg AWAY UNTIL 2-AUG-2016 [:bsmedberg] 2005-06-22 11:36:34 PDT
Several extensions depend on common util extensions like JSlib. In addition to
extension dependencies (bug 298497), it would be good to allow these extensions
to come bundled with their dependencies (a multi-extension XPI). I'm not quite
sure how this should be accomplished (subdirectories?, a new manifest format?).
Comment 1 Robert Strong [:rstrong] (use needinfo to contact me) 2005-06-28 23:39:05 PDT
Simplest would be a new install manifest format. Existing extension xpi's could
be packaged into a single xpi with the new manifest and then installed all at
the same time. Signing could be done on the top level xpi and we wouldn't
concern ourselves with signing on the individual xpi's contained. It isn't fancy
but it would get the job done and keeps the packaging process as simple as can be.
Comment 2 Benjamin Smedberg AWAY UNTIL 2-AUG-2016 [:bsmedberg] 2005-06-29 05:53:43 PDT
Robert, if you would like to write up a design proposal (on wiki.m.o perhaps?)
that I can review, that would be great. I was just thinking of something like

/extensions.list  (contains a plaintext list of GUIDS)
/{GUID1}/install.rdf
/{GUID1}/all-those-other-files
/{GUID2}/install.rdf
/{GUID2}/all-those-other-files
Comment 3 Robert Strong [:rstrong] (use needinfo to contact me) 2005-06-29 19:39:10 PDT
I will write something up... it would be simpler and less error prone to just
package up the xpi's insiide of another xpi instead of extracting them into
their GUID dir's.
Comment 4 Robert Strong [:rstrong] (use needinfo to contact me) 2005-07-07 17:17:02 PDT
Here it is...
http://wiki.mozilla.org/Extension_Manager:Multiple_Item_Packages
Comment 5 Robert Strong [:rstrong] (use needinfo to contact me) 2005-07-09 01:09:43 PDT
Created attachment 188751 [details] [diff] [review]
work in progress

This works... it just needs additional error handling and cleanup.

Anyone have suggestions for the obvious bad names like MULTI_XPI, etc.?

The format of the install manifest is available on the wiki
http://wiki.mozilla.org/Extension_Manager:Multiple_Item_Packages
Comment 6 Benjamin Smedberg AWAY UNTIL 2-AUG-2016 [:bsmedberg] 2005-07-09 06:14:55 PDT
I kinda like multi_xpi, but I suppose you could use multi_item.
Comment 7 Robert Strong [:rstrong] (use needinfo to contact me) 2005-07-10 00:52:48 PDT
Created attachment 188824 [details] [diff] [review]
better still

No longer allows jar files to be a multi_xpi and adds some user notification
when errors occur. em:name and em:version are needed in the install manifest to
leverage existing user notification especially when installing by dropping the
xpi into a extensions directory since that uses em:name in the xpinstall
dialog. This is close to being done but I am unsure if a multi_xpi should
support compatibility updates. If it does then em:id will also be required
which wouldn't be such a bad thing as I see it.
Comment 8 Robert Strong [:rstrong] (use needinfo to contact me) 2005-07-10 18:10:54 PDT
Created attachment 188888 [details] [diff] [review]
patch

I believe this is the ticket... the wiki contains notes as to why I decided to
keep the format of the install manifest the same as for extensions.
Comment 9 Robert Strong [:rstrong] (use needinfo to contact me) 2005-07-10 18:27:32 PDT
Created attachment 188893 [details] [diff] [review]
slightly cleaner

Moved one multi_xpi specific user notification that wasn't in installMultiXPI
into it.
Comment 10 Benjamin Smedberg AWAY UNTIL 2-AUG-2016 [:bsmedberg] 2005-07-11 18:43:40 PDT
Comment on attachment 188893 [details] [diff] [review]
slightly cleaner

You don't need to rev the iid of nsIExtensionManager if you're only adding a
constant, it doesn't affect the interface vtable.

In extensions.properties, change "Multiple Item XPI" to "Multiple Extension
Package"
Comment 11 Robert Strong [:rstrong] (use needinfo to contact me) 2005-07-11 22:02:27 PDT
Created attachment 189018 [details] [diff] [review]
patch

Addresses comments... thanks for the review! Are you ok with this landing after
1.1a2 is released?
Comment 12 Benjamin Smedberg AWAY UNTIL 2-AUG-2016 [:bsmedberg] 2005-07-12 04:07:14 PDT
Comment on attachment 189018 [details] [diff] [review]
patch

Yes, this will get 1.8b4+ whenever we get b3 out the door.
Comment 13 Mano (::mano, needinfo? for any questions; not reading general bugmail) 2005-07-15 03:09:00 PDT
Checking in mozilla/toolkit/mozapps/extensions/public/nsIExtensionManager.idl;
/cvsroot/mozilla/toolkit/mozapps/extensions/public/nsIExtensionManager.idl,v 
<--  nsIExtensionManager.idl
new revision: 1.37; previous revision: 1.36
done
Checking in mozilla/toolkit/mozapps/extensions/src/nsExtensionManager.js.in;
/cvsroot/mozilla/toolkit/mozapps/extensions/src/nsExtensionManager.js.in,v  <--
 nsExtensionManager.js.in
new revision: 1.125; previous revision: 1.124
done
Checking in
mozilla/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties;
/cvsroot/mozilla/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties,v
 <--  extensions.properties
new revision: 1.14; previous revision: 1.13
done
Comment 14 Jens Bannmann 2005-07-15 03:33:27 PDT
Hm, what happens if FooExt 0.5 is part of a multi-XPI, but the user already has
FooExt 1.0? Unless I overlooked it in the patch, there is no special handling
for this, so FooExt gets downgraded - which probably isn't what we want here...
Comment 15 Robert Strong [:rstrong] (use needinfo to contact me) 2005-07-15 03:44:05 PDT
This bug provided the base functionality and new bugs should be opened for
additional functionality or if there is anything broken in the base
functionality as described in the wiki.
Comment 16 Benjamin Smedberg AWAY UNTIL 2-AUG-2016 [:bsmedberg] 2005-07-15 04:15:00 PDT
It would be good to get semi-official documentation of this feature up at or
linked to http://developer-test.mozilla.org/en/docs/Extension_Packaging
Comment 17 Robert Strong [:rstrong] (use needinfo to contact me) 2005-07-17 19:43:45 PDT
(In reply to comment #16)
> It would be good to get semi-official documentation of this feature up at or
> linked to http://developer-test.mozilla.org/en/docs/Extension_Packaging
I added the following but my wiki skills are lacking for addiing it to the
Official links
http://developer-test.mozilla.org/en/docs/Multiple_Item_Packaging

Note You need to log in before you can comment on or make changes to this bug.