Ian Hickson wrote:
>  Both the MPL and the LGPL
> allow code covered by them to be linked with other code under other
> licenses.

Yes, but the MPL allows this in more contexts than the LGPL. The 
exception granted in the LGPL is for an application that calls the 
LGPLed code in the form of a library; this is what the LGPL refers to as 
a "work that uses the Library". But the LGPL does _not_ grant any 
exceptions for code which is included in the library itself. In 
particular, see section 2 of the LGPL:

   2. You may modify your copy or copies of the Library or any
   portion of it, thus forming a work based on the Library, and
   copy and distribute such modifications or work under the terms
   of Section 1 above, provided that you also meet all of these
   conditions:

   ...

   c)  You must cause the whole of the work to be licensed at no
   charge to all third parties under the terms of this License.

So if you add MPLed code into an LGPL library then the resulting work 
must be distributed under LGPL terms. In fact, this is true (according 
to the FSF) even if the MPLed code is itself in the form of a separate 
library called by the LGPLed library and distributed with it. The 
relevant language is in section 0 of the LGPL:

   A "work based on the Library" means either the Library or any
   derivative work under copyright law: that is to say, a work
   containing the Library or a portion of it ...

This is the same sort of language used in the GPL:

   ... a "work based on the Program" means either the Program or
   any derivative work under copyright law: that is to say, a
   work containing the Program or a portion of it ...

And the GPL section 2 parallels the LGPL section 2:

   2. You may modify your copy or copies of the Program or any
   portion of it, thus forming a work based on the Program, and
   copy and distribute such modifications or work under the
   terms of Section 1 above, provided that you also meet all of
   these conditions:

   ...

   b)  You must cause any work that you distribute or publish,
   that in whole or in part contains or is derived from the
   Program or any part thereof, to be licensed as a whole at
   no charge to all third parties under the terms of this
   License.

So when it comes to code included as part of the library or called by 
the library (_not_ code that calls the library) the effect of the LGPL 
is the same as that of the GPL.

>>The question is whether the LGPL would allow MPLed code to be combined
>>with LGPLed code (i.e., putting Mozilla code into an LGPLed library)
>>and the resulting work distributed under LGPL terms (as required by
>>the LGPL).
>>
> The LGPL wouldn't care, as far as I can tell. However, since the MPL
> doesn't let you relicense the code under another license, the MPL 
> wouldn't let you merge the MPL code with the LGPL code (in the same
> file, with the license of the MPL code changed to the LGPL).

I'm referring to combining code in the same source file. I referring to 
creating derived works by combining different source files under 
different licenses, and in particular I am referring to the case where 
code in MPL source files might be called by code in LGPL source files.

>> Both the MPL and the LGPL contain language 
>>permitting this in certain specified circumstances, as long as certain 
>>requirements are met.
>>
> 
> The "specified" and "certain" being very specific and very broad
> respectively.

I'm not sure what you mean by this. The MPL clearly allows uses which 
the LGPL does not. For example, you could take a library released under 
the MPL and add some proprietary extensions to it. This would not be 
possible with a library released under the LGPL, per section 2(b) quoted 
above.

> Embedding Mozilla or Gecko inside another app or library, or calling
> it from a library, doesn't involve merging the codebases, and
> therefore both licenses don't care.

I don't believe this is the case. Read section 2(b) of the LGPL again. 
The LGPL does indeed "care" about code which is called by the library.

Frank
-- 
Frank Hecker
[EMAIL PROTECTED]


Reply via email to