<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10407</bug_id>
          
          <creation_ts>2016-10-10 20:43:37 +0000</creation_ts>
          <short_desc>[libsolv] opkg sometimes returns non-zero exit code but prints nothing to stderr</short_desc>
          <delta_ts>2017-05-08 19:53:57 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>opkg</product>
          <component>opkg</component>
          <version>0.3.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>x86_64</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>0.3.5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sergey Kizunov">sergey.kizunov</reporter>
          <assigned_to name="Alejandro del Castillo">alejandro.delcastillo</assigned_to>
          
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>67106</commentid>
    <comment_count>0</comment_count>
    <who name="Sergey Kizunov">sergey.kizunov</who>
    <bug_when>2016-10-10 20:43:37 +0000</bug_when>
    <thetext>Here is an example where opkg would return an exit code of 1 when trying to remove a package, but stderr is empty. The second invocation in this example redirects stdout to /dev/null so that it is clear that stderr is empty.

---

root@sergey-e8135-000:/etc/opkg# opkg remove blinky
Solver encountered 1 problem(s):
Problem 1/1:
  - package virtual-package-1.0.0-r0.0.all requires blinky, but none of the providers can be installed

Solution 1:
  - allow deinstallation of virtual-package-1.0.0-r0.0.all

Solution 2:
  - do not ask to deinstall blinky

root@sergey-e8135-000:/etc/opkg# echo $?
1
root@sergey-e8135-000:/etc/opkg# opkg remove blinky &gt; /dev/null
root@sergey-e8135-000:/etc/opkg# echo $?
1
root@sergey-e8135-000:/etc/opkg#

---

It is useful to print error information to stderr when the exit code is non-zero because many applications use the contents of stderr to describe why an operation failed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73019</commentid>
    <comment_count>1</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2017-05-03 19:41:08 +0000</bug_when>
    <thetext>Libsolv solver errors are being reported at level NOTICE on libsolver_solver_solve:
    opkg_message(NOTICE, ......)
which is incorrect since the caller is aborting the operation if there are errors found. 

The internal solver is correctly setting solver issues as ERROR.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73126</commentid>
    <comment_count>2</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2017-05-08 19:53:57 +0000</bug_when>
    <thetext>Fixed on 791d5acc4ab34296264ac26754f1773e8e1940d0</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>