On Fri, Feb 23, 2024 at 3:24 PM Konstantin Aladyshev
<aladyshe...@gmail.com> wrote:
>
> > Some additional information for the "Tested" section
>
> To make sure that devtool will need to perform "git rebase" operation
> also add conditional patchset, i.e.:
> ```
> SRC_URI:append:test = "file://0001-Test-commit.patch"
> ```

The problem is that the .git/rebase-apply directly cannot be removed
automatically. It is quite literally left around so that the patch failure
can be resolved manually, and then the commit completed with
git am --resolved.

git am of course cleans up and then we can resume patching.

There's no way to know what tools may or may not be run after the failure,
so there's no way that I've ever found to be able to clean it up
automatically.

It is core functionality of the tools that is used in both generation
of a new tree and in applying series to existing branches.

So my suggestion from the other mailing list stands. If the tool that
you are trying to run after knows that it needs a clean environment
then that is the place to remove that directory after a failure in
the patching process.

Bruce

>
> Best regards,
> Konstantin Aladyshev
>
> On Fri, Feb 23, 2024 at 11:12 PM Konstantin Aladyshev via
> lists.yoctoproject.org <aladyshev22=gmail....@lists.yoctoproject.org>
> wrote:
> >
> > Hello!
> >
> > 'kgit-s2q' in the linux recipe tries to use 'git apply' if 'git am' fails.
> > In this case 'kgit-s2q' manually creates a ".git/rebase-apply"
> > directory 
> > (https://git.yoctoproject.org/yocto-kernel-tools/tree/tools/kgit-s2q#n622)
> > But it looks like this directory is not removed after the patches are
> > applied. This creates a problem, since with this directory present git
> > thinks that rebase operation is still in progress.
> > Because of this bug 'devtool modify linux' can't perform its own
> > rebase operations in the "devtool_post_patch" tasks
> > https://git.yoctoproject.org/poky/tree/meta/classes/devtool-source.bbclass#n214
> > In the end this creates a situation when the local patches are not applied.
> >
> > Tested:
> > The issue can be recreated with the poky master.
> >
> > Create a "linux-yocto_%.bbappend" file with a patch that can't be
> > applied with "git am" - this will make kgit-s2q use "git apply" and
> > therefore create a ".git/rebase-apply" directory.
> >
> > In this case "devtool modify linux-yocto" fails with error:
> > ```
> > ERROR: ExecutionError('git rebase devtool-no-overrides', 128, '',
> > 'fatal: It seems that there is already a rebase-apply directory,
> > and\nI wonder if you are in the middle of another rebase.  If that is
> > the\ncase, please try\n\tgit rebase (--continue | --abort |
> > --skip)\nIf that is not the case, please\n\trm -fr
> > ".git/rebase-apply"\nand run me again.  I am stopping in case you
> > still have something\nvaluable there.\n\n')
> > ```
> >
> > Best regards,
> > Konstantin Aladyshev
> >
> >
> >
>
> 
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13603): 
https://lists.yoctoproject.org/g/linux-yocto/message/13603
Mute This Topic: https://lists.yoctoproject.org/mt/104535903/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to