mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 01:41:23 +02:00
opkg_manager: ensure update of package list after menu update
This commit is contained in:
@@ -136,8 +136,7 @@ void COPKGManager::init(int wizard_mode)
|
|||||||
list_upgradeable_done = false;
|
list_upgradeable_done = false;
|
||||||
expert_mode = false;
|
expert_mode = false;
|
||||||
local_dir = &g_settings.update_dir_opkg;
|
local_dir = &g_settings.update_dir_opkg;
|
||||||
v_bad_pattern = getBadPackagePatternList();
|
initPackagePatternLists();
|
||||||
v_good_pattern = getGoodPackagePatternList();
|
|
||||||
|
|
||||||
silent = false;
|
silent = false;
|
||||||
num_updates = 0;
|
num_updates = 0;
|
||||||
@@ -359,6 +358,14 @@ static const struct button_label COPKGManagerFooterButtonsExpert[COPKGManagerFoo
|
|||||||
{ NEUTRINO_ICON_BUTTON_BLUE, LOCALE_OPKG_BUTTON_UNINSTALL }
|
{ NEUTRINO_ICON_BUTTON_BLUE, LOCALE_OPKG_BUTTON_UNINSTALL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void COPKGManager::initPackagePatternLists()
|
||||||
|
{
|
||||||
|
v_bad_pattern.clear();
|
||||||
|
v_bad_pattern = getBadPackagePatternList();
|
||||||
|
v_good_pattern.clear();
|
||||||
|
v_good_pattern = getGoodPackagePatternList();
|
||||||
|
}
|
||||||
|
|
||||||
vector<string> COPKGManager::getBadPackagePatternList()
|
vector<string> COPKGManager::getBadPackagePatternList()
|
||||||
{
|
{
|
||||||
return COPKGManager::getPackagePatternList(OPKG_BAD_LIST);
|
return COPKGManager::getPackagePatternList(OPKG_BAD_LIST);
|
||||||
@@ -477,6 +484,7 @@ void COPKGManager::updateMenu()
|
|||||||
bool upgradesAvailable = false;
|
bool upgradesAvailable = false;
|
||||||
getPkgData(CMD_LIST_INSTALLED);
|
getPkgData(CMD_LIST_INSTALLED);
|
||||||
getPkgData(CMD_LIST_UPGRADEABLE);
|
getPkgData(CMD_LIST_UPGRADEABLE);
|
||||||
|
initPackagePatternLists();
|
||||||
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 */
|
/* this should no longer trigger at all */
|
||||||
if (!isPermittedPackage(it->second.name))
|
if (!isPermittedPackage(it->second.name))
|
||||||
|
@@ -143,6 +143,7 @@ class COPKGManager : public CMenuTarget
|
|||||||
OPKG_GOOD_LIST = 1
|
OPKG_GOOD_LIST = 1
|
||||||
}opkg_pattern_list_t;
|
}opkg_pattern_list_t;
|
||||||
|
|
||||||
|
void initPackagePatternLists();
|
||||||
static std::vector<std::string> getPackagePatternList(opkg_pattern_list_t type);
|
static std::vector<std::string> getPackagePatternList(opkg_pattern_list_t type);
|
||||||
|
|
||||||
//!Returns a vector with possible filter entries from OPKG_BAD_PATTERN_LIST_FILE or OPKG_GOOD_PATTERN_LIST_FILE
|
//!Returns a vector with possible filter entries from OPKG_BAD_PATTERN_LIST_FILE or OPKG_GOOD_PATTERN_LIST_FILE
|
||||||
|
Reference in New Issue
Block a user