public function getPackages()
    {
        if(empty($this->packages)) {
            
            $xml = $this->getXmlContent();
            foreach($xml->packages->package as $package)
            {
                $data = (array)$package;
                extract($data['@attributes']);
                // checksums may not exist on some remote packages
                if(!isset($checksum)) {
                    $checksum = null;
                }                
                $this->packages[] = new Package($id, $checksum, $name, $subdir, $unzip, $url);
            }            
        }
        return $this->packages;
                
    }