mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
opkg_manager: make error messages less cryptic
the errno has nothing to do with the error that happened, so do not use it for the error message
This commit is contained in:
@@ -221,7 +221,10 @@ int COPKGManager::exec(CMenuTarget* parent, const string &actionKey)
|
|||||||
{
|
{
|
||||||
string pkg_name = fileBrowser.getSelectedFile()->Name;
|
string pkg_name = fileBrowser.getSelectedFile()->Name;
|
||||||
if (!installPackage(pkg_name))
|
if (!installPackage(pkg_name))
|
||||||
|
showError(g_Locale->getText(LOCALE_OPKG_FAILURE_INSTALL), "", pkg_name);
|
||||||
|
/* errno is never set properly, the string is totally useless.
|
||||||
showError(g_Locale->getText(LOCALE_OPKG_FAILURE_INSTALL), strerror(errno), pkg_name);
|
showError(g_Locale->getText(LOCALE_OPKG_FAILURE_INSTALL), strerror(errno), pkg_name);
|
||||||
|
*/
|
||||||
|
|
||||||
*local_dir = fileBrowser.getCurrentDir();
|
*local_dir = fileBrowser.getCurrentDir();
|
||||||
refreshMenu();
|
refreshMenu();
|
||||||
@@ -233,7 +236,10 @@ int COPKGManager::exec(CMenuTarget* parent, const string &actionKey)
|
|||||||
parent->hide();
|
parent->hide();
|
||||||
int r = execCmd(actionKey, CShellWindow::VERBOSE | CShellWindow::ACKNOWLEDGE_EVENT);
|
int r = execCmd(actionKey, CShellWindow::VERBOSE | CShellWindow::ACKNOWLEDGE_EVENT);
|
||||||
if (r) {
|
if (r) {
|
||||||
|
/* errno is never set properly, the string is totally useless.
|
||||||
showError(g_Locale->getText(LOCALE_OPKG_FAILURE_UPGRADE), strerror(errno), actionKey);
|
showError(g_Locale->getText(LOCALE_OPKG_FAILURE_UPGRADE), strerror(errno), actionKey);
|
||||||
|
*/
|
||||||
|
showError(g_Locale->getText(LOCALE_OPKG_FAILURE_UPGRADE), "", actionKey);
|
||||||
} else
|
} else
|
||||||
installed = true;
|
installed = true;
|
||||||
refreshMenu();
|
refreshMenu();
|
||||||
@@ -1007,7 +1013,10 @@ bool COPKGManager::installPackage(const string& pkg_name, string options, bool f
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
showError(g_Locale->getText(LOCALE_OPKG_FAILURE_INSTALL), "", pkg_types[OM_INSTALL] + opts + pkg_name);
|
||||||
|
/* errno / strerror considered useless here
|
||||||
showError(g_Locale->getText(LOCALE_OPKG_FAILURE_INSTALL), strerror(errno), pkg_types[OM_INSTALL] + opts + pkg_name);
|
showError(g_Locale->getText(LOCALE_OPKG_FAILURE_INSTALL), strerror(errno), pkg_types[OM_INSTALL] + opts + pkg_name);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if (force_configure)
|
if (force_configure)
|
||||||
|
Reference in New Issue
Block a user