Hi Ralf,
Am 20.07.2010 12:59, schrieb Ralf Habacker:
> 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.
>> [...]
> 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.
Agreed. Maybe a step further would be the assumption that virtual/base
is an implicit dependency for all package, so we don't have to model
it for each and every package?!
>
> 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.
>From inside the portage stuff. If setting EMERGE_VERBOSE=0 the
line will vanish.
>
> 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
Can fix that. For new code I prefer following PEP8 [1]. Is there an
official style guide for python code in emerge? Most of the stuff
I saw in emerge follows a C++/KDE alike and unpythonic style with
lots of redundant brackets. Should I adjust my code?
>
> 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.
Okay, I'll write an explict output function to be used in the
dot visitor. The str() is used for other purposes too which I
don't want to break.
> Second I suggest to add an additional emerge command like
>
> emerge --print-dependencies <package>
>
> to make this features callable in the normal way.
That would be nice. The reason while I haven't done it is
the way the emerge.py driver is written. There is no
main() function and would the parsing of the
program parameters is done by hand. The options parsers
coming with python not used. I don't want to take
the same line. I clearly see potential for some refactoring
here. In my opinion that should be done after the merge.
>
>> II - emerge -k
>>
> I will take a look later
I re-read my yesterdays posting and recognized an error in my writing.
The correct call is:
$ python bin\builder.py \
-c "python emerge\bin\emerge.py %(category)s/%(package)s" \
enterprise5/kdepim-e5 >> control.log 2>&1
like the 'emerge -j' call with the same '-c' semantic.
>> III - emerge -j
>>
> I will take a look later
Forgot to mention that Python 2.6 is needed to use this
because we make use of the multiprocessing API.
>> 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.
Andre Heinecke may assist you with this because he merged
all changes from trunk into our branch already.
> Many thanks for contributing this stuff.
>
Thank you for testing. :-)
> Regards
> Ralf
Regards,
Sascha
[1] http://www.python.org/dev/peps/pep-0008/
_______________________________________________
Kde-windows mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-windows