hook_requirement breaks install profiles with API module

Migrated issue

Reported by: nicholasthompson

Hi,

I am writing an API Install Profile for easily deploying an API site. I've hit a complication. During your implementation of hook_requirements, you use drupal_get_path to find the path of the api module. However, this relies on the {system} table being present which, during a site install, it isn't... Therefore it returns a blank path which, in turn, causes the requirement to fail.

As the autocomplete feature isn't (imho) critical to the functionality of the module, maybe it should be in the module (rather than install) file and only report a REQUIREMENT_WARNING rather than a REQUIREMENT_ERROR?