Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 301920 - mozextension.eclass 1.4 2007/12/20: Parsing of install.rdf is too sloppy
Summary: mozextension.eclass 1.4 2007/12/20: Parsing of install.rdf is too sloppy
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2010-01-23 13:50 UTC by Martin Väth
Modified: 2010-12-30 03:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
better-privacy-1.45.ebuild (example for a non-working install without patch) (better-privacy-1.45.ebuild,1.02 KB, text/plain)
2010-01-23 13:53 UTC, Martin Väth
Details
Patch for mozextensions.eclass to fix the problem (mozextensions.eclass.patch,557 bytes, patch)
2010-01-23 13:54 UTC, Martin Väth
Details | Diff
Version of the patch which works with more extensions.. (mozextension.eclass.patch,520 bytes, patch)
2010-12-29 08:57 UTC, Martin Väth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Väth 2010-01-23 13:50:05 UTC
With xpi_install from mozextension.eclass 1.4 it is not possible
to install correctly e.g. the better-privacy extension by an ebuild
(ebuild attached): It will install but not be recognized as an
extension of mozilla-firefox.

The reason is that the sed-command to parse "id" from install.rdf
is too sloppy: In the mentioned example an to early em:id entry is read.
This is easy to fix: The em:id entries should ignored if they come
before the tag <Description about="urn:mozilla:install-manifest">
So I suggest to let sed only parse the content after a match of
"install-manifest" (patch is attached).

Of course, this is not perfect - sed cannot replace a full xml parser -
but it is better than sloppy behavior before: At least, better-privacy
(and probably some other extensions) will then install correctly, and
the change will not break other extensions (I tried several of them,
including noscript from the portage tree).
Comment 1 Martin Väth 2010-01-23 13:53:08 UTC
Created attachment 217237 [details]
better-privacy-1.45.ebuild (example for a non-working install without patch)
Comment 2 Martin Väth 2010-01-23 13:54:18 UTC
Created attachment 217239 [details, diff]
Patch for mozextensions.eclass to fix the problem
Comment 3 Jory A. Pratt gentoo-dev 2010-12-29 04:47:57 UTC
(In reply to comment #2)
> Created an attachment (id=217239) [details]
> Patch for mozextensions.eclass to fix the problem
> 

I will get this landed tomorrow evening, sorry for the delay in getting this resolved.
Comment 4 Martin Väth 2010-12-29 08:57:51 UTC
Created attachment 258320 [details, diff]
Version of the patch which works with more extensions..

The attached patch works with even more mozilla extensions
(of course probably still not with all, since this would need an xml parser).

However, since there are no longer any mozilla extensions in the tree,
perhaps it makes no longer sense to extend an class which is not used...

Just for the records: Meanwhile I have written my own class for extensions
which is much more complex but somewhat more luxury to use and saves disk
space by optionally using links or symlinks instead of duplicating data:

http://git.overlays.gentoo.org/gitweb/?p=user/mv.git;a=blob_plain;f=eclass/mv_mozextension.eclass;hb=HEAD
Comment 5 Jory A. Pratt gentoo-dev 2010-12-30 03:07:16 UTC
Thanks for your work it is much appreciated. We are still using extensions eclass to install enigmail and lightning for tb.