COPKGManager: add function to get status for new package updates

Origin commit data
------------------
Branch: ni/coolstream
Commit: 6942173bf7
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-11-13 (Thu, 13 Nov 2014)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2014-11-13 12:01:44 +01:00
parent aea0ad3846
commit dc96db1eca
2 changed files with 22 additions and 0 deletions

View File

@@ -250,6 +250,27 @@ void COPKGManager::updateMenu()
menu->setFooter(COPKGManagerFooterButtons, COPKGManagerFooterButtonCount);
}
bool COPKGManager::hasUpdates()
{
if (!hasOpkgSupport())
return false;
bool ret = false;
getPkgData(OM_LIST);
getPkgData(OM_LIST_UPGRADEABLE);
for (map<string, struct pkg>::iterator it = pkg_map.begin(); it != pkg_map.end(); it++){
if (it->second.upgradable){
dprintf(DEBUG_INFO, "[neutrino opkg] Update packages available...\n");
ret = true;
}
}
pkg_map.clear();
return ret;
}
void COPKGManager::refreshMenu() {
list_installed_done = false,
list_upgradeable_done = false;