From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>,
openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH 7/7] lib/oe/patch: Use git notes to store the filenames for the patches
Date: Sat, 17 Feb 2024 12:34:05 +0000 [thread overview]
Message-ID: <1913878c922f5791522efce3a9fb31e55ed01988.camel@linuxfoundation.org> (raw)
In-Reply-To: <20240216185956.2606978-7-pkj@axis.com>
On Fri, 2024-02-16 at 19:59 +0100, Peter Kjellerstedt wrote:
> The old way of keeping track of the filenames for the patches that
> correspond to the commits was to add a special comment line to the end
> of the commit message, e.g., "%% original patch: <filename>", using a
> temporary git hook. This method had some drawbacks, e.g.:
>
> * It caused problems if one wanted to push the commits upstream as the
> comment line had to be manually removed.
> * The comment line would end up in patches if someone used git
> format-path rather than devtool finish to generate the patches.
> * The comment line could interfere with global Git hooks used to
> validate the format of the Git commit message.
> * When regenerating patches with `devtool finish --force-patch-refresh`,
> the process typically resulted in adding empty lines to the end of the
> commit messages in the updated patches.
>
> A better way of keeping track of the patch filenames is to use Git
> notes. This way the commit messages remain unaffected, but the
> information is still shown when, e.g., doing `git log`. A special Git
> notes space, refs/notes/devtool, is used to not intefere with the
> default Git notes. It is configured to be shown in, e.g., `git log` and
> to survive rewrites (i.e., `git commit --amend` and `git rebase`).
>
> Since there is no longer any need for a temporary Git hook, the code
> that manipulated the .git/hooks directory has also been removed. To
> avoid potential problems due to global Git hooks, --no-verify was added
> to the `git commit` command.
>
> To not cause troubles for those who have done `devtool modify` for a
> recipe with the old solution and then do `devtool finish` with the new
> solution, the code will fall back to look for the old strings in the
> commit message if no Git note can be found.
>
> While not technically motivated like above, the way to keep track of
> ignored commits is also changed to use Git notes to avoid having
> different methods to store similar information.
>
> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> ---
> meta/lib/oe/patch.py | 105 +++++++++++++++---------
> meta/lib/oeqa/selftest/cases/devtool.py | 9 +-
> scripts/lib/devtool/standard.py | 15 ++--
> 3 files changed, 78 insertions(+), 51 deletions(-)
I've tweaked the EXCLUDE_FROM_WORLD issue and I can squash that in but
with that we still saw:
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/6433/steps/14/logs/stdio
which I think is from this patch.
Cheers,
Richard
next prev parent reply other threads:[~2024-02-17 12:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-16 18:59 [PATCH 1/7] devtool: standard: Add some missing whitespace Peter Kjellerstedt
2024-02-16 18:59 ` [PATCH 2/7] devtool: _extract_source: Correct the removal of an old backup directory Peter Kjellerstedt
2024-02-16 18:59 ` [PATCH 3/7] lib/oe/patch: Make extractPatches() not extract ignored commits Peter Kjellerstedt
2024-02-17 8:52 ` [OE-core] " Richard Purdie
2024-02-16 18:59 ` [PATCH 4/7] lib/oe/patch: Add GitApplyTree.commitIgnored() Peter Kjellerstedt
2024-02-16 18:59 ` [PATCH 5/7] devtool: Make use of oe.patch.GitApplyTree.commitIgnored() Peter Kjellerstedt
2024-02-16 18:59 ` [PATCH 6/7] patch.bbclass: " Peter Kjellerstedt
2024-02-16 19:30 ` Patchtest results for " patchtest
2024-02-16 18:59 ` [PATCH 7/7] lib/oe/patch: Use git notes to store the filenames for the patches Peter Kjellerstedt
2024-02-17 12:34 ` Richard Purdie [this message]
2024-02-18 22:10 ` [OE-core] " Peter Kjellerstedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1913878c922f5791522efce3a9fb31e55ed01988.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=peter.kjellerstedt@axis.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox