* devtool finish & patch order
@ 2018-06-14 4:02 Tim Hammer
2018-06-14 7:07 ` Alexander Kanavin
0 siblings, 1 reply; 5+ messages in thread
From: Tim Hammer @ 2018-06-14 4:02 UTC (permalink / raw)
To: yocto
[-- Attachment #1: Type: text/plain, Size: 846 bytes --]
My changes for U-Boot are not working as expected. I am wondering- did I
use devtool incorrectly?
I used 'devtool modify' to create a working copy of the vendor's u-boot and
copied & modified files to add support for my custom board. I did my work
in 3 distinct and commitable steps, resulting in 3 patch files in my layer
when I ran 'devtool finish'.
When I pulled the changes into another clone for validation, it appears to
be applying patches in reverse order! It is attempting to apply patch 003
but cannot find the file to modify. That file was created in patch 001.
None of the files created in patch 001 are in my working directory.
I reversed the order of the patch files in the .bbappend file and it worked
fine.
Do I need to use the tool differently to get the patches correctly applied?
Thanks!
--
.Tim
[-- Attachment #2: Type: text/html, Size: 1171 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: devtool finish & patch order
2018-06-14 4:02 devtool finish & patch order Tim Hammer
@ 2018-06-14 7:07 ` Alexander Kanavin
2018-06-14 23:11 ` Peter Kjellerstedt
0 siblings, 1 reply; 5+ messages in thread
From: Alexander Kanavin @ 2018-06-14 7:07 UTC (permalink / raw)
To: Tim Hammer; +Cc: Yocto discussion list
2018-06-14 7:02 GMT+03:00 Tim Hammer <tdhammer99@gmail.com>:
>
> My changes for U-Boot are not working as expected. I am wondering- did I use
> devtool incorrectly?
>
> I used 'devtool modify' to create a working copy of the vendor's u-boot and
> copied & modified files to add support for my custom board. I did my work in
> 3 distinct and commitable steps, resulting in 3 patch files in my layer when
> I ran 'devtool finish'.
>
> When I pulled the changes into another clone for validation, it appears to
> be applying patches in reverse order! It is attempting to apply patch 003
> but cannot find the file to modify. That file was created in patch 001. None
> of the files created in patch 001 are in my working directory.
>
> I reversed the order of the patch files in the .bbappend file and it worked
> fine.
>
> Do I need to use the tool differently to get the patches correctly applied?
Devtool should add newly added patches to the recipe in the same order
as the commits you created in workdir repo. If that is not the case,
please provide the steps that reproduce the issue.
Alex
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: devtool finish & patch order
2018-06-14 7:07 ` Alexander Kanavin
@ 2018-06-14 23:11 ` Peter Kjellerstedt
2018-06-15 4:36 ` Alexander Kanavin
0 siblings, 1 reply; 5+ messages in thread
From: Peter Kjellerstedt @ 2018-06-14 23:11 UTC (permalink / raw)
To: Alexander Kanavin, Tim Hammer
Cc: Yocto discussion list, Paul Eggleton (paul.eggleton@linux.intel.com)
> -----Original Message-----
> From: yocto-bounces@yoctoproject.org [mailto:yocto-
> bounces@yoctoproject.org] On Behalf Of Alexander Kanavin
> Sent: den 14 juni 2018 09:07
> To: Tim Hammer <tdhammer99@gmail.com>
> Cc: Yocto discussion list <yocto@yoctoproject.org>
> Subject: Re: [yocto] devtool finish & patch order
>
> 2018-06-14 7:02 GMT+03:00 Tim Hammer <tdhammer99@gmail.com>:
> >
> > My changes for U-Boot are not working as expected. I am wondering-
> did I use
> > devtool incorrectly?
> >
> > I used 'devtool modify' to create a working copy of the vendor's u-
> boot and
> > copied & modified files to add support for my custom board. I did my
> work in
> > 3 distinct and commitable steps, resulting in 3 patch files in my
> layer when
> > I ran 'devtool finish'.
> >
> > When I pulled the changes into another clone for validation, it
> appears to
> > be applying patches in reverse order! It is attempting to apply patch
> 003
> > but cannot find the file to modify. That file was created in patch
> 001. None
> > of the files created in patch 001 are in my working directory.
> >
> > I reversed the order of the patch files in the .bbappend file and it
> worked
> > fine.
> >
> > Do I need to use the tool differently to get the patches correctly
> applied?
>
> Devtool should add newly added patches to the recipe in the same order
> as the commits you created in workdir repo. If that is not the case,
> please provide the steps that reproduce the issue.
>
> Alex
It should, but there does not seem to be a guarantee that it does.
To (hopefully) reproduce the problem, here is what I did:
* `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"
Also noteworthy is the different formattings used when updating the
SRC_URI in the original recipe vs the bbappend file. The format
used in the bbappend file is not one I would have chosen (personally
I prefer to use SRC_URI += "..." for each patch, so that no other
lines need to be modified when adding the first patch or removing
the last one).
//Peter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: devtool finish & patch order
2018-06-14 23:11 ` Peter Kjellerstedt
@ 2018-06-15 4:36 ` Alexander Kanavin
2018-06-15 10:54 ` Peter Kjellerstedt
0 siblings, 1 reply; 5+ messages in thread
From: Alexander Kanavin @ 2018-06-15 4:36 UTC (permalink / raw)
To: Peter Kjellerstedt
Cc: Yocto discussion list, Paul Eggleton (paul.eggleton@linux.intel.com)
2018-06-15 2:11 GMT+03:00 Peter Kjellerstedt <peter.kjellerstedt@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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: devtool finish & patch order
2018-06-15 4:36 ` Alexander Kanavin
@ 2018-06-15 10:54 ` Peter Kjellerstedt
0 siblings, 0 replies; 5+ messages in thread
From: Peter Kjellerstedt @ 2018-06-15 10:54 UTC (permalink / raw)
To: Alexander Kanavin
Cc: Yocto discussion list, Paul Eggleton (paul.eggleton@linux.intel.com)
> -----Original Message-----
> From: Alexander Kanavin [mailto:alex.kanavin@gmail.com]
> Sent: den 15 juni 2018 06:37
> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Cc: Tim Hammer <tdhammer99@gmail.com>; Yocto discussion list
> <yocto@yoctoproject.org>; Paul Eggleton (paul.eggleton@linux.intel.com)
> <paul.eggleton@linux.intel.com>
> Subject: Re: [yocto] devtool finish & patch order
>
> 2018-06-15 2:11 GMT+03:00 Peter Kjellerstedt
> <peter.kjellerstedt@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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-06-15 10:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-14 4:02 devtool finish & patch order Tim Hammer
2018-06-14 7:07 ` Alexander Kanavin
2018-06-14 23:11 ` Peter Kjellerstedt
2018-06-15 4:36 ` Alexander Kanavin
2018-06-15 10:54 ` Peter Kjellerstedt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.