Emerge: Plotting build dependencies graph, emerge -k/-j
Ralf Habacker
ralf.habacker at freenet.de
Tue Jul 20 12:59:54 CEST 2010
Sascha L. Teichmann schrieb:
> Hi together,
>
> some of you may heard me talking about the "emerge -j/-k" stuff at
> the KDE for Windows meeting here at Osnabrück/2010-06-05. Now its
> finally there! :-)
>
> We've have made some improvements to emerge that allow us to set
> it up in a more automated/unattended environment to build
> Kontact Enterprise 5 (KDE/PIM E5).
>
This looks very good.
> I - Plotting the build dependencies graph as a dot graph.
>
> $ python bin\dependencies.py enterprise5/kdepim-e5 > kdepim-e5.dot
> $ dot -Tsvg -okdepim-e5.svg kdepim-e5.dot
>
> That gives you [1]. Visualizing this helped us a lot to fix
> broken dependencies. What we've found should be in upstream already.
> You can use the bin/dependencies.py with a --format=xml parameter
> to get the deps as XML which may be useful to process it further
> with other tools
>
This is a very usefull feature for dependency checking - I played
yesterday with this and found immediatly two dependency issues which
should be solved.
1. win32libs-bin/libxml depends on iconv, while other packages requiring
iconv depends on win_iconv
2. wget is listed as dependency for many packages. For my opinion wget
should only be the first dependency of virtual/base and nowhere else.
An issue i found while running
python bin\dependencies.py enterprise5/kdepim-e5 > kdepim-e5.dot
is that a debug line is printed at the top of the dot file - not sure
yet where it came from.
Another little issue i found is a naming problem - In portage.py there
is a new function def get_packages_categories - in emerge function are
normally written in Camel Case with first character lowercase, so it
should be def getPackagesCategories
One extension I suggest is to change
def __str__(self):
140 return "%s:%s:%s:%s" % (
141 self.category, self.package, self.version, self.tag)
into
def __str__(self):
140 return "%s\\n%s\\n%s\\n%s" % (
141 self.category, self.package, self.version, self.tag)
which increases readability by printing each attribute in a new line.
Also with this change the graph is smaller in width. If you you forced
to use the original style, we should add a parameter to switch the
output format.
Second I suggest to add an additional emerge command like
emerge --print-dependencies <package>
to make this features callable in the normal way.
> II - emerge -k
>
I will take a look later
> III - emerge -j
>
I will take a look later
> You find our emerge changes in the intevation-merge branch [4].
> It would be nice to have merged them back into trunk. :-)
>
I will take some time for merging the stuff into trunk.
Many thanks for contributing this stuff.
Regards
Ralf
More information about the Kde-windows
mailing list