<?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>10350</bug_id>
          
          <creation_ts>2016-09-29 23:05:40 +0000</creation_ts>
          <short_desc>devtool: deploy-target: deploy run time dependencies</short_desc>
          <delta_ts>2017-04-12 17:44: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>devtools / tool chain</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>12 April 2017: RESOLVED</status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M4</target_milestone>
          
          <blocked>10653</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Henry Bruce">henry.bruce</reporter>
          <assigned_to name="Scott Rifenbark">srifenbark</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>brian.avery</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>srifenbark</cc>
    
    <cc>tim.orling</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Done (doc changes complete)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>66737</commentid>
    <comment_count>0</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2016-09-29 23:05:40 +0000</bug_when>
    <thetext>When running a &apos;devtool add&apos; for new project &apos;foo&apos; that introduces new runtime dependencies, the dependent packages are not deployed. So running &apos;devtool deploy-target foo&apos; will succeed but running &apos;foo&apos; on target will fail due to missing dependencies.

An example would be creating npm packages with devtool for an image that does already include the node runtime. When you deploy the package, the node runtime is not present so the module cannot run.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66748</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-09-30 09:30:56 +0000</bug_when>
    <thetext>To a degree this is intentional, because solving this is not straightforward. We know the runtime dependencies, and deploying those at the same time is pretty easy - but what we don&apos;t necessarily know is which of those dependencies are already satisfied on the target (worst case, it&apos;s an image we don&apos;t have metadata for with no runtime package management). If we can figure out a practical way of addressing that then I&apos;m all for fixing it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66765</commentid>
    <comment_count>2</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2016-09-30 16:31:10 +0000</bug_when>
    <thetext>We should make sure this limitation is documented while we work out a solution. Documentation should help developer work out which runtime dependencies need to be deployed ahead of time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70780</commentid>
    <comment_count>3</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2017-02-16 21:29:48 +0000</bug_when>
    <thetext>Henry could you document this as is?

I&apos;d also add that we could add a -f or 0a flag to deploy target that would copy all the runtime dependencies. so you could do a workflow like
deploy-target -a cow
modify/build cow
deploy-target cow 
iterate....
basically let the user override to say, push all and then push just the target</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70819</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2017-02-19 06:08:35 +0000</bug_when>
    <thetext>+1 for &apos;devtool deploy-target -a cow&apos;

In upgrading libmodule-build-tiny-perl, I found that I could not test it on qemu without adding all the RDEPENDS to the image (there are 23 of them). I think it is acceptable to allow the developer to have a hammer which installs all the RDEPENDS (including overwriting those already on the target). What to do with undeploy becomes messier... some kind of uninstall manifest which tracks what was replaced?

Another idea would be to perhaps provide a mechanism to bbappend the image package group and then performing &apos;devtool build-image core-image-foo-bar-baz&apos; in the workspace. In this way we can help the developer understand what will be required to actually deploy the recipe in question.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71147</commentid>
    <comment_count>5</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2017-03-08 19:32:39 +0000</bug_when>
    <thetext>I agree with Brian&apos;s -a option to deploy all dependencies. However this will require further discussion with Paul and should should be a 2.4 feature.

In the meantime, I assign to Scott so docs are updated to make sure developers know that devtool will not deploy dependencies.

Once that&apos;s done, we can set target milestone to 2.4.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71217</commentid>
    <comment_count>6</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-03-13 20:13:27 +0000</bug_when>
    <thetext>Accepting - I will put the appropriate warnings and behaviors in the existing doc for now. 

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71223</commentid>
    <comment_count>7</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-03-13 20:37:43 +0000</bug_when>
    <thetext>Look at this section in the sdk-manual - http://www.yoctoproject.org/docs/2.3/sdk-manual/sdk-manual.html#sdk-dependency-detection-and-mapping.  It is titled &quot;Dependency Detection and Mapping&quot; and is a subsection of the &quot;http://www.yoctoproject.org/docs/2.3/sdk-manual/sdk-manual.html#sdk-a-closer-look-at-devtool-add&quot; section.  It talks about dependencies.  Does the information in this section apply to the problem here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71226</commentid>
    <comment_count>8</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2017-03-13 20:43:45 +0000</bug_when>
    <thetext>The section you found refers to the devtool &quot;add&quot; sub-command and how to manually edit a recipe if it fails to automatically determine run-time dependencies. 

This bug refers to the &quot;deploy-target&quot; sub-command, where we assume runtime dependencies have been correctly defined in recipe but the tool does not deploy them to the target. Make sense?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71255</commentid>
    <comment_count>9</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-03-14 16:21:57 +0000</bug_when>
    <thetext>Hey Henry, 

I get it that the issue is more with deploy.  However, that section about dependencies probably needs a pointer to the explanation as devtool add apparently does not work as expected right in setting up and knowing about all dependencies.  Isn&apos;t it just the action of deploying that unveils this?  So a solution I think would be to describe the issue in a devtool deploy area but have some sort of pointer or reference from devtool add section whose topic matter is indeed about dependencies.  

In the ref-manual, there is a quick reference on devtool (http://www.yoctoproject.org/docs/2.3/ref-manual/ref-manual.html#ref-devtool-reference).  Further down in that section is a subsection named &quot;Deploying Your Software on the Target Machine&quot; at http://www.yoctoproject.org/docs/2.3/ref-manual/ref-manual.html#devtool-deploying-your-software-on-the-target-machine.  Right now, this section has nothing of sort about software not running correctly due to missing dependencies.  It seems this would be the place to detail the issue in this bug.  Correct?

Thanks,
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71407</commentid>
    <comment_count>10</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-03-17 17:56:23 +0000</bug_when>
    <thetext>Changing back to Scott and setting to IN PROGRESS DESIGN.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71428</commentid>
    <comment_count>11</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-03-18 19:35:25 +0000</bug_when>
    <thetext>Henry, 

See the additional information at the bottom of the http://www.yoctoproject.org/docs/2.3/ref-manual/ref-manual.html#devtool-deploying-your-software-on-the-target-machine section to describe this situation.  Make sure I am covering the bases here.

Also, see the note added to the http://www.yoctoproject.org/docs/2.3/ref-manual/ref-manual.html#devtool-adding-a-new-recipe-to-the-workspace section to cross-reference the situation. 

Let me know of any tweaks, changes, etc. 

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71468</commentid>
    <comment_count>12</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-03-20 17:50:15 +0000</bug_when>
    <thetext>Setting to 2.3 M4.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71765</commentid>
    <comment_count>13</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2017-03-27 19:09:28 +0000</bug_when>
    <thetext>If feel the wording could be clearer but it gets the message across.
I recommend you move the new paragraph closer to the the existing description of deploy-target operation &quot;This command deploys all files installed during the do_install task&quot; as this will help clarify that no dependent packages will be deployed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71778</commentid>
    <comment_count>14</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-03-27 21:25:05 +0000</bug_when>
    <thetext>Henry, 

I reworded that first bullet of the new information after the note.  I don&apos;t want to move that block of information though.  The reason I don&apos;t is because the section introduces the command basics and then the new information is additional information about some finer points of using the command.  I am going to leave that structure in place.  

I am open to any rewordings you think might make the text clearer.

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71781</commentid>
    <comment_count>15</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2017-03-27 21:37:28 +0000</bug_when>
    <thetext>Thanks Scott. Looks good. That should do it for warning user of current behavior. 

Question: Do we leave this bug open for implementation in 2.4 or close it and open a new one?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71784</commentid>
    <comment_count>16</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-03-27 22:06:58 +0000</bug_when>
    <thetext>Hi Henry, 

I would say we close this one and open a new one.  If they fix the behavior for 2.4 then the documentation component of the bug would be to update the manual back to &quot;normal&quot; (or however it will behave for 2.4).

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72395</commentid>
    <comment_count>17</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-04-12 17:44:44 +0000</bug_when>
    <thetext>Closing... the doc part is done.

Scott</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>