[gentoo-dev] Re: Lastrite: media-gfx/pngcrush

2011-10-09 Thread Duncan
Tomáš Chvátal posted on Sat, 08 Oct 2011 17:29:52 +0200 as excerpted:

 Guys,
 the policy makes perfect sense, there are people that sync just monthly,
 so they might want to get some headsup why their packages are going
 away, and not just remove them.
 
 Thats why the recommended value is 60 days, 30 for urgent cases, lately
 we just moved to 30 for everything, but please stick with that,
 do not make it lower.
 
 This is not about waiting for maintainer, or slowing up distro, but
 letting our users to catch up with what we do.
 
 As a side note masked packages CAN be broken, so the stab can proceed
 from the point you mask all the broken ones.

++

Mask it now, do the libpng thing in 14 days (or even sooner if all to-be-
broken packages are masked), but leave the masked packages for the full 
30 days as the policy states.

Libpng isn't held up that way, while the package still gets its 30 day 
masking last-rites.  No policy broken; no maintainer toes stepped on as a 
result of the broken policy.  No more nasty threads about (this) broken 
policy and unhappy maintainers as a result! =:^)

-- 
Duncan - List replies preferred.   No HTML msgs.
Every nonfree program has a lord, a master --
and if you use the program, he is your master.  Richard Stallman




[gentoo-dev] gdk-pixbuf-query-loaders usage in tree

2011-10-09 Thread Fabio Erculiani
gdk-pixbuf-query-loaders has a long history of segfaults.
Not to blame anybody here, but still segfaults there can happen quite easily.

A nice example is:
export __GL_NO_DSO_FINALIZER=1
$ gdk-pixbuf-query-loaders
When nvidia.ko is in use.

The __GL_NO_DSO_FINALIZER is a hack that made buggy nvidia-drivers (or
buggy gl threads usage?) work.
The problem with our ebuilds is that everybody did something like this
(in pkg_postinst):

gdk-pixbuf-query-loaders  ${ROOT}usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache

1) exit status is not even considered
2) output redirection truncates the destination file as soon as the
executable is spawned

This is very bad, because in case of segfaults, loaders.cache is
totalled, resulting in gtk+ apps dying miserably.

Please don't do that, never ever. We don't live in a perfect world.

x11-libs/gdk-pixbuf got fixed already.

Others affected:
app-emulation/emul-linux-x86-gtklibs
gnome-base/librsvg
media-libs/libwmf
others?

-- 
Fabio Erculiani
http://lxnay.com



[gentoo-dev] [PATCH autotools-utils] Use elibtoolize from libtool.eclass to fix libtool magic.

2011-10-09 Thread Michał Górny
We're calling it with '--patch-only' to avoid heavy changes to ebuilds.
This should handle gracefully eautoreconfed packages and those not using
libtool as well (in worst case, it should try to apply patches twice).
---
 autotools-utils.eclass |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/autotools-utils.eclass b/autotools-utils.eclass
index bae95a1..b9655c8 100644
--- a/autotools-utils.eclass
+++ b/autotools-utils.eclass
@@ -89,7 +89,7 @@ case ${EAPI:-0} in
*) die EAPI=${EAPI} is not supported ;;
 esac
 
-inherit autotools base eutils
+inherit autotools base eutils libtool
 
 EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
 
@@ -212,6 +212,7 @@ autotools-utils_src_prepare() {
debug-print-function ${FUNCNAME} $@
 
base_src_prepare
+   elibtoolize --patch-only
 }
 
 # @FUNCTION: autotools-utils_src_configure
-- 
1.7.7




Re: [gentoo-dev] Lastrite: media-gfx/pngcrush

2011-10-09 Thread Markos Chandras
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 10/09/11 02:47, Matt Turner wrote:
 On Sat, Oct 8, 2011 at 9:41 PM, Markos Chandras
 hwoar...@gentoo.org wrote:
 -BEGIN PGP SIGNED MESSAGE- Hash: SHA512
 
 On 10/08/11 22:45, Matt Turner wrote:
 On Sat, Oct 8, 2011 at 10:20 AM, Markos Chandras 
 hwoar...@gentoo.org wrote:
 On 10/08/2011 02:19 PM, Matt Turner wrote:
 On Sat, Oct 8, 2011 at 4:47 AM, Samuli Suominen 
 ssuomi...@gentoo.org wrote:
 # Samuli Suominen ssuomi...@gentoo.org (08 Oct 2011) # 
 Fails to compile against system libpng15, bug 356127 # 
 Removal in 14 days
 
 14 days?
 
 media-gfx/pngcrush
 
 We can't really wait forever for slacking maintainers to fix 
 their packages. amd64 is almost ready to have libpng-1.5
 stable in the very near future
 
 Two things:
 
 1) I'm *really* tired of the usage of the word slacking on
 this mailing list. If you or someone else wants to pay me to
 work on Gentoo, *then* you can tell me that I'm slacking.
 Otherwise, I'm a volunteer working on things that interest me
 in my free time. I truly do have more important things to do
 than to figure out how to port pngcrush to libpng1.5. Namely,
 graduate school and midterm exams.
 
 The bug is open since February (9 months). If you can't handle a
 bug in 9 months then maybe you should consider stepping down as
 a maintainer. Handling does not necessarily mean fixing. Masking
 could be an acceptable solution as well. The fact that nobody
 pays us does not mean that we can use that as an excuse for lower
 the QA barrier of portage tree. If only I got a $1 everytime I
 hear this excuse...
 
 Maybe you could check the fucking changelog and see that I added 
 myself as a maintainer in August?
 
 Don't ever ask me for anything again.
 
Watch your language. This is not your $home playroom

- -- 
Regards,
Markos Chandras / Gentoo Linux Developer / Key ID: B4AFF2C2
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.18 (GNU/Linux)

iQIcBAEBCgAGBQJOkWbhAAoJEPqDWhW0r/LCvBYQAKFNFKaK0hxXYtCVWmPHcf7D
RIWs5LtXMXrAaJwR/YRCbIncsWxn6QvEaPKjmovO3WQ5AAOKcFdHMwFqhLipXPfS
Oyn0NAdwZjXFNrOwC88Usfhu0G5yMqqcbF3IucdR538cZS1UA045zmGdkSs1JObp
J7JF1Ac0xv/iVSMsUcvp8e6CNtet/dwj48FdG3gt5dM4F9KkJMwPd87UsomcvjPm
IZMAj+7+yG4JUfabXbBJK9FVw3tLMmBc67xBDyO0Jn4T7X3o6lUapySNHdWApH65
dSPxG5QhH1Knlv6xP238RG2R43AEqBWWyG5IQjim6VwOIE1Z0rYLI+MfvQDHdyFy
BjX+HdXCRoMqsOVvBYvNUAx9yG+5b7iJFsIOKjlE7xaRDA1L/U6+Ltw8xG2ETosO
/0zq9MNvSnUXAvwyvyENcZj3Dnq+TYo67Se7WUIbhtbcT3XIKEo0Fn3FRufCEJIO
AIjm1/8GI1vIgyfzbVlGgiS0POnrR2sb9jpvcy+7GFADY60TwLT9NgbuIGsO5aK8
ykbUEfNqqxOB7S3KwbEVafDX4FLRnS8nk3vH13jz9wDUlfr/wQ6B8Su5eEEtE3zy
FrX4Hqyx+QyncuHyzABqehVVP0H8fyUrpIj07NwA4AaR9kuY6appZftGxxrYl5H4
0cOpv+TR4hLn+iBCbuGF
=7iBJ
-END PGP SIGNATURE-



Re: [gentoo-dev] Lastrite: media-gfx/pngcrush

2011-10-09 Thread Matt Turner
On Sun, Oct 9, 2011 at 5:18 AM, Markos Chandras hwoar...@gentoo.org wrote:
 Watch your language. This is not your $home playroom

And it's not your mailing list.

I'm sure I'm not the only one that's tired of your Let Me Insert
Myself Into Everything syndrome just because you're on QA. QA's a joke
that's only used as a stick to bludgeon other developers with.



Re: [gentoo-dev] Lastrite: media-gfx/pngcrush

2011-10-09 Thread Markos Chandras
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 10/09/11 16:15, Matt Turner wrote:
 On Sun, Oct 9, 2011 at 5:18 AM, Markos Chandras
 hwoar...@gentoo.org wrote:
 Watch your language. This is not your $home playroom
 
 And it's not your mailing list.
 
 I'm sure I'm not the only one that's tired of your Let Me Insert 
 Myself Into Everything syndrome just because you're on QA. QA's a
 joke that's only used as a stick to bludgeon other developers
 with.
 
I am not in QA fwiw just trying to keep a basic QA level in portage tree.

- -- 
Regards,
Markos Chandras / Gentoo Linux Developer / Key ID: B4AFF2C2
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.18 (GNU/Linux)

iQIcBAEBCgAGBQJOkbwZAAoJEPqDWhW0r/LC8JUP/jAFGT5tDyeqg8jr+WxYp/Z5
YQzadcHOh6vhM60O+mTJeC8ycwRn/fBQXLzvYRtcUytkrUjreBKNwQbvfyPK9F/g
4cW2pwa+QH9w/lGHhsdvvl6qV3rBWZu8BzTUkclIuSLwWrOfBE/Gn/WahBT3wLbw
msjBq837FTTukQUKnFf8HBIotiiikecniNvuINjGKvPmts9C8O5Vu5QOIhNQKltC
mtF9rC9uAuSJuc5m46YCB8RLZpQpw0eZogfCBryRRnd5jv7/B1bTbKfTAtWmwHdf
fXvdAzPsDrb5otRuZYGfmmYtN1tItV87L6kjt8YxT5mv/Gaq4Udy+h32hAOjZJzy
DlsF3xhdZfzVUvEHEkKCxcVqQLBP5LaWmCTOcKYZL8NzZRoLbuOo9VPozc+ayRid
LI13urz7C2fEsb52dWCpO439reZtmWuFTjzIc41p3kMKmbB8ZgvI1HLESQQp6uK4
aGavTdac64rB/iR/jbnnkNvgrC+zPzgjV7eUKELH77krhJ/Jq+LWPY8RMYs3Km1n
+60PzfumFVEp2C/Nk7efOip66QRuNUNU040l3AIGNNFM56OLIJuONXx4uOUViyc0
SszGzPF0OVNzRWMX2Z4BlMkSgpOneInf4v3Ak0EqX/W/0xo/FnDzLCUtik8KwTMz
elVdrJNXCjXa7O+srCE1
=s+wQ
-END PGP SIGNATURE-



Re: [gentoo-dev] GCC upgrades, FUD and gentoo documentation

2011-10-09 Thread James Cloos
 MT == Matt Turner matts...@gentoo.org writes:

MT Is that a problem with the ABI, or just that gcc-4.6 is more strict?
MT I think it's the latter.

The failure occurs at the linking stage, not the compiling stage.

Ie, ln(1) cannot find some of the symbols it needs if the .so was
compiled with 4.5 and the .o files with 4.6.

Which looks like an ABI issue, yes?

Again, though, only for some libs.  And I do not remember which.

-JimC
-- 
James Cloos cl...@jhcloos.com OpenPGP: 1024D/ED7DAEA6



Re: [gentoo-dev] Re: Lastrite: media-gfx/pngcrush

2011-10-09 Thread Chí-Thanh Christopher Nguyễn
Duncan schrieb:
 Libpng isn't held up that way, while the package still gets its 30 day 
 masking last-rites.  No policy broken; no maintainer toes stepped on as a 
 result of the broken policy.  No more nasty threads about (this) broken 
 policy and unhappy maintainers as a result! =:^)

Actually removing a package that doesn't violate any (written) rules
without maintainer consensus could be considered a violation of policy too.

http://www.gentoo.org/proj/en/devrel/recruiters/mentor.xml
Respect existing maintainers:
Never commit when someone else has clear ownership. Never commit on
things with unclear ownership until you've tried to clear it up.


Best regards,
Chí-Thanh Christopher Nguyễn



[gentoo-dev] [PATCH xorg-2] Update fonts.scale fonts.dir on font removal.

2011-10-09 Thread Michał Górny
This way, user won't end up with invalid fonts in the listings (and thus
segfaulting xfontsel).

Fixes: https://bugs.gentoo.org/show_bug.cgi?id=384649
---
 xorg-2.eclass |   26 +-
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/xorg-2.eclass b/xorg-2.eclass
index 173f7bf..f7dee80 100644
--- a/xorg-2.eclass
+++ b/xorg-2.eclass
@@ -478,7 +478,11 @@ xorg-2_src_install() {
 xorg-2_pkg_postinst() {
debug-print-function ${FUNCNAME} $@
 
-   [[ -n ${FONT} ]]  setup_fonts $@
+   if [[ -n ${FONT} ]]; then
+   create_fonts_scale
+   create_fonts_dir
+   font_pkg_postinst $@
+   fi
 }
 
 # @FUNCTION: xorg-2_pkg_postrm
@@ -488,18 +492,14 @@ xorg-2_pkg_postinst() {
 xorg-2_pkg_postrm() {
debug-print-function ${FUNCNAME} $@
 
-   [[ -n ${FONT} ]]  font_pkg_postrm $@
-}
-
-# @FUNCTION: setup_fonts
-# @DESCRIPTION:
-# Generates needed files for fonts and fixes font permissions
-setup_fonts() {
-   debug-print-function ${FUNCNAME} $@
-
-   create_fonts_scale
-   create_fonts_dir
-   font_pkg_postinst
+   if [[ -n ${FONT} ]]; then
+   # if we're doing an upgrade, postinst will do
+   if [[ ${EAPI} -lt 4 || -z ${REPLACED_BY_VERSION} ]]; then
+   create_fonts_scale
+   create_fonts_dir
+   font_pkg_postrm $@
+   fi
+   fi
 }
 
 # @FUNCTION: remove_font_metadata
-- 
1.7.7




Re: [gentoo-dev] GCC upgrades, FUD and gentoo documentation

2011-10-09 Thread Matt Turner
On Sun, Oct 9, 2011 at 4:35 PM, James Cloos cl...@jhcloos.com wrote:
 MT == Matt Turner matts...@gentoo.org writes:

 MT Is that a problem with the ABI, or just that gcc-4.6 is more strict?
 MT I think it's the latter.

 The failure occurs at the linking stage, not the compiling stage.

 Ie, ln(1) cannot find some of the symbols it needs if the .so was
 compiled with 4.5 and the .o files with 4.6.

 Which looks like an ABI issue, yes?

 Again, though, only for some libs.  And I do not remember which.

Right, if it fails at link time, it's possibly an ABI incompatibility.
I just haven't ever experienced this myself.

Matt



[gentoo-dev] Re: Lastrite: media-gfx/pngcrush

2011-10-09 Thread Duncan
Chí-Thanh Christopher Nguyễn posted on Sun, 09 Oct 2011 18:37:59 +0200 as
excerpted:

 Duncan schrieb:
 Libpng isn't held up that way, while the package still gets its 30 day
 masking last-rites.  No policy broken; no maintainer toes stepped on as
 a result of the broken policy.  No more nasty threads about (this)
 broken policy and unhappy maintainers as a result! =:^)
 
 Actually removing a package that doesn't violate any (written) rules
 without maintainer consensus could be considered a violation of policy
 too.
 
 http://www.gentoo.org/proj/en/devrel/recruiters/mentor.xml Respect
 existing maintainers:
 Never commit when someone else has clear ownership. Never commit on
 things with unclear ownership until you've tried to clear it up.

You are correct, but AFAIK, that's one function of tree-cleaners (whether 
or not the remover is actually on the tree-cleaner team), when packages 
are broken due to going stale against current, and the bugs reporting the 
problem remain open for months without (visible) movement (there's some 
movement here, yes, but was it visible?).

That's actually why the 30-day mask is so important and it's so 
distressing to see people trying to cut it short.  Masking has a way of 
waking people (maintainers and others) up if they actually use the 
package, and gives a chance for reprieve.

But if that 30-day-mask time is cut short, it really does throw a wrench 
into things due to interactions with p-space (physical-space), like 
vacations, etc, especially considering that Gentoo is volunteers.  Coming 
back from a vacation to see that one's package has been removed and the 
30-day-mask-time cut short so it all happened while one was on (2-week) 
vacation is a rude thing indeed to have happen, and maintainers *should* 
be complaining!  I'd be raising holy cow! (... tho with council and on 
-core as appropriate, the making of the sausage wouldn't /all/ have to be 
in the open!)

So, please, at LEAST honor the 30-day-in-mask bit.  And if someone steps 
up to rescue during that time, let's give them some time to do so.  One 
can /hope/ both sides will be reasonable here and if something's removed 
in an untimely manner, or even at the end of the 30 days if the timing 
simply worked out badly and the person couldn't get to it until day 31 or 
35, it can be returned but kept in a masked state for another month or 
two, if necessary, without having to further nail down in written policy 
that end of things, but right now, we're not even getting to that point.  
Let's at least let the established policy work the way it was intended, 
giving someone time to step up and do the rescue.

Meanwhile, once the package is masked, don't let it hold up the normal 
update process with other packages. (Tho ideally there's cooperation in 
this aspect as well, but again, we're not even getting to the point where 
that's an issue.  Right now, existing written policies are being violated 
for questionable-at-best reasons; obviously if something's discovered to 
have been back-doored or the like, that would be rather beyond 
questionable-at-best!  But of course that'd be security not just
tree-cleaners/qa.)

-- 
Duncan - List replies preferred.   No HTML msgs.
Every nonfree program has a lord, a master --
and if you use the program, he is your master.  Richard Stallman




[gentoo-dev] Automated Package Removal and Addition Tracker, for the week ending 2011-10-09 23h59 UTC

2011-10-09 Thread Robin H. Johnson
The attached list notes all of the packages that were added or removed
from the tree, for the week ending 2011-10-09 23h59 UTC.

Removals:
app-text/libtextcat 2011-10-04 19:19:06 
scarabeus
app-text/ptex   2011-10-06 20:14:12 aballier

Additions:
net-im/qutecom  2011-10-03 08:08:29 chithanh
dev-cpp/libcmis 2011-10-03 08:54:32 
scarabeus
media-gfx/zbar  2011-10-03 16:13:50 xmw
dev-util/makeheaders2011-10-03 16:37:14 xmw
net-p2p/ncdc2011-10-03 16:38:37 xmw
app-text/libexttextcat  2011-10-04 19:16:52 
scarabeus
dev-ruby/bcrypt-ruby2011-10-05 18:20:27 graaff
net-libs/dslib  2011-10-05 20:18:57 
scarabeus
app-misc/dsgui  2011-10-05 20:22:21 
scarabeus
media-gfx/mcomix2011-10-06 03:12:40 
dirtyepic
dev-ruby/rack-cache 2011-10-06 18:09:53 graaff
dev-lang/nacl-toolchain-newlib  2011-10-06 18:52:19 
phajdan.jr
dev-ruby/hike   2011-10-07 06:26:37 graaff
net-print/sshlpr2011-10-08 06:26:41 
radhermit
app-arch/TheUnarchiver  2011-10-08 18:12:47 hanno
net-print/cups-bjnp 2011-10-08 18:22:59 vadimk
sci-biology/bedtools2011-10-09 04:01:53 weaver
media-gfx/png2ico   2011-10-09 09:04:00 
ssuominen
dev-python/pypax2011-10-09 14:19:31 blueness
net-analyzer/openvas-scanner2011-10-09 17:18:04 hanno
net-analyzer/openvas-administrator  2011-10-09 17:21:05 hanno
net-analyzer/openvas-manager2011-10-09 17:22:54 hanno
net-analyzer/openvas-cli2011-10-09 17:24:57 hanno
net-analyzer/greenbone-security-assistant   2011-10-09 17:29:41 hanno
net-analyzer/greenbone-security-desktop 2011-10-09 17:33:38 hanno

--
Robin Hugh Johnson
Gentoo Linux Developer
E-Mail : robb...@gentoo.org
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85
Removed Packages:
app-text/libtextcat,removed,scarabeus,2011-10-04 19:19:06
app-text/ptex,removed,aballier,2011-10-06 20:14:12
Added Packages:
net-im/qutecom,added,chithanh,2011-10-03 08:08:29
dev-cpp/libcmis,added,scarabeus,2011-10-03 08:54:32
media-gfx/zbar,added,xmw,2011-10-03 16:13:50
dev-util/makeheaders,added,xmw,2011-10-03 16:37:14
net-p2p/ncdc,added,xmw,2011-10-03 16:38:37
app-text/libexttextcat,added,scarabeus,2011-10-04 19:16:52
dev-ruby/bcrypt-ruby,added,graaff,2011-10-05 18:20:27
net-libs/dslib,added,scarabeus,2011-10-05 20:18:57
app-misc/dsgui,added,scarabeus,2011-10-05 20:22:21
media-gfx/mcomix,added,dirtyepic,2011-10-06 03:12:40
dev-ruby/rack-cache,added,graaff,2011-10-06 18:09:53
dev-lang/nacl-toolchain-newlib,added,phajdan.jr,2011-10-06 18:52:19
dev-ruby/hike,added,graaff,2011-10-07 06:26:37
net-print/sshlpr,added,radhermit,2011-10-08 06:26:41
app-arch/TheUnarchiver,added,hanno,2011-10-08 18:12:47
net-print/cups-bjnp,added,vadimk,2011-10-08 18:22:59
sci-biology/bedtools,added,weaver,2011-10-09 04:01:53
media-gfx/png2ico,added,ssuominen,2011-10-09 09:04:00
dev-python/pypax,added,blueness,2011-10-09 14:19:31
net-analyzer/openvas-scanner,added,hanno,2011-10-09 17:18:04
net-analyzer/openvas-administrator,added,hanno,2011-10-09 17:21:05
net-analyzer/openvas-manager,added,hanno,2011-10-09 17:22:54
net-analyzer/openvas-cli,added,hanno,2011-10-09 17:24:57
net-analyzer/greenbone-security-assistant,added,hanno,2011-10-09 17:29:41
net-analyzer/greenbone-security-desktop,added,hanno,2011-10-09 17:33:38

Done.

Re: [gentoo-dev] [PATCH autotools-utils] Use elibtoolize from libtool.eclass to fix libtool magic.

2011-10-09 Thread Donnie Berkholz
On 10:21 Sun 09 Oct , Michał Górny wrote:
 We're calling it with '--patch-only' to avoid heavy changes to ebuilds.
 This should handle gracefully eautoreconfed packages and those not using
 libtool as well (in worst case, it should try to apply patches twice).

What kind of testing have you done?

-- 
Thanks,
Donnie

Donnie Berkholz
Council Member / Sr. Developer
Gentoo Linux
Blog: http://dberkholz.com


pgpqkkgxxy6L7.pgp
Description: PGP signature


[gentoo-portage-dev] [PATCH 2/4] tests: split up getTests into helper funcs to avoid duplication

2011-10-09 Thread Mike Frysinger
This avoids a little duplication between the getTestFromCommandLine and
getTests funcs, and they'll get utilized even more in follow up patches.

Signed-off-by: Mike Frysinger vap...@gentoo.org
---
 pym/portage/tests/__init__.py |   37 +
 1 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/pym/portage/tests/__init__.py b/pym/portage/tests/__init__.py
index 3897aba..7f1ed3f 100644
--- a/pym/portage/tests/__init__.py
+++ b/pym/portage/tests/__init__.py
@@ -55,7 +55,7 @@ def my_import(name):
return mod
 
 def getTestFromCommandLine(args, base_path):
-   ret = []
+   result = []
for arg in args:
realpath = os.path.realpath(arg)
path = os.path.dirname(realpath)
@@ -65,29 +65,16 @@ def getTestFromCommandLine(args, base_path):
raise Exception(Invalid argument: '%s' % arg)
 
mymodule = f[:-3]
+   result.extend(getTestsFromFiles(path, base_path, [mymodule]))
+   return result
 
-   parent_path = path[len(base_path)+1:]
-   parent_module = ..join((portage, tests, parent_path))
-   parent_module = parent_module.replace('/', '.')
-   result = []
-
-   # Make the trailing / a . for module importing
-   modname = ..join((parent_module, mymodule))
-   mod = my_import(modname)
-   ret.append(unittest.TestLoader().loadTestsFromModule(mod))
-   return ret
-
-def getTests(path, base_path):
-   
-
-   path is the path to a given subdir ( 'portage/' for example)
-   This does a simple filter on files in that dir to give us modules
-   to import
-
-   
+def getTestNames(path):
files = os.listdir(path)
files = [ f[:-3] for f in files if f.startswith(test) and 
f.endswith(.py) ]
files.sort()
+   return files
+
+def getTestsFromFiles(path, base_path, files):
parent_path = path[len(base_path)+1:]
parent_module = ..join((portage, tests, parent_path))
parent_module = parent_module.replace('/', '.')
@@ -99,6 +86,16 @@ def getTests(path, base_path):
result.append(unittest.TestLoader().loadTestsFromModule(mod))
return result
 
+def getTests(path, base_path):
+   
+
+   path is the path to a given subdir ( 'portage/' for example)
+   This does a simple filter on files in that dir to give us modules
+   to import
+
+   
+   return getTestsFromFiles(path, base_path, getTestNames(path))
+
 class TextTestResult(_TextTestResult):

We need a subclass of unittest._TextTestResult to handle tests with TODO
-- 
1.7.6.1




[gentoo-portage-dev] [PATCH 1/4] runtests: make sure we are in the right dir

2011-10-09 Thread Mike Frysinger
The code assumes we're in the top of the tree (when it tries to run with
the full path pym/portage/tests/runTests), so try to make sure we are
in the right place to allow things like `../runtests.sh` to just work.

Signed-off-by: Mike Frysinger vap...@gentoo.org
---
 runtests.sh |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/runtests.sh b/runtests.sh
index 981fa1e..d55860a 100755
--- a/runtests.sh
+++ b/runtests.sh
@@ -4,6 +4,9 @@
 
 PYTHON_VERSIONS=2.6 2.7 3.1 3.2 3.3
 
+# has to be run from portage root dir
+cd ${0%/*} || exit 1
+
 case ${NOCOLOR:-false} in
yes|true)
GOOD=
-- 
1.7.6.1