Re: [PATCH v2 1/7] build: output a dependency log in build directory

Bruce Richardson
2024-09-03T08:31:22Z

On Mon, Sep 02, 2024 at 04:34:34PM +0200, Burakov, Anatoly wrote:
> On 8/2/2024 2:44 PM, Bruce Richardson wrote:
> > As meson processes our DPDK source tree it manages dependencies
> > specified by each individual driver. To enable future analysis of the
> > dependency links between components, log the dependencies of each DPDK
> > component as it gets processed. This could potentially allow other tools
> > to automatically enable or disable components based on the desired end
> > components to be built, e.g. if the user requests net/ice, ensure that
> > common/iavf is also enabled in the drivers.
> >
> > The output file produced is in "dot" or "graphviz" format, which allows
> > producing a graphical representation of the DPDK dependency tree if so
> > desired. For example: "dot -Tpng -O build/deps.dot" to produce the
> > image file "build/deps.dot.png".
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
> >
> > ---
>
> <snip>
>
> > +try:
> > + contents = file_to_list(depsfile)
> > +except FileNotFoundError:
> > + contents = ['digraph {\n', '}\n']
> > +
> > +component = sys.argv[1]
> > +if len(sys.argv) > 2:
> > + contents[-1] = f'"{component}" -> {{ "{"\", \"".join(sys.argv[2:])}" }}\n'
>
> This is invalid syntax prior to Python 3.12. You're doing escaped quotes
> ("\", \"") inside a f-string block ({}). My machine has Python 3.9 and this
> breaks the script.
>
Thanks for the heads-up. I'll do a respin when I can.