[development] Distributing "bi-modal" Drupal modules

Rob Thorne rob at torenware.com
Wed Feb 17 07:36:36 UTC 2010

David Metzler wrote:
> I think this would be best solved with install scripts provided with 
> the external softward product (e.g. CiviRM) .  That is the third party 
> product comes with both distros of the contrib module.   That 
> packaging /install script might event be able to get away with reading 
> the .info files of a core module to determine the correct version to 
> install, but then would install the right version based on the 
> detected drupal version.  In fact I'd be willing to bet that you'd 
> find the install scripts easier to implement than what you're puposing 
> here :).
Spoken kinda like a Joomla core person, ironically enough.  Eeek.  You 
know not what you ask.  That's a serious burden on another project, 
since those kinds of solutions are hard to engineer, and they tend to 
hard for end users to cope with as well.

Sometimes, it's worth following The Golden Rule when dealing with other 
developer communities.  While the Drupal community has gotten fairly 
adept at dealing with breaking compatibility every year or so, it can be 
make it hard for other projects to deal with us.

The best approach (one that we generally follow with in this project) 
makes most things self configuring.  I don't think it would be all that 
hard to accommodate this -- and perhaps we do: I'll have to experiment 
with Drupal 6 and Drupal 7.  But if we don't, we arguably should.  Not 
all projects can or will distribute their Drupal modules via Drupal.org, 
and not all projects will choose to deploy only via Drupal.  We may not 
need or want to make it all that easy.  But I don't think we need or 
want to make it harder than it needs to be either.

> I agree that even if its possible its not sustainable.
> I frankly don't think version control systems will solve this problem 
> for you since you're talking about a distribution problem and not a 
> code management problem.
> Dave
> On Feb 16, 2010, at 10:31 AM, Rob Thorne wrote:
>> There are a couple of large software projects that  are designed to 
>> install together with Drupal (CiviCRM is one of them).  Typically, a 
>> project like this distributes a Drupal module that handles the 
>> embedding of the project inside of a Drupal install.
>> Is it even possible for a project like this to distribute either:
>>   1. Both a Drupal 6 *and* a Drupal 7 module (i.e., will Drupal look at
>>      the .info files and ignore the "wrong" version), or
>>   2. A single Drupal module that keeps its Drupal-version specific
>>      features (changed, new or dropped API calls, hooks with
>>      incompatible call signatures, etc.) in .inc files and loads them
>>      dynamically?
>> This is not "the done thing", and the module upgrade instructions in 
>> the handbook show it would be pretty daunting to do for anything but 
>> a trivial module.    But is it even possible?
>> Rob Thorne
>> Torenware Networks

More information about the development mailing list