33 public $error_code = NULL;
34 public $error_out = array();
35 public $uncompresser =
'bunzip2';
36 public $uncompressed_file = NULL;
37 private $project_info = array ();
39 public function Uncompress($file)
46 $toss = exec(
"$this->uncompresser $file 2>&1", $output, $rtn);
50 echo
"DBG: UNCOMP-> uncompressor returned:$rtn\n";
51 $this->error_code = $rtn;
52 $this->error_out = $output[0];
56 $this->uncompressed_file = rtrim($file,
'.bz2');
89 if (empty ($search_space))
93 $pkey = array_keys($search_space);
99 print
"DB: FIPI: Pkey is empty!\n";
104 $found = array_search($name, $pkey);
105 if (!is_null($found))
108 $match = $search_space[$pkey[$found]];
153 if (!(file_exists(
"$rdf_file")))
157 $meatdoc = simplexml_load_file(
"$rdf_file");
158 foreach ($meatdoc->project as $project)
160 $this->project_info[
"$project->projectname_short"]
165 "$project->desc_short" 167 foreach ($project->latest_release as $verdata)
169 array_push(& $this->project_info[
"$project->projectname_short"],
170 $verdata->latest_release_version
174 ksort($this->project_info);
175 return ($this->project_info);
178 function write2file($array_var)
180 $name =
'pkeys' . getmypid();
181 $FD = fopen($name,
'w') or die (
"can't open $name, $php_errormsg\n");
182 foreach($array_var as $key=>$value)
184 fwrite($FD,
"$value \n");
XtractProjInfo($rdf_file)
FindInProjInfo($name, $search_space)