Project

General

Profile

« Previous | Next » 

Revision 4458ed6b

Added by Chris Buechler about 9 years ago

Fix package_reinstall_all post-upgrade when packages have been removed in pre_upgrade. Ticket #6137

View differences:

src/etc/inc/pkg-utils.inc
988 988
function package_reinstall_all() {
989 989
	global $g, $config, $pkg_interface;
990 990

  
991
	if (!isset($config['installedpackages']['package']) ||
992
	    !is_array($config['installedpackages']['package'])) {
991
	$upgrade = (file_exists('/conf/needs_package_sync') && platform_booting());
992

  
993
	if ((!isset($config['installedpackages']['package']) ||
994
	    !is_array($config['installedpackages']['package'])) && !$upgrade) {
993 995
		return true;
994 996
	}
995 997

  
996
	$upgrade = (file_exists('/conf/needs_package_sync') && platform_booting());
997

  
998 998
	/* During boot after upgrade, wait for internet connection */
999 999
	if ($upgrade) {
1000
		update_status(gettext("Waiting for internet connection to update pkg metadata and finish package reinstallation"));
1000
		update_status(gettext("Waiting for Internet connection to update pkg metadata and finish package reinstallation"));
1001 1001
		$ntries = 3;
1002 1002
		while ($ntries > 0) {
1003 1003
			if (pkg_update(true)) {

Also available in: Unified diff