All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Robert Yang <liezhi.yang@windriver.com>
Cc: bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: Re: [PATCH 2/2] bitbake: build.py: check dependendent task for addtask
Date: Tue, 30 Apr 2019 14:13:00 +0200	[thread overview]
Message-ID: <CA+chaQfactCL00D9QaVch3BRp4vN2ZFcWYnK9uVsRQcjTCOfrQ@mail.gmail.com> (raw)
In-Reply-To: <0c45f88f-6056-2fa6-1db1-f7ce413ba0f3@windriver.com>

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

I just got few thousands of warnings thanks to this, they might be
legitimate as write_bom_data and write_abi_xml_data are our own tasks added
in
https://github.com/webosose/meta-webosose/blob/master/meta-webos/classes/webos_base.bbclass
very
long time ago (based on fetchall task which was added in 2006 :)) - there
might be better way to add them now, I'll check how to do it better or else
I might need to disable this warning locally.

Based on "utility-tasks: Drop fetchall and checkuriall tasks" I guess the
right way to do the same now will be to convert our scripts to call it
with --runall.

It's pity that the warning is shown repeatedly.

grep -c WARNING:.*dependent.task BUILD/log/cooker/m16p3/console-latest.log
30409

and that was only very small build not even finished yet:
Currently  7 running tasks (1142 of 2514)

..
WARNING: cross-localedef-native: dependent task do_deploy does not exist
WARNING: cross-localedef-native: dependent task do_package_write_ipk does
not exist
WARNING: cross-localedef-native: dependent task do_deploy does not exist
WARNING: cross-localedef-native: dependent task do_package_write_ipk does
not exist
WARNING: cross-localedef-native: dependent task write_bom_data does not
exist
WARNING: cross-localedef-native: dependent task write_abi_xml_data does not
exist
WARNING: autoconf-archive-native: dependent task do_deploy does not exist
WARNING: autoconf-archive-native: dependent task do_package_write_ipk does
not exist
WARNING: autoconf-archive-native: dependent task do_deploy does not exist
WARNING: autoconf-archive-native: dependent task do_package_write_ipk does
not exist
WARNING: autoconf-archive-native: dependent task write_bom_data does not
exist
WARNING: autoconf-archive-native: dependent task write_abi_xml_data does
not exist
WARNING: cross-localedef-native: dependent task do_deploy does not exist
WARNING: cross-localedef-native: dependent task do_package_write_ipk does
not exist
WARNING: cross-localedef-native: dependent task do_deploy does not exist
WARNING: cross-localedef-native: dependent task do_package_write_ipk does
not exist
WARNING: cross-localedef-native: dependent task write_bom_data does not
exist
WARNING: cross-localedef-native: dependent task write_abi_xml_data does not
exist
WARNING: cross-localedef-native: dependent task do_deploy does not exist
WARNING: cross-localedef-native: dependent task do_package_write_ipk does
not exist
WARNING: cross-localedef-native: dependent task do_deploy does not exist
WARNING: cross-localedef-native: dependent task do_package_write_ipk does
not exist
WARNING: cross-localedef-native: dependent task write_bom_data does not
exist
WARNING: cross-localedef-native: dependent task write_abi_xml_data does not
exist
WARNING: cross-localedef-native: dependent task do_deploy does not exist
WARNING: cross-localedef-native: dependent task do_package_write_ipk does
not exist
WARNING: cross-localedef-native: dependent task do_deploy does not exist
WARNING: cross-localedef-native: dependent task do_package_write_ipk does
not exist
WARNING: cross-localedef-native: dependent task write_bom_data does not
exist
WARNING: cross-localedef-native: dependent task write_abi_xml_data does not
exist
..

On Fri, Apr 26, 2019 at 4:49 AM Robert Yang <liezhi.yang@windriver.com>
wrote:

>
>
> On 4/25/19 6:50 PM, Richard Purdie wrote:
> > On Thu, 2019-04-25 at 18:01 +0800, Robert Yang wrote:
> >> The following command is incorrect, but was ignored silently, that may
> suprise
> >> users:
> >>
> >> addtask task after task_not_existed
> >>
> >> This patch can check and warn for it. It would be better to also check
> "before"
> >> tasks, but there is no easier way to do it.
> >>
> >> [YOCTO #13282]
> >>
> >> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> >> ---
> >>   bitbake/lib/bb/build.py | 3 +++
> >>   1 file changed, 3 insertions(+)
> >>
> >> diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
> >> index 7571421..861e9a9 100644
> >> --- a/bitbake/lib/bb/build.py
> >> +++ b/bitbake/lib/bb/build.py
> >> @@ -815,6 +815,9 @@ def add_tasks(tasklist, d):
> >>           task_deps['parents'][task] = []
> >>           if 'deps' in flags:
> >>               for dep in flags['deps']:
> >> +                # Check and warn for "addtask task after foo" while
> foo does not exist
> >> +                if not dep in tasklist:
> >> +                    bb.warn('%s: dependent task %s does not exist!' %
> (d.getVar('PN'), dep))
> >>                   dep = d.expand(dep)
> >>                   task_deps['parents'][task].append(dep)
> >
> > I can't help wonder if this change has races, depending on the order of
> > the addtask and deltask expressions. Do most layers parse cleanly with
> > this?
>
> The bb.build.add_tasks() is only called by ast.py's finalize(), I think
> that
> everything should be ready in finalize stage, and there should be no races.
> I tested this with meta-oe, python perl, selinux and others, didn't see
> any problems (unless I depended on an invalid task).
>
> >
> > At one point bitbake did support "floating" invalid tasks, I can't
> > remember if we changed that or not though.
>
> This warning is good for checking typos during development, I think that
> user can call "bb.build.addtask()" dynamically in a function to fix the
> warning
> for floating tasks?
>
> // Robert
>
> >
> > Cheers,
> >
> > Richard
> >
> >
> --
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/bitbake-devel
>

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

  reply	other threads:[~2019-04-30 12:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-25 10:00 [PATCH 0/2] Fixes for addtask and deltask Robert Yang
2019-04-25 10:00 ` [PATCH 1/2] bitbake: BBHandler: Fix " Robert Yang
2019-04-25 10:48   ` Richard Purdie
2019-04-26  3:17     ` Robert Yang
2019-04-25 10:01 ` [PATCH 2/2] bitbake: build.py: check dependendent task for addtask Robert Yang
2019-04-25 10:50   ` Richard Purdie
2019-04-26  2:49     ` Robert Yang
2019-04-30 12:13       ` Martin Jansa [this message]
2019-05-01 10:50       ` Jacob Kroon
2019-05-01 15:30         ` Burton, Ross
2019-05-01 16:48           ` Nicolas Dechesne
2019-05-01 19:42             ` Richard Purdie
2019-05-05  5:56               ` Robert Yang
2019-05-05 10:30                 ` Robert Yang

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=CA+chaQfactCL00D9QaVch3BRp4vN2ZFcWYnK9uVsRQcjTCOfrQ@mail.gmail.com \
    --to=martin.jansa@gmail.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=liezhi.yang@windriver.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 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.