Project

General

Profile

« Previous | Next » 

Revision e5960712

Added by Pi Ba almost 8 years ago

pkg, reinstall missing package
change the reference from install_package(.) as this function does not exist.

View differences:

src/etc/inc/pkg-utils.inc
610 610
	update_status(gettext("done.") . "\n");
611 611
}
612 612

  
613
function reinstall_package($package_name) {
614
	global $config, $g;
615

  
616
	$internal_name = $package_name;
617
	$id = get_package_id($package_name);
618
	if ($id >= 0) {
619
		$internal_name = get_package_internal_name($config['installedpackages']['package'][$id]);
620
	}
621
	$pkg_name = $g['pkg_prefix'] . $internal_name;
622
	pkg_install($pkg_name);
623
}
624

  
613 625
/* Run <custom_php_resync_config_command> */
614 626
function sync_package($package_name) {
615 627
	global $config, $builder_package_install;
......
652 664
		} else {
653 665
			log_error(sprintf(gettext('Reinstalling package %1$s because its include file(%2$s) is missing!'), $package['name'], $include_file));
654 666
			uninstall_package($package['name']);
655
			if (install_package($package['name']) != 0) {
667
			if (reinstall_package($package['name']) != 0) {
656 668
				log_error(sprintf(gettext("Reinstalling package %s failed. Take appropriate measures!!!"), $package['name']));
657 669
				return;
658 670
			}

Also available in: Unified diff