The XHProf project causes numerous problems because of its uppercase shortname. This is related to issue #1372322 which has been closed, but only fixes one of the possible failure modes.

Drush 4.5 returns:

# drush rl XHProf
------- RELEASES FOR 'XHPROF' PROJECT -------
 Release         Date         Status                 
 7.x-1.x-dev     2012-Feb-21  Development            
 7.x-1.0-beta2   2011-Nov-23  Supported, Recommended 

Drush 5.0-dev returns:

# drush rl XHProf
No release history was found for the requested project (xhprof).                                                                             [warning]
No valid projects given.                                                                                                                     [ok]

drush make also fails:

# drush make xhprof.make --debug --no-core /tmp/testing
Bootstrap to phase 0. [0.03 sec, 2.21 MB]                            [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.04 sec, 2.34 MB] [bootstrap]
Cache HIT cid: 5.0-dev-commandfiles-0-d855919b3fd468a8cb48278c0b0162e2 [0.08 sec, 2.35 MB]                                                       [debug]
Bootstrap to phase 0. [0.19 sec, 5.18 MB]                                                                                                    [bootstrap]
Bootstrap to phase 0. [0.21 sec, 5.19 MB]                                                                                                    [bootstrap]
Found command: make (commandfile=make) [0.22 sec, 5.19 MB]                                                                                   [bootstrap]
Loading release_info engine. [0.24 sec, 5.2 MB]                                                                                                 [notice]
Downloading release history from http://updates.drupal.org/release-history/XHProf/7.x [0.25 sec, 5.34 MB]                                       [notice]
http---updates.drupal.org-release-history-XHProf-7.x retrieved from cache. [0.25 sec, 5.34 MB]                                                  [notice]
Backend invoke: /usr/bin/php /opt/drush/drush.php --php=/usr/bin/php  make-process /tmp/make_tmp_1330642440_4f4ffe080ff86 --backend=2 2>&1     [command]
[0.31 sec, 5.37 MB]
/usr/bin/php /opt/drush/drush.php --php=/usr/bin/php  make-process /tmp/make_tmp_1330642440_4f4ffe080ff86 --backend=2 2>&1 [0.31 sec, 5.37      [notice]
MB]
Bootstrap to phase 0. [1.54 sec, 5.47 MB]                                                                                                    [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [1.54 sec, 5.47 MB]                                                                         [bootstrap]
Cache HIT cid: 5.0-dev-commandfiles-0-d855919b3fd468a8cb48278c0b0162e2 [1.54 sec, 5.47 MB]                                                       [debug]
Bootstrap to phase 0. [1.54 sec, 5.47 MB]                                                                                                    [bootstrap]
Bootstrap to phase 0. [1.54 sec, 5.47 MB]                                                                                                    [bootstrap]
Found command: make-process (commandfile=make) [1.54 sec, 5.47 MB]                                                                           [bootstrap]
Loading release_info engine. [1.54 sec, 5.47 MB]                                                                                                [notice]
Backend invoke: /usr/bin/php /opt/drush/drush.php --php=/usr/bin/php  --yes --root= --uri= pm-download XHProf-7.x-1.0-beta2                    [command]
--destination=/tmp/make_tmp_1330642440_4f4ffe080ff86/__build__/sites/all/modules --package-handler=wget --variant=profile-only --cache
--select=auto --backend=2 2>&1 [1.54 sec, 5.47 MB]
/usr/bin/php /opt/drush/drush.php --php=/usr/bin/php  --yes --root= --uri= pm-download XHProf-7.x-1.0-beta2                                     [notice]
--destination=/tmp/make_tmp_1330642440_4f4ffe080ff86/__build__/sites/all/modules --package-handler=wget --variant=profile-only --cache
--select=auto --backend=2 2>&1 [1.54 sec, 5.47 MB]
Bootstrap to phase 0. [1.54 sec, 5.47 MB]                                                                                                    [bootstrap]
Found command: pm-download (commandfile=pm) [1.54 sec, 5.47 MB]                                                                              [bootstrap]
Loading version_control engine. [1.54 sec, 5.47 MB]                                                                                             [notice]
Loading package_handler engine. [1.54 sec, 5.47 MB]                                                                                             [notice]
Loading release_info engine. [1.54 sec, 5.48 MB]                                                                                                [notice]
Including /opt/drush/commands/pm/download.pm.inc [1.54 sec, 5.48 MB]                                                                         [bootstrap]
Downloading release history from http://updates.drupal.org/release-history/xhprof/7.x [1.54 sec, 5.48 MB]                                       [notice]
http---updates.drupal.org-release-history-xhprof-7.x retrieved from cache. [1.54 sec, 5.48 MB]                                                  [notice]
No release history was found for the requested project (xhprof). [1.54 sec, 5.48 MB]                                                         [warning]
Command dispatch complete [1.54 sec, 5.48 MB]                                                                                                   [notice]
Peak memory usage was 6.08 MB [1.54 sec, 5.48 MB]                                                                                               [memory]
Load alias @self [1.54 sec, 5.48 MB]                                                                                                            [notice]
Bootstrap to phase 0. [1.54 sec, 5.48 MB]                                                                                                    [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [1.54 sec, 5.48 MB]                                                                         [bootstrap]
Cache HIT cid: 5.0-dev-commandfiles-0-d855919b3fd468a8cb48278c0b0162e2 [1.54 sec, 5.48 MB]                                                       [debug]
Bootstrap to phase 0. [1.54 sec, 5.48 MB]                                                                                                    [bootstrap]
Found command: pm-download (commandfile=pm) [1.55 sec, 5.49 MB]                                                                              [bootstrap]
Loading version_control engine. [1.55 sec, 5.49 MB]                                                                                             [notice]
Loading package_handler engine. [1.55 sec, 5.49 MB]                                                                                             [notice]
Loading release_info engine. [1.55 sec, 5.49 MB]                                                                                                [notice]
Including /opt/drush/commands/pm/download.pm.inc [1.55 sec, 5.49 MB]                                                                         [bootstrap]
Downloading release history from http://updates.drupal.org/release-history/xhprof/7.x [1.55 sec, 5.49 MB]                                       [notice]
http---updates.drupal.org-release-history-xhprof-7.x retrieved from cache. [1.55 sec, 5.49 MB]                                                  [notice]
No release history was found for the requested project (xhprof). [1.55 sec, 5.49 MB]                                                         [warning]
Command dispatch complete [1.55 sec, 5.49 MB]                                                                                                   [notice]
Peak memory usage was 6.08 MB [1.55 sec, 5.49 MB]                                                                                               [memory]
XHProf-7.x-1.0-beta2 downloaded. [1.55 sec, 5.49 MB]                                                                                         [ok]
Command dispatch complete [1.55 sec, 5.49 MB]                                                                                                   [notice]
Peak memory usage was 6.27 MB [1.55 sec, 5.49 MB]                                                                                               [memory]
Executing: mv /tmp/make_tmp_1330642440_4f4ffe080ff86/__build__ /tmp/make_tmp_1330642440_4f4ffe080ff86/testing
Executing: cp -Rf /tmp/make_tmp_1330642440_4f4ffe080ff86/testing /tmp
Command dispatch complete [1.61 sec, 5.4 MB]                                                                                                    [notice]
Peak memory usage was 6.29 MB [1.61 sec, 5.4 MB]                                                                                                [memory]

Notice that it tries to download the release history for the lowercase project 'xhprof' which doesn't exist and although it claims to have downloaded XHProf-7.x-1.0-beta2, nothing is found in the sites/all/modules directory.

Comments

jonhattan’s picture

Status: Active » Fixed

Fixed.

btw, I think that when we decided to force lowercase in project names, this was the only form that d.o accepted.

dude4linux’s picture

Status: Fixed » Needs work

@johhattan - The fix worked for the first case, drush rl, but it still fails for drush make. There are still instances of 'strtolower' in the code, but I've not yet figured out which one(s) are causing drush make to fail. Maybe you can take another look.

# grep -r 'strtolower' *
commands/pm/download.pm.inc:        $request['project_dir'] = strtolower(strtr($release['name'], ' ', '-'));
commands/pm/pm.drush.inc:  $package = strtolower(drush_get_option('package'));
commands/pm/pm.drush.inc:  $type_filter = strtolower(drush_get_option('type'));
commands/pm/pm.drush.inc:  $status_filter = strtolower(drush_get_option('status'));
commands/pm/pm.drush.inc:      if (!in_array(strtolower($extension->info['package']), $package_filter)) {
commands/pm/pm.drush.inc:      $project = strtolower(trim(substr($request, 0, strlen($request) - strlen($matches[0])), ' -'));
commands/core/core.drush.inc:      $credentials .= sprintf("%s=%s\n", strtolower(str_replace(' ', '_', $key)), $value);
commands/core/site_install.drush.inc:    $lower = strtolower($sites_subdir);
commands/make/generate.make.inc:  $core_project = strtolower($system_requirements['drupal']['title']);
includes/table.inc:        $this->_charset = strtolower($charset);
includes/table.inc:            ($this->_charset == strtolower('utf-8') ||
includes/table.inc:             $this->_charset == strtolower('utf8'))) {
includes/drush.inc:  $last = strtolower($value[strlen($value)-1]);
lib/Console_Table-1.1.3/Table.php:        $this->_charset = strtolower($charset);
lib/Console_Table-1.1.3/Table.php:            ($this->_charset == strtolower('utf-8') ||
lib/Console_Table-1.1.3/Table.php:             $this->_charset == strtolower('utf8'))) {
jonhattan’s picture

Component: Core Commands » PM (dl, en, up ...)
Status: Needs work » Fixed
$ grep -rn 'strtolower' *
commands/pm/download.pm.inc:118:        $request['project_dir'] = strtolower(strtr($release['name'], ' ', '-'));
commands/pm/pm.drush.inc:604:  $package = strtolower(drush_get_option('package'));
commands/pm/pm.drush.inc:616:  $type_filter = strtolower(drush_get_option('type'));
commands/pm/pm.drush.inc:635:  $status_filter = strtolower(drush_get_option('status'));
commands/pm/pm.drush.inc:692:      if (!in_array(strtolower($extension->info['package']), $package_filter)) {
commands/pm/pm.drush.inc:1268:      $project = strtolower(trim(substr($request, 0, strlen($request) - strlen($matches[0])), ' -'));
commands/core/site_install.drush.inc:8:    $lower = strtolower($sites_subdir);
commands/core/core.drush.inc:451:      $credentials .= sprintf("%s=%s\n", strtolower(str_replace(' ', '_', $key)), $value);
commands/make/generate.make.inc:57:  $core_project = strtolower($system_requirements['drupal']['title']);
includes/drush.inc:1713:  $last = strtolower($value[strlen($value)-1]);
includes/table.inc:245:        $this->_charset = strtolower($charset);
includes/table.inc:794:            ($this->_charset == strtolower('utf-8') ||
includes/table.inc:795:             $this->_charset == strtolower('utf8'))) {
lib/Console_Table-1.1.3/Table.php:245:        $this->_charset = strtolower($charset);
lib/Console_Table-1.1.3/Table.php:794:            ($this->_charset == strtolower('utf-8') ||
lib/Console_Table-1.1.3/Table.php:795:             $this->_charset == strtolower('utf8'))) {

And the winner is.. commands/pm/pm.drush.inc:1268

fixed. Thanks @dude4linux

dude4linux’s picture

Component: PM (dl, en, up ...) » Core Commands
Issue tags: +Do not lowercase project names for any pm command

Nevermind. I found the flaw in my test setup that was preventing XHProf from being installed. Your fix is working as desired. Sorry about the false alarm.

dude4linux’s picture

@jonhatten - Now I am confused. While you were working on #3, I was experimenting trying to figure out which of the strtolower's needed to be removed. I tried different combinations on a git branch, but concluded they were causing more problems than they fixed. I switched back to the master branch without performing a commit thinking that would leave my changes in the test branch while switching to the latest code. I then tried some additional changes in the .make files and found the tests were now working. I assumed that was because of the change in the .make file, not realizing my changes to pm.drush.inc were being retained including the change in line 1268.

I didn't see your post #3 until after I had posted #4. At any rate, I'm learning a lot more about git than I ever intended. :) Thanks for working on this.

dude4linux’s picture

I got rid of all my changes with 'git reset --hard' then downloaded the latest fixes with 'git pull'. My drush make tests continue to work, so I agree it is officially fixed. Thanks again.

Automatically closed -- issue fixed for 2 weeks with no activity.

apaderno’s picture

Version: » All-versions-4.x-dev
Issue tags: -Do not lowercase project names for any pm command

I am removing issue tags used from one to four issues. I apologize for bumping the issue.