All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: jaipaul.cheernam@est.tech, bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel] [PATCH] parse: warn on trailing whitespace after line continuation backslash
Date: Tue, 04 Aug 2026 11:27:49 +0100	[thread overview]
Message-ID: <056c55ee98f7d48caa6bf45152cd63115b9d3132.camel@linuxfoundation.org> (raw)
In-Reply-To: <20260804090834.99906-1-jaipaul.cheernam@est.tech>

On Tue, 2026-08-04 at 11:08 +0200, Jaipaul Cheernam via lists.openembedded.org wrote:
> rstrip() is called before checking for backslash, so trailing spaces or
> tabs after "\" go unnoticed. For example:
> 
>     file://foo.patch \<TAB>
>     file://bar.patch \
> 
> The first line has a trailing tab after the backslash that is invisible
> but ends up in patch context, causing patches to fail to apply on trees
> where it was cleaned up.
> 
> Emit a warning when this is detected so developers can fix it early.
> 
> Tested with bitbake-selftest:
>   $ python3 -m unittest lib.bb.tests.parse.ParseTest.test_parse_trailing_whitespace_continuation -v
>   $ python3 -m unittest lib.bb.tests.parse.ParseTest.test_parse_clean_continuation_no_warning -v
> 
>   2 tests OK
> 
> Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
> ---
> Problem:
> Ran into this while submitting libssh2 CVE patches to both master and
> wrynose. The libssh2_1.11.1.bb on master has a stray tab after the
> backslash on the CVE-2025-15661-3.patch line. Patches adding new file://
> lines below it applied fine on master but git-am refused them on wrynose
> because that branch doesn't have the trailing tab — context mismatch.

This seems like a lot of code and complexity for what is in reality quite a minor issue which
whilst annoying, doesn't actually break anything?

Cheers,

Richard


  reply	other threads:[~2026-08-04 10:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04  9:08 [PATCH] parse: warn on trailing whitespace after line continuation backslash Jaipaul Cheernam
2026-08-04 10:27 ` Richard Purdie [this message]
2026-08-04 10:37   ` [bitbake-devel] " Jaipaul Cheernam
2026-08-04 11:37     ` Richard Purdie
2026-08-04 12:15       ` Jaipaul Cheernam
2026-08-06 10:44 ` [PATCH v2] parse: warn on trailing whitespace in parsed lines Jaipaul Cheernam
2026-08-06 11:24 ` Jaipaul Cheernam

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=056c55ee98f7d48caa6bf45152cd63115b9d3132.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=jaipaul.cheernam@est.tech \
    /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 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.