<?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>9342</bug_id>
          
          <creation_ts>2016-03-24 14:29:03 +0000</creation_ts>
          <short_desc>Vet subprocess calls</short_desc>
          <delta_ts>2017-07-11 17:38:44 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>2.1</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=10383</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.3 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Stephano Cetola">stephano</assigned_to>
          <cc>benjamin.esquivel</cc>
    
    <cc>jose.perez.carranza</cc>
    
    <cc>joshuagloe</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
          
          <qa_contact name="Juan Ramos">juan.fernandox.ramos.frayle</qa_contact>
          <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>60389</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-03-24 14:29:03 +0000</bug_when>
    <thetext>We should vet all users of subprocess, as unless you pass stderr=subprocess.STDOUT then stderr will disappear and this may mean errors are unreported.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63584</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-07-01 15:46:39 +0000</bug_when>
    <thetext>We should also vet oe.path.check_output() calls</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63585</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-07-01 15:53:45 +0000</bug_when>
    <thetext>This is a proper yak shaver
* Review bb.process in light of Python 3.4&apos;s subprocess implementation, in particular some of the issues in py2 have been fixed so some cruft can likely be removed
* Note that Python 3.5 has a subprocess.run() convenience function that does all sorts of useful magic.  Maybe it would be sensible to clone that API in bb.process() for consistency and the ability to just use subprocess.run() in the future
* Review subprocess calls, moving as much as possible to lists instead of strings with shell=True, and show stderr on error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63586</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-07-01 15:59:56 +0000</bug_when>
    <thetext>There were just two callers of oe.path.check_output, so I just sent a patch to use subprocess directly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63959</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-07-14 00:03:21 +0000</bug_when>
    <thetext>Stephano, I appreciate this bug is rather vague, hopefully comment #2 makes some sense.  Feel free to talk to me if you&apos;re not sure about anything!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64262</commentid>
    <comment_count>5</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-07-21 14:35:33 +0000</bug_when>
    <thetext>oe.utils.getstatusoutput() is a wrapper around subprocess.getstatusouput() in Py3, which is basically deprecated and behaves almost entirely unlike run().  This also should be gutted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66661</commentid>
    <comment_count>6</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2016-09-27 23:39:11 +0000</bug_when>
    <thetext>Cleaned up sub.call and sub.check_output calls in meta/lib/oe/.  Looking at Popen calls next.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66976</commentid>
    <comment_count>7</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2016-10-06 04:06:40 +0000</bug_when>
    <thetext>As I slowly pull apart all the strings, pipes, and redirects in package_manager.py, I am reminded of a rat infested spool of razorwire surrounded by bees.

With any luck this should be done tomorrow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67025</commentid>
    <comment_count>8</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2016-10-07 03:36:12 +0000</bug_when>
    <thetext>Checked in the needed changes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74932</commentid>
    <comment_count>9</comment_count>
    <who name="Juan Ramos">juan.fernandox.ramos.frayle</who>
    <bug_when>2017-07-11 17:38:44 +0000</bug_when>
    <thetext>According to Stephano, any test of the “package” and “package_manager” features in OE will test the changes. Since these are present in nightly test, Im changing this to verified.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>