Bug 11392

Summary: Document how to specify a branch / tag / revision when using devtool add with a remote URL
Product: [Documentation] Reference Reporter: Paul Eggleton <bluelightning>
Component: handbookAssignee: Kristi <kristi>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: brianx.j.kurle, poky.doc.watcher, poky.watcher, srifenbark
Version: unspecified   
Target Milestone: 2.5 M1   
Hardware: x86   
OS: Multiple   
Whiteboard: 26 September 2017: RESOLVED
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)

Description Paul Eggleton 2017-04-20 04:05:50 UTC
devtool add allows you to specify a remote URL to fetch from, which may be a git repository, but we don't currently appear to have documented how branches/revisions/tags can be specified.

By default the latest revision on the master branch is found and used (as a fixed revision), but in many cases you'll want to specify either a source revision (;rev=something where something could be a tag or a commit hash), a branch (;branch=somebranch), or both. If instead of a specific revision you want to use the latest revision every time the recipe is built, then you need to use the -a / --autorev option, which may be used in conjunction with branch= to use the latest on a specific branch instead of master.

An additional concern is if you are specifying any such parameters, because of the use of the ; character and typical Linux shell behaviour you will need to surround the URL in quotes e.g. "git://example.com/repo;branch=mybranch" .
Comment 1 Scott Rifenbark 2017-04-25 15:29:43 UTC
Setting number of days.
Comment 2 Scott Rifenbark 2017-04-26 18:44:32 UTC
Setting to 2.4 M1 and ACCEPTED.
Comment 3 Scott Rifenbark 2017-06-05 23:03:30 UTC
Paul, 

Right now, the help for "devtool add" does not cover any of this detail.  Are there plans to update the help output to include these details?

Scott
Comment 4 Kristi 2017-09-26 22:34:38 UTC
I have updated the section here; http://www.yoctoproject.org/docs/2.4/ref-manual/ref-manual.html#devtool-adding-a-new-recipe-to-the-workspace 

I have also updated the Getting Help section with current output here; http://www.yoctoproject.org/docs/2.4/ref-manual/ref-manual.html#devtool-getting-help

Please review and let me know if this is okay, or if additional changes are necessary. 

Thanks!
Comment 5 Paul Eggleton 2017-09-26 23:19:58 UTC
Looks good to me - and good job on documenting the new --srcbranch/--srcrev options rather than using the old method as I wrote in the bug description, I'd meant to come back here and note the change but forgot. Thanks!
Comment 6 Kristi 2017-09-26 23:40:37 UTC
Thanks Paul! Thanks for the quick review. Marking as doc flag Done and status RESOLVED.