Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Andriy Danylovskyy" <andriy.danylovskyy@streamunlimited.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] classes/patch: move QUILT_PC for patching consistency
Date: Mon, 26 Sep 2022 04:46:43 -0700	[thread overview]
Message-ID: <15447.1664192803295005631@lists.openembedded.org> (raw)
In-Reply-To: <bb6a6b015fa7e01e51b85096c10bf02859edc96e.camel@linuxfoundation.org>

[-- Attachment #1: Type: text/plain, Size: 2592 bytes --]

On 26/09/2022 12:23, Richard Purdie wrote:

> 
> On Mon, 2022-09-26 at 11:06 +0200, Andriy Danylovskyy wrote:
> 
>> This will move the quilt cache from the default location '$S/.pc' to
>> '$S/patches/.pc', to ensure source invalidation always wipes it out,
>> together with all patches.
>> 
>> Recipes which set $S to $WORKDIR are
>> susceptible to a weird issue:
>> 
> 
> There are a number of problems with recipes which use S = WORKDIR
> unfortunately. Another is that rerunning fetch/unpack doesn't clean up
> files properly and can lead to build corruption.
> 
> I'm leaning towards
> making S == WORKDIR a warning and migrating recipes
> to always use a
> subdir. That isn't entirely straight forward but
> probably the only way to
> solve all the issues.
> 

Anything that doesn't let it "pass" silently would be already a big improvement. Although deprecation with a warning sounds like a few more years to go into all affected projects.

> 
>  
>>  if
>> a source file is patched by quilt (a .bbappend adds a patch), updates
>> to it are ignored by incremental builds, the first obsolete version is
>> picked again and again. This is because quilt keeps its own cache in
>> '$S/.pc', and this one survives source invalidation on do_unpack.
>> 
>> This is
>> a follow-up for a56fb90dc380 and 42a513489dc6
>> 
>> Signed-off-by: Andriy
>> Danylovskyy <andriy.danylovskyy@streamunlimited.com>
>> ---
>> 
>> meta/classes-global/patch.bbclass | 3 +++
>>  1 file changed, 3 insertions(+)
>> diff --git a/meta/classes-global/patch.bbclass
>> b/meta/classes-global/patch.bbclass
>> index e3157c7b18..6fcac18d9c 100644
>> --- a/meta/classes-global/patch.bbclass
>> +++
>> b/meta/classes-global/patch.bbclass
>> @@ -5,6 +5,9 @@
>>  # Point to an empty
>> file so any user's custom settings don't break things
>>  QUILTRCFILE ?=
>> "${STAGING_ETCDIR_NATIVE}/quiltrc"
>>  
>> +# Move quilt's cache to ensure it
>> always gets removed together with "patches"
>> +export QUILT_PC =
>> "${S}/patches/.pc"
>> +
>> 
> 
> This would break all other commandline use of quilt without the right
> environment. Sadly that is a usecase I personally use quite heavily too
> :/.
> 
> Cheers,
> 
> Richard
> 

I can't think of any patching in a recipe workdir, outside of do_patch and the devtool, so this wasn't taken into account. But what do I know about other people's workflows...   Then another (dirtier?) option would be to patch quilt-native itself, setting QUILT_PC to the relative ./patches/.pc

--
Best regards,
Andriy

[-- Attachment #2: Type: text/html, Size: 2872 bytes --]

  reply	other threads:[~2022-09-26 11:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26  9:06 [PATCH] classes/patch: move QUILT_PC for patching consistency Andriy Danylovskyy
2022-09-26  9:13 ` Andriy Danylovskyy
2022-09-26 11:21   ` [OE-core] " Martin Jansa
2022-09-26 12:48     ` Andriy Danylovskyy
2022-09-26 10:23 ` [OE-core] " Richard Purdie
2022-09-26 11:46   ` Andriy Danylovskyy [this message]
2022-09-26 12:21     ` Richard Purdie
2022-09-26 12:59       ` Andriy Danylovskyy

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=15447.1664192803295005631@lists.openembedded.org \
    --to=andriy.danylovskyy@streamunlimited.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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