Skip to content

Commit

Permalink
Bug #25413 Add local installed packages to list-all
Browse files Browse the repository at this point in the history
(thanks to Christian DickMann)
  • Loading branch information
tvvcox committed Oct 4, 2003
1 parent 1096111 commit 349c8a5
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions pear/PEAR/Command/Remote.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ function doListAll($command, $options, $params)
'border' => true,
'headline' => array('Package', 'Latest', 'Local'),
);

$local_pkgs = $reg->listPackages();

foreach ($available as $name => $info) {
$installed = $reg->packageInfo($name);
$desc = $info['summary'];
Expand All @@ -205,8 +206,12 @@ function doListAll($command, $options, $params)
&& (!isset($installed['version']) || $installed['version'] == $info['stable']))
{
continue;
};
};
}
}
$pos = array_search(strtolower($name), $local_pkgs);
if ($pos !== false) {
unset($local_pkgs[$pos]);
}

$data['data'][$info['category']][] = array(
$name,
Expand All @@ -216,6 +221,18 @@ function doListAll($command, $options, $params)
@$info['deps'],
);
}

foreach ($local_pkgs as $name) {
$info = $reg->packageInfo($name);
$data['data']['Local'][] = array(
$info['package'],
'',
$info['version'],
$info['summary'],
@$info['release_deps']
);
}

$this->ui->outputData($data, $command);
return true;
}
Expand Down

0 comments on commit 349c8a5

Please sign in to comment.