opkg_manager: make console output more useful

This commit is contained in:
Stefan Seyfried
2017-01-29 01:58:24 +01:00
parent 0c8d7d7d17
commit 7fd5149f01

View File

@@ -896,9 +896,12 @@ void COPKGManager::handleShellOutput(string* cur_line, int* res, bool* ok)
if (pos2 != string::npos)
has_err = true;
dprintf(DEBUG_NORMAL, "[COPKGManager:%d] %s\n", __LINE__, line.c_str());
//check for collected errors and set res value
if (has_err){
/* all lines printed already
dprintf(DEBUG_NORMAL, "[COPKGManager] [%s - %d] result: %s\n", __func__, __LINE__, line.c_str());
*/
/*duplicate option cache: option is defined in OPKG_CL_CONFIG_OPTIONS,
* NOTE: if found first cache option in the opkg.conf file, this will be preferred and it's not really an error!
@@ -940,7 +943,7 @@ void COPKGManager::handleShellOutput(string* cur_line, int* res, bool* ok)
}
//unknown error
if (*ok){
dprintf(DEBUG_NORMAL, "[COPKGManager] [%s - %d] ERROR: unhandled error %s\n", __func__, __LINE__, line.c_str());
dprintf(DEBUG_DEBUG, "[COPKGManager] [%s - %d] ERROR: unhandled error %s\n", __func__, __LINE__, line.c_str());
*res = OM_UNKNOWN_ERR;
//*ok = false;
return;