mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
opkg_manager: do not put bad packages into package list
"bad" packages will be ignored later anyway, so to speed things up and save memory, do not even put them into the package list. Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
committed by
svenhoefer
parent
cb9ec38623
commit
8578218c38
@@ -392,6 +392,7 @@ void COPKGManager::updateMenu()
|
|||||||
getPkgData(OM_LIST_INSTALLED);
|
getPkgData(OM_LIST_INSTALLED);
|
||||||
getPkgData(OM_LIST_UPGRADEABLE);
|
getPkgData(OM_LIST_UPGRADEABLE);
|
||||||
for (map<string, struct pkg>::iterator it = pkg_map.begin(); it != pkg_map.end(); it++) {
|
for (map<string, struct pkg>::iterator it = pkg_map.begin(); it != pkg_map.end(); it++) {
|
||||||
|
/* this should no longer trigger at all */
|
||||||
if (badpackage(it->second.name))
|
if (badpackage(it->second.name))
|
||||||
continue;
|
continue;
|
||||||
it->second.forwarder->iconName_Info_right = "";
|
it->second.forwarder->iconName_Info_right = "";
|
||||||
@@ -524,6 +525,7 @@ int COPKGManager::showMenu()
|
|||||||
|
|
||||||
pkg_vec.clear();
|
pkg_vec.clear();
|
||||||
for (map<string, struct pkg>::iterator it = pkg_map.begin(); it != pkg_map.end(); it++) {
|
for (map<string, struct pkg>::iterator it = pkg_map.begin(); it != pkg_map.end(); it++) {
|
||||||
|
/* this should no longer trigger at all */
|
||||||
if (badpackage(it->second.name))
|
if (badpackage(it->second.name))
|
||||||
continue;
|
continue;
|
||||||
it->second.forwarder = new CMenuForwarder(it->second.desc, true, NULL , this, it->second.name.c_str());
|
it->second.forwarder = new CMenuForwarder(it->second.desc, true, NULL , this, it->second.name.c_str());
|
||||||
@@ -643,10 +645,12 @@ void COPKGManager::getPkgData(const int pkg_content_id)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch (pkg_content_id) {
|
switch (pkg_content_id) {
|
||||||
case OM_LIST: {
|
case OM_LIST:
|
||||||
|
/* do not even put "bad" packages into the list to save memory */
|
||||||
|
if (badpackage(name))
|
||||||
|
continue;
|
||||||
pkg_map[name] = pkg(name, line, line);
|
pkg_map[name] = pkg(name, line, line);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case OM_LIST_INSTALLED: {
|
case OM_LIST_INSTALLED: {
|
||||||
map<string, struct pkg>::iterator it = pkg_map.find(name);
|
map<string, struct pkg>::iterator it = pkg_map.find(name);
|
||||||
if (it != pkg_map.end())
|
if (it != pkg_map.end())
|
||||||
|
Reference in New Issue
Block a user