src/Composer/Repository/Pear/ChannelRest10Reader.php
private function readPackages($baseUrl)
    {
        $result = array();

        $xmlPath = '/p/packages.xml';
        $xml = $this->requestXml($baseUrl, $xmlPath);
        $xml->registerXPathNamespace('ns', self::ALL_PACKAGES_NS);
        foreach ($xml->xpath('ns:p') as $node) {
            $packageName = (string) $node;
            $packageInfo = $this->readPackage($baseUrl, $packageName);
            $result[] = $packageInfo;
        }

        return $result;
    }
private function readPackages($baseUrl)
    {
        $result = array();

        $xmlPath = '/p/packages.xml';
        $xml = $this->requestXml($baseUrl, $xmlPath);
        $xml->registerXPathNamespace('ns', self::ALL_PACKAGES_NS);
        foreach ($xml->xpath('ns:p') as $node) {
            $packageName = (string) $node;
            $packageInfo = $this->readPackage($baseUrl, $packageName);
            $result[] = $packageInfo;
        }

        return $result;
    }
Read list of packages from
{baseUrl}/p/packages.xml

@param string $baseUrl
@return PackageInfo[]