Project

General

Profile

« Previous | Next » 

Revision 5c22f8ef

Added by Stephen Beaver almost 10 years ago

Unfinished (but better) versions of hte pkg pages and utilities

View differences:

src/etc/inc/pkg-utils.inc
232 232

  
233 233
	pkg_remove_prefix($pkg_name);
234 234

  
235
	return pkg_call("info -e " . $g['pkg_prefix'] . $pkg_name, true);
235
	return pkg_call("info " . $g['pkg_prefix'] . $pkg_name, true);
236 236
}
237 237

  
238 238
/* Install package, $pkg_name should not contain prefix */
......
305 305

  
306 306
/* Get information about packages */
307 307
function get_pkg_info($pkgs = 'all', $info = 'all') {
308
	global $g, $static_output;
308
	global $g, $static_output, $input_errors;
309 309

  
310 310
	$out = '';
311 311
	$err = '';
......
318 318
	$static_output .= "\n" . gettext("Updating package repository metadada...") . "\n";
319 319
	update_status($static_output);
320 320
	if (!pkg_call("update")) {
321
		$input_errors[] = gettext("ERROR: An error occurred when updating packages repository. Aborting...") . "\n";
321 322
		$static_output .= "\n" . gettext("ERROR: An error occurred when updating packages repository. Aborting...") . "\n";
322 323
		update_status($static_output);
323 324
		return array();
......
328 329
	if ($rc != 0) {
329 330
		$static_output .= "\n" . gettext("ERROR: Error trying to get packages list. Aborting...") . "\n";
330 331
		$static_output .= $err;
332
		$input_errors[] =  gettext("ERROR: Error trying to get packages list. Aborting...") . "\n";
333
		$input_errors[] =  $err;
331 334
		update_status($static_output);
332 335
		return array();
333 336
	}

Also available in: Unified diff