[yocto] devtool finish & patch order
Peter Kjellerstedt
peter.kjellerstedt at axis.com
Fri Jun 15 03:54:29 PDT 2018
> -----Original Message-----
> From: Alexander Kanavin [mailto:alex.kanavin at gmail.com]
> Sent: den 15 juni 2018 06:37
> To: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
> Cc: Tim Hammer <tdhammer99 at gmail.com>; Yocto discussion list
> <yocto at yoctoproject.org>; Paul Eggleton (paul.eggleton at linux.intel.com)
> <paul.eggleton at linux.intel.com>
> Subject: Re: [yocto] devtool finish & patch order
>
> 2018-06-15 2:11 GMT+03:00 Peter Kjellerstedt
> <peter.kjellerstedt at axis.com>:
> > * `devtool modify -w <some simple package>`
> > * Modify some file, e.g., add some comment to the Makefile.
> > * Commit it with subject "Change 1"
> > * Repeat the two steps above two more times, increasing the number in
> > the subject each time.
> > * `devtool finish <some simple package> <layer where the recipe is>`
> > * Examine the updated recipe. In my case the patches were in the
> > correct order after this step:
> >
> > SRC_URI = "<original URI> \
> > file://0001-Change-1.patch \
> > file://0002-Change-2.patch \
> > file://0003-Change-3.patch \
> > "
> >
> > * Not to be discouraged, I started over (using the existing source
> > dir):
> > * `devtool modify -n <some simple package>`
> > * `git rebase -i 'HEAD~3'` (in workspace/sources/<some simple
> > package>)
> > * Use "reword" on the last two commits and change their subject lines
> > to "Another change" and "Some third change".
> > * `devtool finish <some simple package> <some other layer than where
> the recipe is>`
> > * Now I ended up with the following in the new .bbappend file:
> >
> > SRC_URI += "file://0002-Another-change.patch file://0003-Some-third-change.patch file://0001-Change-1.patch"
>
> Wait, what would be the correct thing for devtool to do here? The
> original patches are already added to the recipe in the original
> layer, so .bbappend would have to first revert them and add newly
> modified ones? I don't think devtool is that clever :) Does it add
> the patches correctly, if you repeat the first half of the sequence
> (adding new patches), but use devtool finish to save changes to a
> diffferent layer?
>
> Alex
When I said "I started over" above, that included removing the
patches that had been added to the recipe file. So each time I
did `devtool finish ...`, the recipe state was the initial one
(i.e., without any patches in either the recipe or any bbappend).
I actually did the devtool modify/devtool finish cycle a number
of times. I never got the wrongly ordered patches when they were
added to the recipe, but when they were added in a bbappend, the
results varied. The first time I tried they were in the right
order, but then I did the rewriting of the commit messages and
then they ended up in the wrong order.
//Peter
More information about the yocto
mailing list