Hi Quentin,

Quentin Schulz <f...@0leil.net> escreveu no dia quinta, 19/08/2021 à(s) 10:53:
>
> Hi Jose,
>
> On August 19, 2021 10:29:34 AM GMT+02:00, Jose Quaresma 
> <quaresma.j...@gmail.com> wrote:
> >if the user specifies path on 'patchdir' that don't exist,
> >the patch will fail and there are no message that indicates the real cause.
> >
> >Signed-off-by: Jose Quaresma <quaresma.j...@gmail.com>
> >---
> > meta/classes/patch.bbclass | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> >diff --git a/meta/classes/patch.bbclass b/meta/classes/patch.bbclass
> >index 559c6f45bd..1e9a024bf9 100644
> >--- a/meta/classes/patch.bbclass
> >+++ b/meta/classes/patch.bbclass
> >@@ -131,6 +131,8 @@ python patch_do_patch() {
> >             patchdir = parm["patchdir"]
> >             if not os.path.isabs(patchdir):
> >                 patchdir = os.path.join(s, patchdir)
> >+            if not os.path.isdir(patchdir):
> >+                bb.fatal("Patch source directory don't found '%s'" % 
> >patchdir)
>
> In your text, it should be "not" and not "don't".
>
> I could suggest also:
>
> patchdir '%s' not found
>
> Or explicit in the message that "Patch source directory" not found means 
> "patchdir" is incorrect somewhere in SRC_URI.
>
> I think you could even tell which patch file has its patchdir incorrect by 
> printing the "local" variable. Not sure it brings anything, just thinking out 
> loud 😁
>
> Anyway, I like this patch, but it does not have the same purpose as the 
> earlier version of this patch series. I think it is also important to print 
> the patchdir when the patch tool fails to apply the patch. It might be 
> because the path exists but is incorrect.
>
> So it'd be awesome if we can get the patchdir in the fatal message when the 
> patch fails to apply. My understanding of patch.bbclass and lib/oe/patch.py 
> is that resolver.Resolve() is doing the patching so in that except thr 
> patchdir could be printed.

This is the right way to go.
I will address your comments in the next version, it will come in September.

>
> Many thanks!
> Quentin



-- 
Best regards,

José Quaresma
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155020): 
https://lists.openembedded.org/g/openembedded-core/message/155020
Mute This Topic: https://lists.openembedded.org/mt/84992342/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to