mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
COPKGManager: add member doUpdate()
This commit is contained in:
@@ -271,6 +271,14 @@ bool COPKGManager::hasUpdates()
|
||||
return ret;
|
||||
}
|
||||
|
||||
void COPKGManager::doUpdate()
|
||||
{
|
||||
int r = execCmd(pkg_types[OM_UPDATE]);
|
||||
if (r) {
|
||||
showError(g_Locale->getText(LOCALE_OPKG_FAILURE_UPDATE), strerror(errno), pkg_types[OM_UPDATE]);
|
||||
}
|
||||
}
|
||||
|
||||
void COPKGManager::refreshMenu() {
|
||||
list_installed_done = false,
|
||||
list_upgradeable_done = false;
|
||||
@@ -280,11 +288,7 @@ void COPKGManager::refreshMenu() {
|
||||
int COPKGManager::showMenu()
|
||||
{
|
||||
installed = false;
|
||||
|
||||
int r = execCmd(pkg_types[OM_UPDATE]);
|
||||
if (r) {
|
||||
showError(g_Locale->getText(LOCALE_OPKG_FAILURE_UPDATE), strerror(errno), pkg_types[OM_UPDATE]);
|
||||
}
|
||||
doUpdate();
|
||||
|
||||
getPkgData(OM_LIST);
|
||||
getPkgData(OM_LIST_UPGRADEABLE);
|
||||
|
@@ -69,6 +69,7 @@ class COPKGManager : public CMenuTarget
|
||||
void refreshMenu();
|
||||
bool badpackage(std::string &s);
|
||||
void showError(const char* local_msg, char* sys_msg, const std::string& command);
|
||||
void doUpdate();
|
||||
|
||||
struct pkg {
|
||||
std::string name;
|
||||
|
Reference in New Issue
Block a user