Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Graphing package dependencies
@ 2010-05-06  8:14 Thomas Petazzoni
  2010-05-06  9:46 ` Peter Korsgaard
  2010-05-13 18:21 ` Thomas Petazzoni
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2010-05-06  8:14 UTC (permalink / raw)
  To: buildroot

Hello,

Following the question asked by Will yesterday, I just went ahead and
implement a small tool that generates a graph of dependencies for a
given package.

The result of this tool for the libgtk2 package can be seen at

  http://free-electrons.com/~thomas/libgtk2-package-dependencies.pdf

This is the kind of funny things we can do with a generic package
infrastructure :-)

The implementation of this tool is available in my graph-dependencies
branch at
http://git.buildroot.net/~tpetazzoni/git/buildroot/log/?h=graph-dependencies.
There are three commits in this branch:

 * package: Add new <pkg>-show-depends to list dependencies

   http://git.buildroot.net/~tpetazzoni/git/buildroot/commit/?h=graph-dependencies&id=27ad37038055e5af12546a5941099264f37feecc

 * package: optimize the implementation of UPPERCASE

   http://git.buildroot.net/~tpetazzoni/git/buildroot/commit/?h=graph-dependencies&id=b6a46aaed9e497503b66789d1b212473d7c78b58

 * New graph-depends script

   http://git.buildroot.net/~tpetazzoni/git/buildroot/commit/?h=graph-dependencies&id=99c53bd52389c003707335d454d1bd1cace9ebfb

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] Graphing package dependencies
  2010-05-06  8:14 [Buildroot] Graphing package dependencies Thomas Petazzoni
@ 2010-05-06  9:46 ` Peter Korsgaard
  2010-05-13 18:21 ` Thomas Petazzoni
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2010-05-06  9:46 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Hello,
 Thomas> Following the question asked by Will yesterday, I just went ahead and
 Thomas> implement a small tool that generates a graph of dependencies for a
 Thomas> given package.

 Thomas> The result of this tool for the libgtk2 package can be seen at

 Thomas>   http://free-electrons.com/~thomas/libgtk2-package-dependencies.pdf

 Thomas> This is the kind of funny things we can do with a generic package
 Thomas> infrastructure :-)

Nice!

 Thomas>  * package: optimize the implementation of UPPERCASE

 Thomas>    http://git.buildroot.net/~tpetazzoni/git/buildroot/commit/?h=graph-dependencies&id=b6a46aaed9e497503b66789d1b212473d7c78b58

My eyes! ;)

We could instead do something like gmsl does (http://gmsl.sf.net):

az := a b c d e f g h i j k l m n o p q r s t u v w x y z . -
AZ := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _ _

UPPERCASE = $(eval __tmp := $1) \
     $(foreach c, $(join $(addsuffix :,$(az)),$(AZ)), \
	$(eval __tmp :=	\
		$(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)),\
			$(__tmp)))) \
     $(__tmp)

It loops through a character list of the form a:A b:B .., and
substitutes the 1st charact for the second.

This is written as a generic tr function, we could ofcourse merge az and
A-Z if we only ever want to do uppercase.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] Graphing package dependencies
  2010-05-06  8:14 [Buildroot] Graphing package dependencies Thomas Petazzoni
  2010-05-06  9:46 ` Peter Korsgaard
@ 2010-05-13 18:21 ` Thomas Petazzoni
  2010-05-14 10:40   ` Lionel Landwerlin
  2010-05-17  6:46   ` Peter Korsgaard
  1 sibling, 2 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2010-05-13 18:21 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 6 May 2010 10:14:37 +0200
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:

> Following the question asked by Will yesterday, I just went ahead and
> implement a small tool that generates a graph of dependencies for a
> given package.

I've slightly improved this script, and it is now capable of generating
the dependency graph for a full Buildroot configuration, i.e taking
into account all packages that have been selected.

See http://free-electrons.com/~thomas/buildroot-full-dependencies.pdf
for a fairly large example involving X.org and Gtk.

As always, the code is available in
http://git.buildroot.net/~tpetazzoni/git/buildroot/log/?h=graph-dependencies.
Besides the modifications in the script itself, the modifications in
the rest of Buildroot are very small.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] Graphing package dependencies
  2010-05-13 18:21 ` Thomas Petazzoni
@ 2010-05-14 10:40   ` Lionel Landwerlin
  2010-05-17  6:46   ` Peter Korsgaard
  1 sibling, 0 replies; 6+ messages in thread
From: Lionel Landwerlin @ 2010-05-14 10:40 UTC (permalink / raw)
  To: buildroot

\o/ Wunderbar !

On Thu, May 13, 2010 at 8:21 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Thu, 6 May 2010 10:14:37 +0200
> Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:
>
>> Following the question asked by Will yesterday, I just went ahead and
>> implement a small tool that generates a graph of dependencies for a
>> given package.
>
> I've slightly improved this script, and it is now capable of generating
> the dependency graph for a full Buildroot configuration, i.e taking
> into account all packages that have been selected.
>
> See http://free-electrons.com/~thomas/buildroot-full-dependencies.pdf
> for a fairly large example involving X.org and Gtk.
>
> As always, the code is available in
> http://git.buildroot.net/~tpetazzoni/git/buildroot/log/?h=graph-dependencies.
> Besides the modifications in the script itself, the modifications in
> the rest of Buildroot are very small.
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>

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

* [Buildroot] Graphing package dependencies
  2010-05-13 18:21 ` Thomas Petazzoni
  2010-05-14 10:40   ` Lionel Landwerlin
@ 2010-05-17  6:46   ` Peter Korsgaard
  2010-05-17  7:03     ` Thomas Petazzoni
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2010-05-17  6:46 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

 Thomas> I've slightly improved this script, and it is now capable of generating
 Thomas> the dependency graph for a full Buildroot configuration, i.e taking
 Thomas> into account all packages that have been selected.

 Thomas> See http://free-electrons.com/~thomas/buildroot-full-dependencies.pdf
 Thomas> for a fairly large example involving X.org and Gtk.

 Thomas> As always, the code is available in
 Thomas> http://git.buildroot.net/~tpetazzoni/git/buildroot/log/?h=graph-dependencies.
 Thomas> Besides the modifications in the script itself, the modifications in
 Thomas> the rest of Buildroot are very small.

Great! Care to write a bit of documentation about it, then I'll pull it?

-- 
Bye, Peter Korsgaard

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

* [Buildroot] Graphing package dependencies
  2010-05-17  6:46   ` Peter Korsgaard
@ 2010-05-17  7:03     ` Thomas Petazzoni
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2010-05-17  7:03 UTC (permalink / raw)
  To: buildroot

On Mon, 17 May 2010 08:46:06 +0200
Peter Korsgaard <jacmet@uclibc.org> wrote:

> Great! Care to write a bit of documentation about it, then I'll pull it?

Sure, will do.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

end of thread, other threads:[~2010-05-17  7:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-06  8:14 [Buildroot] Graphing package dependencies Thomas Petazzoni
2010-05-06  9:46 ` Peter Korsgaard
2010-05-13 18:21 ` Thomas Petazzoni
2010-05-14 10:40   ` Lionel Landwerlin
2010-05-17  6:46   ` Peter Korsgaard
2010-05-17  7:03     ` Thomas Petazzoni

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