Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] support/graph-depends: fix package names starting with a non-char
@ 2018-11-24  9:34 Yann E. MORIN
  2018-11-24 10:00 ` Thomas Petazzoni
  2018-11-26 17:50 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Yann E. MORIN @ 2018-11-24  9:34 UTC (permalink / raw)
  To: buildroot

Graphviz' dot utility does not like nodes which names does not start
with an ^[[:alpha:]], i.e. 18xx-ti-utils would cause grievance:

    Warning: syntax ambiguity - badly delimited number '18x' in line 4 [...]/graph-depends.dot splits into two tokens
    Warning: syntax ambiguity - badly delimited number '18x' in line 5 [...]/graph-depends.dot splits into two tokens
    Warning: syntax ambiguity - badly delimited number '18x' in line 6 [...]/graph-depends.dot splits into two tokens
    Warning: syntax ambiguity - badly delimited number '18x' in line 7 [...]/graph-depends.dot splits into two tokens

Prefix nodes with an underscore to fix that.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 support/scripts/graph-depends | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/support/scripts/graph-depends b/support/scripts/graph-depends
index 621e603278..3c091da5e0 100755
--- a/support/scripts/graph-depends
+++ b/support/scripts/graph-depends
@@ -94,9 +94,10 @@ def get_all_depends(pkgs, get_depends_func):
 
 
 # The Graphviz "dot" utility doesn't like dashes in node names. So for
-# node names, we strip all dashes.
+# node names, we strip all dashes. Also, nodes can't start with a number,
+# so we prepend an underscore.
 def pkg_node_name(pkg):
-    return pkg.replace("-", "")
+    return "_" + pkg.replace("-", "")
 
 
 TARGET_EXCEPTIONS = [
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] support/graph-depends: fix package names starting with a non-char
  2018-11-24  9:34 [Buildroot] [PATCH] support/graph-depends: fix package names starting with a non-char Yann E. MORIN
@ 2018-11-24 10:00 ` Thomas Petazzoni
  2018-11-26 17:50 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-11-24 10:00 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 24 Nov 2018 10:34:52 +0100, Yann E. MORIN wrote:
> Graphviz' dot utility does not like nodes which names does not start
> with an ^[[:alpha:]], i.e. 18xx-ti-utils would cause grievance:
> 
>     Warning: syntax ambiguity - badly delimited number '18x' in line 4 [...]/graph-depends.dot splits into two tokens
>     Warning: syntax ambiguity - badly delimited number '18x' in line 5 [...]/graph-depends.dot splits into two tokens
>     Warning: syntax ambiguity - badly delimited number '18x' in line 6 [...]/graph-depends.dot splits into two tokens
>     Warning: syntax ambiguity - badly delimited number '18x' in line 7 [...]/graph-depends.dot splits into two tokens
> 
> Prefix nodes with an underscore to fix that.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
>  support/scripts/graph-depends | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Applied to master after changing "non-char" to "non-alpha" in the
commit title. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] support/graph-depends: fix package names starting with a non-char
  2018-11-24  9:34 [Buildroot] [PATCH] support/graph-depends: fix package names starting with a non-char Yann E. MORIN
  2018-11-24 10:00 ` Thomas Petazzoni
@ 2018-11-26 17:50 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2018-11-26 17:50 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > Graphviz' dot utility does not like nodes which names does not start
 > with an ^[[:alpha:]], i.e. 18xx-ti-utils would cause grievance:

 >     Warning: syntax ambiguity - badly delimited number '18x' in line 4 [...]/graph-depends.dot splits into two tokens
 >     Warning: syntax ambiguity - badly delimited number '18x' in line 5 [...]/graph-depends.dot splits into two tokens
 >     Warning: syntax ambiguity - badly delimited number '18x' in line 6 [...]/graph-depends.dot splits into two tokens
 >     Warning: syntax ambiguity - badly delimited number '18x' in line 7 [...]/graph-depends.dot splits into two tokens

 > Prefix nodes with an underscore to fix that.

 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed to 2018.02.x and 2018.08.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-26 17:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-24  9:34 [Buildroot] [PATCH] support/graph-depends: fix package names starting with a non-char Yann E. MORIN
2018-11-24 10:00 ` Thomas Petazzoni
2018-11-26 17:50 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox