* [PATCH] oe-depends-dot: Handle new format for task-depends.dot
@ 2022-05-24 21:02 Rusty Howell
2022-05-25 8:45 ` [poky] " Luca Ceresoli
2022-05-29 23:27 ` Steve Sakoman
0 siblings, 2 replies; 5+ messages in thread
From: Rusty Howell @ 2022-05-24 21:02 UTC (permalink / raw)
To: poky; +Cc: Rusty Howell, Rusty Howell
From: Rusty Howell <rhowell@control4.com>
The .dot file created by `bitbake -g` changed formats a while ago, which
broke oe-depends-dot.
Also add some useful examples to the --help output.
Signed-off-by: Rusty Howell <rustyhowell@gmail.com>
---
scripts/oe-depends-dot | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/scripts/oe-depends-dot b/scripts/oe-depends-dot
index 5eb3e12769..1c2d51c6ec 100755
--- a/scripts/oe-depends-dot
+++ b/scripts/oe-depends-dot
@@ -15,7 +15,7 @@ class Dot(object):
def __init__(self):
parser = argparse.ArgumentParser(
description="Analyse recipe-depends.dot generated by bitbake -g",
- epilog="Use %(prog)s --help to get help")
+ formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument("dotfile",
help = "Specify the dotfile", nargs = 1, action='store', default='')
parser.add_argument("-k", "--key",
@@ -32,6 +32,21 @@ class Dot(object):
" For example, A->B, B->C, A->C, then A->C can be removed.",
action="store_true", default=False)
+ parser.epilog = """
+Examples:
+First generate the .dot file:
+ bitbake -g core-image-minimal
+
+To find out why a package is being built:
+ %(prog)s -k <package> -w ./task-depends.dot
+
+To find out what a package depends on:
+ %(prog)s -k <package> -d ./task-depends.dot
+
+Reduce the .dot file packages only, no tasks:
+ %(prog)s -r ./task-depends.dot
+"""
+
self.args = parser.parse_args()
if len(sys.argv) != 3 and len(sys.argv) < 5:
@@ -99,6 +114,10 @@ class Dot(object):
if key == "meta-world-pkgdata":
continue
dep = m.group(2)
+ key = key.split('.')[0]
+ dep = dep.split('.')[0]
+ if key == dep:
+ continue
if key in depends:
if not key in depends[key]:
depends[key].add(dep)
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [poky] [PATCH] oe-depends-dot: Handle new format for task-depends.dot
2022-05-24 21:02 [PATCH] oe-depends-dot: Handle new format for task-depends.dot Rusty Howell
@ 2022-05-25 8:45 ` Luca Ceresoli
[not found] ` <CAE+BM3kGWGTcOaAS9bD=z3W6fY6MpU0EmXLkkw4zW5TFZ5sSbg@mail.gmail.com>
2022-05-29 23:27 ` Steve Sakoman
1 sibling, 1 reply; 5+ messages in thread
From: Luca Ceresoli @ 2022-05-25 8:45 UTC (permalink / raw)
To: Rusty Howell; +Cc: poky, Rusty Howell
Hi Rusty,
Il giorno Tue, 24 May 2022 15:02:40 -0600
"Rusty Howell" <rustyhowell@gmail.com> ha scritto:
> From: Rusty Howell <rhowell@control4.com>
>
> The .dot file created by `bitbake -g` changed formats a while ago, which
> broke oe-depends-dot.
>
> Also add some useful examples to the --help output.
>
> Signed-off-by: Rusty Howell <rustyhowell@gmail.com>
> ---
> scripts/oe-depends-dot | 21 ++++++++++++++++++++-
Thanks for you rpatch. However it should be sent to the oe-core
mailing list, as described in README.poky.md.
No need to resend it I'm taking for testing on the appropriate
repository, but please keep this in mind in case you send other patches
in the future.
Kind regards.
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [poky] [PATCH] oe-depends-dot: Handle new format for task-depends.dot
2022-05-24 21:02 [PATCH] oe-depends-dot: Handle new format for task-depends.dot Rusty Howell
2022-05-25 8:45 ` [poky] " Luca Ceresoli
@ 2022-05-29 23:27 ` Steve Sakoman
2023-01-09 11:17 ` [OE-core] " Quentin Schulz
1 sibling, 1 reply; 5+ messages in thread
From: Steve Sakoman @ 2022-05-29 23:27 UTC (permalink / raw)
To: Rusty Howell
Cc: Rusty Howell, Patches and discussions about the oe-core layer
On Tue, May 24, 2022 at 11:03 AM Rusty Howell <rustyhowell@gmail.com> wrote:
>
> From: Rusty Howell <rhowell@control4.com>
>
> The .dot file created by `bitbake -g` changed formats a while ago, which
> broke oe-depends-dot.
Should this patch be taken for kirkstone too?
Is this the bitbake format change you refer to in the commit description?
https://git.openembedded.org/bitbake-contrib/commit/?h=stable/2.0-nut&id=1d5ca721040c5e39aefa11219f62710de6587701
Steve
> Also add some useful examples to the --help output.
>
> Signed-off-by: Rusty Howell <rustyhowell@gmail.com>
> ---
> scripts/oe-depends-dot | 21 ++++++++++++++++++++-
> 1 file changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/oe-depends-dot b/scripts/oe-depends-dot
> index 5eb3e12769..1c2d51c6ec 100755
> --- a/scripts/oe-depends-dot
> +++ b/scripts/oe-depends-dot
> @@ -15,7 +15,7 @@ class Dot(object):
> def __init__(self):
> parser = argparse.ArgumentParser(
> description="Analyse recipe-depends.dot generated by bitbake -g",
> - epilog="Use %(prog)s --help to get help")
> + formatter_class=argparse.RawDescriptionHelpFormatter)
> parser.add_argument("dotfile",
> help = "Specify the dotfile", nargs = 1, action='store', default='')
> parser.add_argument("-k", "--key",
> @@ -32,6 +32,21 @@ class Dot(object):
> " For example, A->B, B->C, A->C, then A->C can be removed.",
> action="store_true", default=False)
>
> + parser.epilog = """
> +Examples:
> +First generate the .dot file:
> + bitbake -g core-image-minimal
> +
> +To find out why a package is being built:
> + %(prog)s -k <package> -w ./task-depends.dot
> +
> +To find out what a package depends on:
> + %(prog)s -k <package> -d ./task-depends.dot
> +
> +Reduce the .dot file packages only, no tasks:
> + %(prog)s -r ./task-depends.dot
> +"""
> +
> self.args = parser.parse_args()
>
> if len(sys.argv) != 3 and len(sys.argv) < 5:
> @@ -99,6 +114,10 @@ class Dot(object):
> if key == "meta-world-pkgdata":
> continue
> dep = m.group(2)
> + key = key.split('.')[0]
> + dep = dep.split('.')[0]
> + if key == dep:
> + continue
> if key in depends:
> if not key in depends[key]:
> depends[key].add(dep)
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#12790): https://lists.yoctoproject.org/g/poky/message/12790
> Mute This Topic: https://lists.yoctoproject.org/mt/91320803/3620601
> Group Owner: poky+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [steve@sakoman.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [OE-core] [poky] [PATCH] oe-depends-dot: Handle new format for task-depends.dot
2022-05-29 23:27 ` Steve Sakoman
@ 2023-01-09 11:17 ` Quentin Schulz
0 siblings, 0 replies; 5+ messages in thread
From: Quentin Schulz @ 2023-01-09 11:17 UTC (permalink / raw)
To: Steve Sakoman, Rusty Howell
Cc: Rusty Howell, Patches and discussions about the oe-core layer
Hi Steve,
On 5/30/22 01:27, Steve Sakoman wrote:
> On Tue, May 24, 2022 at 11:03 AM Rusty Howell <rustyhowell@gmail.com> wrote:
>>
>> From: Rusty Howell <rhowell@control4.com>
>>
>> The .dot file created by `bitbake -g` changed formats a while ago, which
>> broke oe-depends-dot.
>
> Should this patch be taken for kirkstone too?
>
I believe so, without:
$ oe-depends-dot -k init-ifupdown:do_compile -w task-depends.dot
ERROR: Can't find key init-ifupdown:do_compile in task-depends.dot
with:
$ oe-depends-dot -k init-ifupdown -w task-depends.dot
Because: packagegroup-core-boot theobroma-demo-image
theobroma-demo-image -> packagegroup-core-boot -> init-ifupdown
Tested on Kirkstone 4.0.6.
Cheers,
Quentin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-09 11:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-24 21:02 [PATCH] oe-depends-dot: Handle new format for task-depends.dot Rusty Howell
2022-05-25 8:45 ` [poky] " Luca Ceresoli
[not found] ` <CAE+BM3kGWGTcOaAS9bD=z3W6fY6MpU0EmXLkkw4zW5TFZ5sSbg@mail.gmail.com>
2022-05-26 12:35 ` Luca Ceresoli
2022-05-29 23:27 ` Steve Sakoman
2023-01-09 11:17 ` [OE-core] " Quentin Schulz
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.