opkg_manager: do not read package list twice on start

checkUpdates() already gets the package list and the list of
upgradables, so it is unnecessary to do this again immediately
afterwards.


Origin commit data
------------------
Commit: 072c411860
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2016-01-01 (Fri, 01 Jan 2016)
This commit is contained in:
Stefan Seyfried
2016-01-01 23:20:03 +01:00
parent b59b034acf
commit ca87830b1c

View File

@@ -468,7 +468,9 @@ bool COPKGManager::checkUpdates(const std::string & package_name, bool show_prog
status.hide(); status.hide();
} }
#if 0
pkg_map.clear(); pkg_map.clear();
#endif
return ret; return ret;
} }
@@ -497,8 +499,10 @@ int COPKGManager::showMenu()
if (checkUpdates()) if (checkUpdates())
DisplayInfoMessage(g_Locale->getText(LOCALE_OPKG_MESSAGEBOX_UPDATES_AVAILABLE)); DisplayInfoMessage(g_Locale->getText(LOCALE_OPKG_MESSAGEBOX_UPDATES_AVAILABLE));
#if 0
getPkgData(OM_LIST); getPkgData(OM_LIST);
getPkgData(OM_LIST_UPGRADEABLE); getPkgData(OM_LIST_UPGRADEABLE);
#endif
menu = new CMenuWidget(g_Locale->getText(LOCALE_SERVICEMENU_UPDATE), NEUTRINO_ICON_UPDATE, width, MN_WIDGET_ID_SOFTWAREUPDATE); menu = new CMenuWidget(g_Locale->getText(LOCALE_SERVICEMENU_UPDATE), NEUTRINO_ICON_UPDATE, width, MN_WIDGET_ID_SOFTWAREUPDATE);
menu->addIntroItems(LOCALE_OPKG_TITLE, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_BACK, CMenuWidget::BRIEF_HINT_YES); menu->addIntroItems(LOCALE_OPKG_TITLE, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_BACK, CMenuWidget::BRIEF_HINT_YES);