Re: [gentoo-dev] New eshowkw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dne 29.10.2010 05:51, Jeroen Roovers napsal(a): On Thu, 28 Oct 2010 23:33:09 +0200 Tomáš Chvátal scarab...@gentoo.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 So now on the eshowkw is part of gentoolkit (in svn, and in next release). If you want to test it and suggest more features/report bugs you can use it as follows: eshowkw [something] equery keywords something gentoo-x86/sci-visualization/gnuplot $ eshowkw ('%s%s', ('Ambiguous package name gnuplot.\n', Possibilities: [u'dev-ruby/gnuplot', u'sci-visualization/gnuplot'])) And there's this: gentoo-x86/mail-client/thunderbird $ cvs up j...@bastiaan gentoo-x86/mail-client/thunderbird $ echo jerwashere thunderbird-3.1.6.ebuild j...@bastiaan gentoo-x86/mail-client/thunderbird $ eshowkw * Digest verification failed: * gentoo-x86/mail-client/thunderbird/thunderbird-3.1.6.ebuild * Reason: Filesize does not match recorded size * Got: 7688 * Expected: 7677 Failed to obtain metadata (paths abbreviated) I can work around this problem by running repoman manifest or similar, only I don't see why that should be required. jer It uses portage porttree.dbapi, so it generates metadata cache if not availible - It requires proper manifest to do so :) Tom -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzKfdcACgkQHB6c3gNBRYcnFwCgqWim1aherG0E2ykyzWWuMT+B NZIAoKkTUUc05VB94frhtKOMLvXLBCgc =aCSv -END PGP SIGNATURE-
Re: [gentoo-dev] New eshowkw
On 28/10/10 02:33, Tomáš Chvátal wrote: Ok i finished my separation as i said yesterday in some of the mails so here is the 0.5.0 version with self install script and so on :) New features: * sorting based on user decision, version or keywords can be on top * filtering archs Implementing additional functions should be really simple now :) The package: http://dev.gentooexperimental.org/~scarabeus/eshowkw-0.5.0.tar.xz Please test and let me know how you like it ~/tree/sys-devel/gcc $ eshowkw Traceback (most recent call last): File /usr/bin/eshowkw, line 9, in module emain(sys.argv) File /usr/lib64/python2.6/site-packages/eshowkw/__init__.py, line 95, in main map(lambda x: process_display(x, keywords, portdir), package) File /usr/lib64/python2.6/site-packages/eshowkw/__init__.py, line 95, in lambda map(lambda x: process_display(x, keywords, portdir), package) File /usr/lib64/python2.6/site-packages/eshowkw/__init__.py, line 18, in process_display portdata = keywords_content(package, keywords.keywords, portdir, use_overlays, ignore_slots, order, bold, topper) File /usr/lib64/python2.6/site-packages/eshowkw/keywords_content.py, line 264, in __init__ porttree = port.db[portage_root]['porttree'].dbapi KeyError: '/home/justin/tree' signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] New eshowkw
On Thu, 28 Oct 2010 02:33:09 +0200 Tomáš Chvátal scarab...@gentoo.org wrote: http://dev.gentooexperimental.org/~scarabeus/eshowkw-0.5.0.tar.xz Ebuild attached. You may want to make this slight change: $ eshowkw-ng --help [...] -P, --prefix Do not display prefix keywords in output. (default: False) -P, --prefix Display prefix keywords in output. jer eshowkw-0.5.0.ebuild Description: Binary data
Re: [gentoo-dev] New eshowkw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 So now on the eshowkw is part of gentoolkit (in svn, and in next release). If you want to test it and suggest more features/report bugs you can use it as follows: eshowkw [something] equery keywords something Cheers Tomas -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzJ7BUACgkQHB6c3gNBRYfGnwCcCbCOV2LKWMtHxrd/luicjLLr TDcAnj2xwouJjyxgh4Js6umTgeRrtIew =rseL -END PGP SIGNATURE-
Re: [gentoo-dev] New eshowkw
On Thu, 28 Oct 2010 23:33:09 +0200 Tomáš Chvátal scarab...@gentoo.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 So now on the eshowkw is part of gentoolkit (in svn, and in next release). If you want to test it and suggest more features/report bugs you can use it as follows: eshowkw [something] equery keywords something gentoo-x86/sci-visualization/gnuplot $ eshowkw ('%s%s', ('Ambiguous package name gnuplot.\n', Possibilities: [u'dev-ruby/gnuplot', u'sci-visualization/gnuplot'])) And there's this: gentoo-x86/mail-client/thunderbird $ cvs up j...@bastiaan gentoo-x86/mail-client/thunderbird $ echo jerwashere thunderbird-3.1.6.ebuild j...@bastiaan gentoo-x86/mail-client/thunderbird $ eshowkw * Digest verification failed: * gentoo-x86/mail-client/thunderbird/thunderbird-3.1.6.ebuild * Reason: Filesize does not match recorded size * Got: 7688 * Expected: 7677 Failed to obtain metadata (paths abbreviated) I can work around this problem by running repoman manifest or similar, only I don't see why that should be required. jer
Re: [gentoo-dev] New eshowkw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ok i finished my separation as i said yesterday in some of the mails so here is the 0.5.0 version with self install script and so on :) New features: * sorting based on user decision, version or keywords can be on top * filtering archs Implementing additional functions should be really simple now :) The package: http://dev.gentooexperimental.org/~scarabeus/eshowkw-0.5.0.tar.xz Please test and let me know how you like it -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzIxMUACgkQHB6c3gNBRYcwegCgp2mRlCgB5CodWQ/PssBtKLYd iT8AniqwlSQjqHNbwCGbL4NYgjnJqQ1O =fChi -END PGP SIGNATURE-
[gentoo-dev] New eshowkw
Hello guys, I took last few days to rewrite our eshowkw script from bash to python and enhance its functionality. Not all of you are aware of this usefull script from gentoolkit-dev package, so let me introduce it: It is script that shows keywords for package and all its versions in nice table for easy review. If you take look on the output_gcc.log attachment it shows what it prints out for our gcc package. It checks out all versions, identify installed and masked packages, separate it by slots and detect redundant versions that could be in theory removed. So since I would like to have this script replace current eshowkw one I want to ask you for kind help on that script and review it and suggest improvements. If the script lack some feature you really want to use also let me know, maybe it wont be too hard to implement. Cheers Tomas # # # # Keywords for sys-devel/gcc: | s | | p | | s a | | p r | | a p a c x x x x x x x | | a m i p s r 6 6 6 6 x 8 8 x 8 8 | | m d a h i a m m p c p c 4 4 x 4 4 8 6 6 x x 8 6 6 x | | d 6 r p a 6 6 i p - a - - - 6 - - 6 x - - 8 8 6 - - 8 | | 6 4 m p 6 4 8 p p c o r s s f 4 o s - 8 f i 6 6 - o s 6 | | 4 - - a 4 - k s p - p c o o r - p o c 6 r n - - n p o - | u | a a p s - l l - - l - - c m e - l l e m e l y - e t l m e e l w | n | l m h i m m p s p f i i h h i m i - a n f a a e a n a g f e e i a t n a i | u s | p d a p a 6 i p c 3 a x b n n p p n i r a c b b r r b c b r w b b r n c b b r n | s l | h 6 r p 6 8 p p 6 9 s r 8 s u u u u u n i i o s s i i s o s i i s s i u o s s i n | e o | a 4 m a 4 k s c 4 0 h c 6 d x x x x x t x x s d d s s d s d s n d d x x s d d s t | d t --+---+--- 2.95.3-r9 | + + + + | 2.95 2.95.3-r10 | ~ ~ ~ ~ | --+---+--- 3.1.1-r2 | - + + | 3.1 --+---+--- 3.2.2 | | # 3.2 3.2.3-r4 | + - + + + + + + | --+---+--- 3.3.6-r1 | ~ ~ | 3.3 --+---+--- 3.4.6-r2 | + + + * ~ * ~ + + ~ + + + * * * * * * * * * * * * * * * * * * * ~ * * * * * * * * | 3.4 --+---+--- 4.0.4 | * * * * ~ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | 4.0 --+---+--- 4.1.2 | + + + + + * + + + + + + + * * * * * * * * * * * ~ * * * * * * * ~ * * * * * * * * | 4.1 --+---+--- 4.2.4-r1 | ~ ~ ~ + ~ ~ ~ ~ ~ ~ ~ | 4.2 --+---+--- 4.3.3-r2 | ~ ~ ~ - ~ ~ ~ ~ ~ ~ ~ ~ ~ | # 4.3 4.3.4 | + + + - + ~ + + + + + + ~ | 4.3.5 | ~ ~ ~ - ~ ~ ~ ~ ~ ~ ~ ~ ~ | --+---+--- 4.4.2 | ~ ~ ~ - ~ ~ ~ ~ - ~
Re: [gentoo-dev] New eshowkw
On 17:39 Tue 26 Oct , Tomáš Chvátal wrote: Hello guys, I took last few days to rewrite our eshowkw script from bash to python and enhance its functionality. Not all of you are aware of this usefull script from gentoolkit-dev package, so let me introduce it: It is script that shows keywords for package and all its versions in nice table for easy review. If you take look on the output_gcc.log attachment it shows what it prints out for our gcc package. It checks out all versions, identify installed and masked packages, separate it by slots and detect redundant versions that could be in theory removed. So since I would like to have this script replace current eshowkw one I want to ask you for kind help on that script and review it and suggest improvements. If the script lack some feature you really want to use also let me know, maybe it wont be too hard to implement. Very cool! There is one major regression from the previous implementation: it is twice as slow, at least on my system. You might want to try some profiling to track this down. In addition, I suspect that printing during the ebuild-processing phase (so printing starts earlier) as the previous implementation does would give the impression of speed. -- Thanks, Donnie Donnie Berkholz Sr. Developer, Gentoo Linux Blog: http://dberkholz.wordpress.com pgpTcpmUj83hf.pgp Description: PGP signature
Re: [gentoo-dev] New eshowkw
Hi Tomáš, On 26-10-2010 17:39:04 +0200, Tomáš Chvátal wrote: So since I would like to have this script replace current eshowkw one I want to ask you for kind help on that script and review it and suggest improvements. If the script lack some feature you really want to use also let me know, maybe it wont be too hard to implement. I havent looked at your implementation, but regarding your screenshot, some questions, suggestions, remarks. I think you should implement some means of selecting which archs you want to plot. Preferably through some config file thing. I'd think of specifying per arch, and or using predefined sets, e.g. to remove all prefix arches, since they spoil any output with huge unreadable matrices. Have you ever played with rotating the view? Some keywords are awfully long, like sparc64-solaris. Most versions are shorter. In case the number of versions is small, you could even have the versions in columnar style (e.g. not vertical, just a column spanning a couple of chars), such that it is much better readable. Maybe consider a raw, tab, csv alike output format, for easy parsing by other scripts? Could perhaps handy to render it alternatively as xml, latex, etc. Maybe introduce some more natural language mode? E.g. some indication per version if all arches are keyworded, stable, per version what arches are still missing... # # # # Keywords for sys-devel/gcc: | s | | p | | s a | | p r | | a p a c x x x x x x x | | a m i p s r 6 6 6 6 x 8 8 x 8 8 | | m d a h i a m m p c p c 4 4 x 4 4 8 6 6 x x 8 6 6 x | | d 6 r p a 6 6 i p - a - - - 6 - - 6 x - - 8 8 6 - - 8 | | 6 4 m p 6 4 8 p p c o r s s f 4 o s - 8 f i 6 6 - o s 6 | | 4 - - a 4 - k s p - p c o o r - p o c 6 r n - - n p o - | u | a a p s - l l - - l - - c m e - l l e m e l y - e t l m e e l w | n | l m h i m m p s p f i i h h i m i - a n f a a e a n a g f e e i a t n a i | u s | p d a p a 6 i p c 3 a x b n n p p n i r a c b b r r b c b r w b b r n c b b r n | s l | h 6 r p 6 8 p p 6 9 s r 8 s u u u u u n i i o s s i i s o s i i s s i u o s s i n | e o | a 4 m a 4 k s c 4 0 h c 6 d x x x x x t x x s d d s s d s d s n d d x x s d d s t | d t --+---+--- 2.95.3-r9 | + + + + | 2.95 2.95.3-r10 | ~ ~ ~ ~ | --+---+--- 3.1.1-r2 | - + + | 3.1 --+---+--- 3.2.2 | | # 3.2 3.2.3-r4 | + - + + + + + + | --+---+--- 3.3.6-r1 | ~ ~ | 3.3 --+---+--- 3.4.6-r2 | + + + * ~ * ~ + + ~ + + + * * * * * * * * * * * * * * * * * * * ~ * * * * * * * * | 3.4 --+---+--- 4.0.4 | * * * * ~ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | 4.0 --+---+--- 4.1.2 | + + + + + * + + + + + + + * * * * * * * * * * * ~ * * * * * * * ~ * * * * * * * * | 4.1 --+---+--- 4.2.4-r1 | ~ ~ ~ + ~ ~ ~ ~ ~ ~ ~ | 4.2
Re: [gentoo-dev] New eshowkw
On 10/26/10 17:39, Tomáš Chvátal wrote: Hello guys, I took last few days to rewrite our eshowkw script from bash to python and enhance its functionality. I did the same some time ago, check it: http://git.overlays.gentoo.org/gitweb/?p=dev/nelchael.git;a=blob;f=scripts/eshowkw.py. -- Krzysztof Pawlik nelchael at gentoo.org key id: 0xF6A80E46 desktop-misc, java, vim, kernel, python, apache... signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] New eshowkw
В Втр, 26/10/2010 в 17:39 +0200, Tomáš Chvátal пишет: If the script lack some feature you really want to use also let me know, maybe it wont be too hard to implement. Nice! What I always missed is an ability to print stable archs in format ready to use in bugzilla's CC field, IOW output string like: am...@gentoo.org,x...@gentoo.org where amd64,x86 are archs where package has stable keywords :) -- Peter.
Re: [gentoo-dev] New eshowkw
Krzysztof Pawlik schrieb am 26.10.2010 18:34: On 10/26/10 17:39, Tomáš Chvátal wrote: Hello guys, I took last few days to rewrite our eshowkw script from bash to python and enhance its functionality. I did the same some time ago, check it: http://git.overlays.gentoo.org/gitweb/?p=dev/nelchael.git;a=blob;f=scripts/eshowkw.py. Why didn't you you introduce this to the community like Tomáš did? That would have saved some time and both of you and everyone interested could have worked on it. It is a perfect addition to gentoolkit-dev. I wonder how many cool tools float around in the dev-spaces none is aware of. I remember a thread here which tried to collect those and place them somewhere public. Instead doing so why not adding them to gentoolkit[-dev]. I guess most of them try to make Gentoo [development] work easier. -- Daniel Pielmeier signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] New eshowkw
On 10/26/10 20:24, Daniel Pielmeier wrote: Krzysztof Pawlik schrieb am 26.10.2010 18:34: On 10/26/10 17:39, Tomáš Chvátal wrote: Hello guys, I took last few days to rewrite our eshowkw script from bash to python and enhance its functionality. I did the same some time ago, check it: http://git.overlays.gentoo.org/gitweb/?p=dev/nelchael.git;a=blob;f=scripts/eshowkw.py. Why didn't you you introduce this to the community like Tomáš did? That would have saved some time and both of you and everyone interested could have worked on it. It is a perfect addition to gentoolkit-dev. Good question, it was written quite a while ago, I had plans to add some nice features and announce it to wider audience. Then 'Real Life (TM)' came into play and... it ended up the way it is currently. The only three 'features' that I managed to pack into it so far are: more usage of colors/bold fonts, slot display and acceptable performance. nelch...@s-lappy ~$ time eshowkw gcc /dev/null real0m0.965s user0m0.900s sys 0m0.060s nelch...@s-lappy ~$ time /usr/bin/eshowkw gcc /dev/null real0m2.559s user0m0.544s sys 0m0.416s nelch...@s-lappy ~$ time eshowkw wine /dev/null real0m0.980s user0m0.876s sys 0m0.096s nelch...@s-lappy ~$ time /usr/bin/eshowkw wine /dev/null real0m6.873s user0m1.732s sys 0m0.896s I wonder how many cool tools float around in the dev-spaces none is aware of. I remember a thread here which tried to collect those and place them somewhere public. Instead doing so why not adding them to gentoolkit[-dev]. I guess most of them try to make Gentoo [development] work easier. I think that there's a lot of tools around for various reasons. Some folks don;t publish them just because, others disagree with current versions (that was my motive for writing my version of eshowkw). For example check this (extremely simple) wrapper around echangelog+repoman: http://dev.gentoo.org/~nelchael/ecommit One way of improving this situation: make gentoolkit svn repository more visible, basically improve documentation/knowledge about what to do with useful tools. -- Krzysztof Pawlik nelchael at gentoo.org key id: 0xF6A80E46 desktop-misc, java, vim, kernel, python, apache... signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] New eshowkw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dne 26.10.2010 18:34, Krzysztof Pawlik napsal(a): On 10/26/10 17:39, Tomáš Chvátal wrote: Hello guys, I took last few days to rewrite our eshowkw script from bash to python and enhance its functionality. I did the same some time ago, check it: http://git.overlays.gentoo.org/gitweb/?p=dev/nelchael.git;a=blob;f=scripts/eshowkw.py. Hehe was not aware of that, thats why i hate when people put their scripts into overlays and not to some common repo :) Also it does not work for me at all: sca...@ugly-elf: ~ $ eshowkw.py kdelibs Traceback (most recent call last): File /usr/local/bin/eshowkw.py, line 174, in module showMe(myArch, portage.portdbapi(portage.settings['PORTDIR']), pkg) File /usr/lib64/portage/pym/portage/dbapi/porttree.py, line 95, in __init__ self.repositories = self.settings.repositories AttributeError: 'config' object has no attribute 'repositories' Cheers Tom -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzHI5kACgkQHB6c3gNBRYfx5gCfUJKIrz/EWcgJgofEDYBRsMM/ JkgAoMAaASTggemU3q1TQGSHTPt15p2j =Jsy0 -END PGP SIGNATURE-
Re: [gentoo-dev] New eshowkw
On 10/26/10 20:53, Tomáš Chvátal wrote: Dne 26.10.2010 18:34, Krzysztof Pawlik napsal(a): On 10/26/10 17:39, Tomáa Chvátal wrote: Hello guys, I took last few days to rewrite our eshowkw script from bash to python and enhance its functionality. I did the same some time ago, check it: http://git.overlays.gentoo.org/gitweb/?p=dev/nelchael.git;a=blob;f=scripts/eshowkw.py. Hehe was not aware of that, thats why i hate when people put their scripts into overlays and not to some common repo :) Yeah - I know :) Also it does not work for me at all: sca...@ugly-elf: ~ $ eshowkw.py kdelibs Traceback (most recent call last): File /usr/local/bin/eshowkw.py, line 174, in module showMe(myArch, portage.portdbapi(portage.settings['PORTDIR']), pkg) File /usr/lib64/portage/pym/portage/dbapi/porttree.py, line 95, in __init__ self.repositories = self.settings.repositories AttributeError: 'config' object has no attribute 'repositories' Works for me :P But I'm guessing - portage 2.2_rcsomething_huge, right? -- Krzysztof Pawlik nelchael at gentoo.org key id: 0xF6A80E46 desktop-misc, java, vim, kernel, python, apache... signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] New eshowkw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dne 26.10.2010 20:38, Krzysztof Pawlik napsal(a): nelch...@s-lappy ~$ time eshowkw gcc /dev/null real0m0.965s user0m0.900s sys 0m0.060s nelch...@s-lappy ~$ time /usr/bin/eshowkw gcc /dev/null real0m2.559s user0m0.544s sys 0m0.416s nelch...@s-lappy ~$ time eshowkw wine /dev/null real0m0.980s user0m0.876s sys 0m0.096s nelch...@s-lappy ~$ time /usr/bin/eshowkw wine /dev/null real0m6.873s user0m1.732s sys 0m0.896 Could you compare speed of your and mine script -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzHLxUACgkQHB6c3gNBRYfPZACgwap7j/7/rlVjt3BoyGrmvpPg laoAn0A1ww0GMpfWapeWu0VNQ2uI1FU0 =Xhgm -END PGP SIGNATURE-
Re: [gentoo-dev] New eshowkw
On 10/26/10 21:42, Tomáš Chvátal wrote: Dne 26.10.2010 20:38, Krzysztof Pawlik napsal(a): nelch...@s-lappy ~$ time eshowkw gcc /dev/null Could you compare speed of your and mine script Sure: nelch...@s-lappy ~/tmp$ time eshowkw gcc /dev/null real0m1.025s user0m0.924s sys 0m0.092s nelch...@s-lappy ~/tmp$ time ./eshowkwng.py gcc /dev/null real0m1.203s user0m1.124s sys 0m0.072s nelch...@s-lappy ~/tmp$ time /usr/bin/eshowkw gcc /dev/null real0m4.697s user0m0.584s sys 0m0.368s nelch...@s-lappy ~/tmp$ time eshowkw wine /dev/null real0m1.310s user0m0.952s sys 0m0.092s nelch...@s-lappy ~/tmp$ time ./eshowkwng.py wine /dev/null real0m1.425s user0m1.344s sys 0m0.076s nelch...@s-lappy ~/tmp$ time /usr/bin/eshowkw wine /dev/null real0m7.048s user0m1.596s sys 0m1.032s 0.1~0.2 sec is not noticeable much, so I can say that both versions are significantly faster than eshowkw from gentoolkit-dev :) (results for mine version of eshowkw are worse than previous because I'm running on the battery right now and have powersave governor set) -- Krzysztof Pawlik nelchael at gentoo.org key id: 0xF6A80E46 desktop-misc, java, vim, kernel, python, apache... signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] New eshowkw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dne 26.10.2010 18:13, Fabian Groffen napsal(a): Hi Tomáš, On 26-10-2010 17:39:04 +0200, Tomáš Chvátal wrote: So since I would like to have this script replace current eshowkw one I want to ask you for kind help on that script and review it and suggest improvements. If the script lack some feature you really want to use also let me know, maybe it wont be too hard to implement. I havent looked at your implementation, but regarding your screenshot, some questions, suggestions, remarks. I think you should implement some means of selecting which archs you want to plot. Preferably through some config file thing. I'd think of specifying per arch, and or using predefined sets, e.g. to remove all prefix arches, since they spoil any output with huge unreadable matrices. Have you ever played with rotating the view? Some keywords are awfully long, like sparc64-solaris. Most versions are shorter. In case the number of versions is small, you could even have the versions in columnar style (e.g. not vertical, just a column spanning a couple of chars), such that it is much better readable. Maybe consider a raw, tab, csv alike output format, for easy parsing by other scripts? Could perhaps handy to render it alternatively as xml, latex, etc. Maybe introduce some more natural language mode? E.g. some indication per version if all arches are keyworded, stable, per version what arches are still missing... Well whole concept of this eshowkw is completely modular, so these features, at least keywords selection and ommiting prefix stuff is quite easy to implement. Not sure about the csv/raw output, but again displaying is just one function, so it can be replaced :) For the missing archs i think we can highlight all other achs if they are lagging behind other and similar. Thanks for pointers Also so far only i wrote this stuff so i would like to ask if anyone wants to chip in and help me (specially with profiling that thing and making it faster, as i am not python programmer) Tom -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzHQagACgkQHB6c3gNBRYd4xwCcDK+XJLz9+pVIpjcoLG3MtJHC aGoAn1C+8OQ8r2mH90+PysRdQK2vAGI3 =CQss -END PGP SIGNATURE-
Re: [gentoo-dev] New eshowkw
On Tue, 26 Oct 2010 18:13:25 +0200 Fabian Groffen grob...@gentoo.org wrote: On 26-10-2010 17:39:04 +0200, Tomáš Chvátal wrote: So since I would like to have this script replace current eshowkw one I want to ask you for kind help on that script and review it and suggest improvements. Great work! I think you should implement some means of selecting which archs you want to plot. Preferably through some config file thing. I'd think of specifying per arch, and or using predefined sets, e.g. to remove all prefix arches, since they spoil any output with huge unreadable matrices. +1. In fact my adapted version of the /old/ eshowkw already filters everything after the line '^# Prefix keywords$' in profiles/arch.list, simply because the entire bunch arch.list entries makes the output broader than what happens to be my default $COLUMNS of 87, which breaks the layout, and because I hardly ever need to know about the prefix keywording. Alternatively to arch.list, the script might be capable of parsing profiles.desc in order to establish which arches can go stable, by using information from the first and third columns, as well as getting the best option out of the third column, so 'stable' for an arch which also has 'dev' or 'exp' profiles. That could be used below. Have you ever played with rotating the view? Some keywords are awfully long, like sparc64-solaris. Most versions are shorter. In case the number of versions is small, you could even have the versions in columnar style (e.g. not vertical, just a column spanning a couple of chars), such that it is much better readable. +1. Maybe consider a raw, tab, csv alike output format, for easy parsing by other scripts? Could perhaps handy to render it alternatively as xml, latex, etc. +1. Combined with the arch masking option, this could easily show a package maintainer which arches to call on a stabilisation request. All too often an arch is forgotten or needlessly added, when a script parsing arch.list/profiles.desc could easily sort it out and even print a list of a...@gentoo.org aliases. jer
Re: [gentoo-dev] New eshowkw
Updated few function calls to fill empty spaces. Thanks to Michal (mgorny) for suggestions. Now it works a bit faster :) Tomas --- eshowkwng.py.old2010-10-27 00:13:21.476218699 +0200 +++ eshowkwng.py2010-10-27 00:11:33.929218700 +0200 @@ -34,32 +34,33 @@ Prepare list of aditional fileds displayed by eshowkw return [ 'unused', 'slot' ] - def __prepareChar(self, arch, position, count, maxlen, order = 'bottom', imp_arch = '', bold = False): + def __prepareChar(self, string, position, count, maxlen, imp_arch = '', order = 'bottom', bold = False): Return specified character for the list position. # first figure out what character we want to work with # based on order and position in the string - char = ' ' - if order == 'bottom' and (position maxlen) and (position = maxlen-len(arch)): - char = list(arch)[position-maxlen+len(arch)] - elif order == 'top' and position len(arch): - char = list(arch)[position] + if order == 'bottom': + string = string.rjust(maxlen) + else: + string = string.ljust(maxlen) + char = list(string)[position] + # figure out what color we want to use - if arch in imp_arch: + if string in imp_arch: color = 'blue' if char == ' ': color = 'bg_lightgray' - elif arch in self.__IMPARCHS: + elif string in self.__IMPARCHS: color = 'darkyellow' # colors - if arch in imp_arch or arch in self.__IMPARCHS: + if string in imp_arch or string in self.__IMPARCHS: char = colorize(color, char) # bolding if bold != False and count%2 == 0: char = colorize('bold', char) return char - def __rotateContent(self, string, length, order = 'bottom', imp_arch = '', bold = False): + def __rotateContent(self, lister, length, imp_arch = '', order = 'bottom', bold = False): Rotate string over 90 degrees: alpha - a @@ -69,21 +70,17 @@ a # join used to have list of lines rather than list of chars - return [' '.join([self.__prepareChar(line, i, count, length, order, imp_arch, bold) - for count, line in enumerate(string)]) + return [' '.join([self.__prepareChar(string, i, count, length, imp_arch, order, bold) + for count, string in enumerate(lister)]) for i in range(length)] def getFormatedKeywordsList(self): Return the formated output as one string for printout. return ''.join([x for x in self.__keywords_list]) - def __getVersionSpacer(self, length): - Generate spaces to have version string nicely aligned. - return ''.join([' ' for i in range(length)]) - def __prepareFormatting(self, rotated_keywords, rotated_additional, length): Format result for printout as list per line of content. - return ['%s| %s | %s\n' % (self.__getVersionSpacer(length), x, y) + return ['%s | %s | %s\n' % (''.rjust(length), x, y) for x, y in zip(rotated_keywords, rotated_additional)] def __init__(self, imp_arch, version_length, order, bold): @@ -98,10 +95,9 @@ self.keywords = self.__readKeywords() self.keywords = self.__sortKeywords(self.keywords) additional = self.__prepareAdditionalFields() - keywords_maxlen = reduce(lambda x, y: (x, y)[x y], - [len(str) for str in self.keywords]) - rotated_keywords = self.__rotateContent(self.keywords, keywords_maxlen, order, imp_arch, bold) - rotated_additional = self.__rotateContent(additional, keywords_maxlen, order, imp_arch, bold) + keywords_maxlen = len(max(self.keywords)) + rotated_keywords = self.__rotateContent(self.keywords, keywords_maxlen, imp_arch, order, bold) + rotated_additional = self.__rotateContent(additional, keywords_maxlen, imp_arch, order, bold) self.__keywords_list = self.__prepareFormatting(rotated_keywords, rotated_additional, version_length) self.keywords_count = len(self.keywords) self.additional_count = len(additional) @@ -115,17 +111,16 @@ def __listRedundant(self, keywords, ignore_slots, slots): List all redundant packages.