Project

General

Profile

« Previous | Next » 

Revision 8af4dd4c

Added by Renato Botelho about 10 years ago

Fix delete_package for pkg

View differences:

etc/inc/pkg-utils.inc
554 554
	return true;
555 555
}
556 556

  
557
function delete_package($pkg) {
558
	global $config, $g, $static_output, $vardb;
557
function delete_package($package_name) {
558
	global $config, $g, $static_output;
559 559

  
560
	if (!$pkg) {
560
	if (!is_package_installed($package_name)) {
561 561
		return;
562 562
	}
563 563

  
564
	// Note: $pkg has the full PBI package name followed by ".pbi". Strip off ".pbi".
565
	$pkg = substr(reverse_strrchr($pkg, "."), 0, -1);
566

  
567
	if ($pkg) {
568
		$static_output .= sprintf(gettext("Starting package deletion for %s..."),$pkg);
569
	}
564
	$static_output .= sprintf(gettext("Starting package deletion for %s..."),$package_name);
570 565
	update_output_window($static_output);
571 566

  
572
	pkg_delete($pkg);
567
	pkg_delete($package_name);
573 568
	$static_output .= "done.\n";
574 569
	update_output_window($static_output);
575 570

  
576
	/* Rescan directories for what has been left and avoid fooling other programs. */
577
	mwexec("/sbin/ldconfig");
578

  
579 571
	return;
580 572
}
581 573

  

Also available in: Unified diff