[development] how to identify "root" modules?

Earl Miles merlin at logrus.com
Fri Oct 12 16:18:58 UTC 2007


Gábor Hojtsy wrote:
> 
> Frankly I have no cool idea to go about this, but it should be done
> for sure. A new .info file key might be in order to mark base modules
> or required modules. Or we can go in and compute a dependency tree
> with the requirements and identify the root module ourselfs. This
> obviously only works if the dependencies are properly marked, and is
> definitely not how it works with Drupal itself, where modules just
> does not depend on system module.

There are two pieces of information in the .info file you can use:

1) The 'package' keyword which is not reliable at the moment because 
enough module authors misuse it that the update_status project has had 
at least 2 'feature' requests to set its package to 'Administration' 
even though there are clearly defined rules for that; both of these 
requests have pointed to other modules that do this incorrectly.

2) The 'project' keyword which is how update_status knows what modules 
are together. Now, this isn't 100% reliable either because it is placed 
there by the packaging system; and it doesn't tell you what the root 
module of the project is, but it can tell you what modules are, at 
least, all together. update_status does some guessing based upon 
directory location if the 'project' keyword is missing and it's 99.5% 
reliable (had a case where it's not reliable in the "best practice" 
scenario of placing a group of modules under 'contrib' and another group 
under 'custom'.)


More information about the development mailing list