20 public $error_code = NULL;
21 public $error_out = array();
22 public $uncompresser =
'bunzip2';
23 public $uncompressed_file = NULL;
24 private $project_info = array ();
26 public function Uncompress($file)
33 $toss = exec(
"$this->uncompresser $file 2>&1", $output, $rtn);
37 echo
"DBG: UNCOMP-> uncompressor returned:$rtn\n";
38 $this->error_code = $rtn;
39 $this->error_out = $output[0];
43 $this->uncompressed_file = rtrim($file,
'.bz2');
76 if (empty ($search_space))
80 $pkey = array_keys($search_space);
86 print
"DB: FIPI: Pkey is empty!\n";
91 $found = array_search($name, $pkey);
95 $match = $search_space[$pkey[$found]];
140 if (!(file_exists(
"$rdf_file")))
144 $meatdoc = simplexml_load_file(
"$rdf_file");
145 foreach ($meatdoc->project as $project)
147 $this->project_info[
"$project->projectname_short"]
152 "$project->desc_short"
154 foreach ($project->latest_release as $verdata)
156 $this->project_info[
"$project->projectname_short"][] = $verdata->latest_release_version;
159 ksort($this->project_info);
160 return ($this->project_info);
163 function write2file($array_var)
165 $name =
'pkeys' . getmypid();
166 $FD = fopen($name,
'w') or die ("can't open $name, $php_errormsg\n");
167 foreach($array_var as $key=>$value)
169 fwrite($FD,
"$value \n");
FindInProjInfo($name, $search_space)
XtractProjInfo($rdf_file)