Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 463310 - dev-python/pymongo-2.5.1 test suite segfaults
Summary: dev-python/pymongo-2.5.1 test suite segfaults
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Johan Bergström
URL:
Whiteboard:
Keywords:
: 468226 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-03-26 05:58 UTC by Patrick Lauer
Modified: 2013-05-27 07:51 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
pymongo-2.5.1-r1.ebuild (pymongo-2.5.1-r1.ebuild,3.52 KB, text/plain)
2013-05-25 07:04 UTC, Johan Bergström
Details
pymongo-2.5.1-r1.ebuild (pymongo-2.5.1-r1.ebuild,3.33 KB, text/plain)
2013-05-25 13:26 UTC, Johan Bergström
Details
pymongo-2.5.1-r1.ebuild (pymongo-2.5.1-r1.ebuild,3.04 KB, text/plain)
2013-05-25 23:42 UTC, Johan Bergström
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2013-03-26 05:58:36 UTC
>>> Source compiled.
 * python2_7: running distutils-r1_run_phase python_test
 * Trying to start mongod on port 27017 ...
about to fork child process, waiting until server is ready for connections.
forked process: 23009
all output going to: /var/tmp/portage/dev-python/pymongo-2.5/temp/python2.7/mongod.log
child process started successfully, parent exiting                                                                                                                                                                                    [ ok ]
SSSS............................................S........S...........S..........................................................................................S............................S..............................................................................SS..............SSSSSSSSSSSSSSSSSSSSSSS.....................................SSSSSSSSSSSSSSSSSSSSSSSS.SSSSSSSSSS.S....SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...........ESSSSSSSS.S.....SSSSSS............
======================================================================
ERROR: Tests various ssl configurations
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pymongo-2.5/work/pymongo-2.5/test/test_ssl.py", line 118, in test_config_ssl
    ssl_certfile=CLIENT_PEM)
  File "/usr/lib/python2.7/unittest/case.py", line 471, in assertRaises
    callableObj(*args, **kwargs)
  File "/var/tmp/portage/dev-python/pymongo-2.5/work/pymongo-2.5/pymongo/mongo_client.py", line 258, in __init__
    option, value = common.validate(option, value)
  File "/var/tmp/portage/dev-python/pymongo-2.5/work/pymongo-2.5/pymongo/common.py", line 237, in validate
    value = validator(option, value)
  File "/var/tmp/portage/dev-python/pymongo-2.5/work/pymongo-2.5/pymongo/common.py", line 78, in validate_readable
    open(value, 'r').close()
IOError: [Errno 2] No such file or directory: '/var/tmp/portage/dev-python/pymongo-2.5/work/pymongo-2.5/test/certificates/client.pem'

----------------------------------------------------------------------
Ran 468 tests in 78.924s

FAILED (SKIP=122, errors=1)
Tue Mar 26 05:49:01.691 
Tue Mar 26 05:49:01.691 warning: 32-bit servers don't have journaling enabled by default. Please use --journal if you want durability.
Tue Mar 26 05:49:01.691 
killing process with pid: 23009
 * ERROR: dev-python/pymongo-2.5 failed (test phase):
 *   Tests fail with python2.7


Portage 2.1.11.57 (default/linux/x86/13.0, gcc-4.6.3, glibc-2.16.0, 3.7.9-vs2.3.5.6 i686)
=================================================================
System uname: Linux-3.7.9-vs2.3.5.6-i686-AMD_Phenom-tm-_II_X4_965_Processor-with-gentoo-2.2
KiB Mem:     7921088 total,   1893412 free
KiB Swap:   25165812 total,  24737780 free
Timestamp of tree: Unknown
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.69
sys-devel/automake:       1.12.6, 1.13.1
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.8 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm gpm iconv ipv6 modules mudflap ncurses nls nptl openmp pam pcre readline session ssl tcpd unicode x86 zlib" ABI_X86="32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="dummy" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Ian Delaney (RETIRED) gentoo-dev 2013-04-05 07:35:03 UTC
I actually get

child process started successfully, parent exiting                                                             [ ok ]
/mnt/gen2/TmpDir/portage/dev-python/pymongo-2.5/temp/environment: line 3533:  8011 Segmentation fault      nosetests
killing process with pid: 7710
Comment 2 Patrick Lauer gentoo-dev 2013-04-15 09:00:50 UTC
>>> Source compiled.
 * python2_7: running distutils-r1_run_phase python_test
 * Trying to start mongod on port 27017 ...
about to fork child process, waiting until server is ready for connections.
forked process: 28446
all output going to: /var/tmp/portage/dev-python/pymongo-2.5/temp/python2.7/mongod.log
child process started successfully, parent exiting                                                                                                                                                                                    [ ok ]
/var/tmp/portage/dev-python/pymongo-2.5/temp/environment: line 3537: 28763 Segmentation fault      nosetests
killing process with pid: 28446
 * ERROR: dev-python/pymongo-2.5 failed (test phase):
 *   Tests fail with python2.7
Comment 3 Bernie Hackett 2013-05-22 22:58:32 UTC
I'm not sure what the segfault is (is that from PyMongo?) but the missing test files are included in pymongo-2.5.1. See this commit:

https://github.com/mongodb/mongo-python-driver/commit/c0673df4eaeac3476cb8bf2bcc265319ae7ffa7f

If you guys actually want to file upstream bugs:

https://jira.mongodb.org/browse/PYTHON

I'm ultimately responsible and use gentoo for everything.
Comment 4 Johan Bergström 2013-05-23 21:35:45 UTC
*** Bug 468226 has been marked as a duplicate of this bug. ***
Comment 5 Johan Bergström 2013-05-23 23:20:34 UTC
(In reply to comment #3)
> I'm not sure what the segfault is (is that from PyMongo?) but the missing
> test files are included in pymongo-2.5.1. See this commit:
> 
> https://github.com/mongodb/mongo-python-driver/commit/
> c0673df4eaeac3476cb8bf2bcc265319ae7ffa7f
> 
> If you guys actually want to file upstream bugs:
> 
> https://jira.mongodb.org/browse/PYTHON
> 
> I'm ultimately responsible and use gentoo for everything.

Hey Bernie, great to hear that upstream also likes this ultra-cool linux dist 8-)

So, a couple of things probably needs to be done here.

1) I also get segfaults (in libpython), needs more investigation
2) Our current src_test will try to launch a server from 27017 and forward, but the nose test suite assumes we use 27017. Would you consider passing port and/or socket to the test suite? It's probably good practise to avoid using the current mongodb instance for tests anyway?
3) As for Patrick's particular issue (certificate), I can at least say that it works for me in 2.5.1:

Ran 478 tests in 70.651s
OK (SKIP=129)

4) Lets get this in shape! python@ or ultrabug@, I would suggest starting off with renaming 2.5 to 2.5.1, and in parallel investigate segfaults and improve the test suite. For now, we could just sed port (and socket) to whatever we use.
Comment 6 Johan Bergström 2013-05-23 23:22:35 UTC
(In reply to comment #5)
> So, a couple of things probably needs to be done here.
> 
> 1) I also get segfaults (in libpython), needs more investigation

Vital missing detail: the segfaults only occur while using emerge,
not running them by invoking nosetests myself. I'm using FEATURES="userpriv user sandbox"

> 2) Our current src_test will try to launch a server from 27017 and forward,
> but the nose test suite assumes we use 27017. Would you consider passing
> port and/or socket to the test suite? It's probably good practise to avoid
> using the current mongodb instance for tests anyway?
> 3) As for Patrick's particular issue (certificate), I can at least say that
> it works for me in 2.5.1:
> 
> Ran 478 tests in 70.651s
> OK (SKIP=129)
> 
> 4) Lets get this in shape! python@ or ultrabug@, I would suggest starting
> off with renaming 2.5 to 2.5.1, and in parallel investigate segfaults and
> improve the test suite. For now, we could just sed port (and socket) to
> whatever we use.
Comment 7 Bernie Hackett 2013-05-24 01:18:47 UTC
> Hey Bernie, great to hear that upstream also likes this ultra-cool linux
> dist 8-)

I've been using gentoo since you had to build from stage 1. PyMongo has been developed on it the entire time I've been maintainer. =)

> 1) I also get segfaults (in libpython), needs more investigation

No idea what that's about. I suspect it has something to do with running the tests through emerge.

> 2) Our current src_test will try to launch a server from 27017 and forward,
> but the nose test suite assumes we use 27017. Would you consider passing
> port and/or socket to the test suite? It's probably good practise to avoid
> using the current mongodb instance for tests anyway?

Well, you can set env variables for it:

https://github.com/mongodb/mongo-python-driver/blob/master/test/__init__.py#L26-L34

> 3) As for Patrick's particular issue (certificate), I can at least say that
> it works for me in 2.5.1:
> 
> Ran 478 tests in 70.651s
> OK (SKIP=129)

Great!

> 4) Lets get this in shape! python@ or ultrabug@, I would suggest starting
> off with renaming 2.5 to 2.5.1, and in parallel investigate segfaults and
> improve the test suite. For now, we could just sed port (and socket) to
> whatever we use.

I noticed 432552 a while ago (trying to run PyMongo's tests under emerge with python 3.x). When I did py3k support the version of nose in portage didn't support running 2to3, so there were some hacks I added to setup.py to make things work right. Clearly the hacks don't play well with emerge. I'm planning to revisit all that now that the latest nose is available. Hopefully with version 2.6 you can make it available in 3.x.
Comment 8 Ian Delaney (RETIRED) gentoo-dev 2013-05-24 08:26:13 UTC
I think the segfault originates from test_socket_reclamation, but since I can no longer even get the tests started I'm going from memory when I ran it and the mongod did start, so I can't replicate it
Comment 9 Johan Bergström 2013-05-25 05:52:23 UTC
2.5.1 in tree, fixes missing certificates (upstream). Lets focus on the segfault and improving test ports next.
Comment 10 Johan Bergström 2013-05-25 07:04:53 UTC
Created attachment 349112 [details]
pymongo-2.5.1-r1.ebuild

The segfault seemed to originate from nosetests using wrong python version. Here's the full error:

======================================================================
ERROR: Failure: AttributeError (PyCapsule_Import "datetime.datetime_CAPI" is not valid)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/nose/loader.py", line 413, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib64/python2.6/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib64/python2.6/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/var/tmp/portage/dev-python/pymongo-2.5.1/work/pymongo-2.5.1-python2_7/test/__init__.py", line 20, in <module>
    import pymongo
  File "/var/tmp/portage/dev-python/pymongo-2.5.1/work/pymongo-2.5.1-python2_7/lib/pymongo/__init__.py", line 80, in <module>
    from pymongo.connection import Connection
  File "/var/tmp/portage/dev-python/pymongo-2.5.1/work/pymongo-2.5.1-python2_7/lib/pymongo/connection.py", line 39, in <module>
    from pymongo.mongo_client import MongoClient
  File "/var/tmp/portage/dev-python/pymongo-2.5.1/work/pymongo-2.5.1-python2_7/lib/pymongo/mongo_client.py", line 44, in <module>
    from bson.py3compat import b
  File "/var/tmp/portage/dev-python/pymongo-2.5.1/work/pymongo-2.5.1-python2_7/lib/bson/__init__.py", line 41, in <module>
    from bson import _cbson
AttributeError: PyCapsule_Import "datetime.datetime_CAPI" is not valid

----------------------------------------------------------------------



Attached is an updated 2.5.1 ebuild:

1. support python 3.x
2. fix test segfaults
3. make sure we pass the DB_PORT we actually use our selves

I unfortunately get 4 (two distinct) new test errors. These only occur
when passing DB_PORT=27018. I initially thought it was related to differences
in mongodb startup flags, but after changing port in the mongodb init
script, I still got the same result:
======================================================================
ERROR: test_document_class (test.test_master_slave_connection.TestMasterSlaveConnection)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pymongo-2.5.1/work/pymongo-2.5.1-python2_7/test/test_master_slave_connection.py", line 472, in test_document_class
    db.test.insert({"x": 1}, w=w)
  File "/var/tmp/portage/dev-python/pymongo-2.5.1/work/pymongo-2.5.1-python2_7/lib/pymongo/collection.py", line 357, in insert
    continue_on_error, self.__uuid_subtype), safe)
  File "/var/tmp/portage/dev-python/pymongo-2.5.1/work/pymongo-2.5.1-python2_7/lib/pymongo/master_slave_connection.py", line 162, in _send_message
    return self.__master._send_message(message, with_last_error)
  File "/var/tmp/portage/dev-python/pymongo-2.5.1/work/pymongo-2.5.1-python2_7/lib/pymongo/mongo_client.py", line 920, in _send_message
    rv = self.__check_response_to_last_error(response)
  File "/var/tmp/portage/dev-python/pymongo-2.5.1/work/pymongo-2.5.1-python2_7/lib/pymongo/mongo_client.py", line 865, in __check_response_to_last_error
    raise OperationFailure(details["err"])
OperationFailure: norepl

======================================================================
FAIL: test_insert_find_one_with_slaves (test.test_master_slave_connection.TestMasterSlaveConnection)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pymongo-2.5.1/work/pymongo-2.5.1-python2_7/test/test_master_slave_connection.py", line 344, in test_insert_find_one_with_slaves
    self.assertTrue(count)
AssertionError: 0 is not true

----------------------------------------------------------------------

@Bernie, this might be relevant upstream. Want me to file a bug?
Comment 11 Johan Bergström 2013-05-25 07:07:45 UTC
(In reply to comment #10)
> I unfortunately get 4 (two distinct) new test errors. These only occur
> when passing DB_PORT=27018. I initially thought it was related to differences
> in mongodb startup flags, but after changing port in the mongodb init
> script, I still got the same result

Should probably note that I've verified this by calling nosetests myself with DB_PORT argument.

Without reading any source (pymongo nor mongodb) the assumption
that non-standard ports perhaps executes multi-server tests might be a reason?

>
> <snip>
>
> @Bernie, this might be relevant upstream. Want me to file a bug?
Comment 12 Johan Bergström 2013-05-25 12:51:36 UTC
(In reply to comment #10)
> Created attachment 349112 [details]
> pymongo-2.5.1-r1.ebuild
> 
> The segfault seemed to originate from nosetests using wrong python version.
> Here's the full error:
> 
> ======================================================================
> ERROR: Failure: AttributeError (PyCapsule_Import "datetime.datetime_CAPI" is
> not valid)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib64/python2.6/site-packages/nose/loader.py", line 413, in
> loadTestsFromName
>     addr.filename, addr.module)
>   File "/usr/lib64/python2.6/site-packages/nose/importer.py", line 47, in
> importFromPath
>     return self.importFromDir(dir_path, fqname)
>   File "/usr/lib64/python2.6/site-packages/nose/importer.py", line 94, in
> importFromDir
>     mod = load_module(part_fqname, fh, filename, desc)
>   File
> "/var/tmp/portage/dev-python/pymongo-2.5.1/work/pymongo-2.5.1-python2_7/test/
> __init__.py", line 20, in <module>
>     import pymongo
>   File
> "/var/tmp/portage/dev-python/pymongo-2.5.1/work/pymongo-2.5.1-python2_7/lib/
> pymongo/__init__.py", line 80, in <module>
>     from pymongo.connection import Connection
>   File
> "/var/tmp/portage/dev-python/pymongo-2.5.1/work/pymongo-2.5.1-python2_7/lib/
> pymongo/connection.py", line 39, in <module>
>     from pymongo.mongo_client import MongoClient
>   File
> "/var/tmp/portage/dev-python/pymongo-2.5.1/work/pymongo-2.5.1-python2_7/lib/
> pymongo/mongo_client.py", line 44, in <module>
>     from bson.py3compat import b
>   File
> "/var/tmp/portage/dev-python/pymongo-2.5.1/work/pymongo-2.5.1-python2_7/lib/
> bson/__init__.py", line 41, in <module>
>     from bson import _cbson
> AttributeError: PyCapsule_Import "datetime.datetime_CAPI" is not valid
> 
> ----------------------------------------------------------------------
> 

Upon closer inspection (and some help from mgorny), I've come to the conclusion
that above is incorrect. The reason for the segfault is that python
couldn't resolve all symbols in the c libraries that were newly built.

This is remedied in the above ebuild since we now copy tests and cd into
$BUILDDIR.
Comment 13 Johan Bergström 2013-05-25 13:26:41 UTC
Created attachment 349134 [details]
pymongo-2.5.1-r1.ebuild

(In reply to comment #11)
> (In reply to comment #10)
> > I unfortunately get 4 (two distinct) new test errors. These only occur
> > when passing DB_PORT=27018. I initially thought it was related to differences
> > in mongodb startup flags, but after changing port in the mongodb init
> > script, I still got the same result
> 
> Should probably note that I've verified this by calling nosetests myself
> with DB_PORT argument.
> 
> Without reading any source (pymongo nor mongodb) the assumption
> that non-standard ports perhaps executes multi-server tests might be a
> reason?

Just had a look. __init__.py assumes second and third host gets 27018 and 27019. This essentially makes 27018 passed twice.

@bernie: A suggested fix would perhaps be rewriting the config so it doesn't
assume that {host,port}[23] needs to be set?

As for now, we'll just pass "bogus" (DB_PORT+1, +2) values to the test runner.

Will run test suite on all pythons I have next. Feel free to chip in and try yourself.

> 
> >
> > <snip>
> >
> > @Bernie, this might be relevant upstream. Want me to file a bug?
Comment 14 Bernie Hackett 2013-05-25 15:36:59 UTC
Johan,

I just made comments very similar to yours here:

https://jira.mongodb.org/browse/PYTHON-521?focusedCommentId=345341&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-345341

Great minds think alike. :-)

Sounds like you've sorted most of the final issues. There are a couple final comments I added here that should probably be addressed:

https://jira.mongodb.org/browse/PYTHON-521?focusedCommentId=345348&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-345348

In the future we should probably keep the discussion in one bug tracker or the other. Just add me to the CC list on tickets here if you need my help.
Comment 15 Johan Bergström 2013-05-25 22:40:10 UTC
(In reply to Bernie Hackett from comment #14)
> Johan,
> 
> I just made comments very similar to yours here:
> 
> https://jira.mongodb.org/browse/PYTHON-521?focusedCommentId=345341&page=com.
> atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-345341
> 
> Great minds think alike. :-)
> 
> Sounds like you've sorted most of the final issues. There are a couple final
> comments I added here that should probably be addressed:
> 
> https://jira.mongodb.org/browse/PYTHON-521?focusedCommentId=345348&page=com.
> atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-345348
> 
> In the future we should probably keep the discussion in one bug tracker or
> the other. Just add me to the CC list on tickets here if you need my help.

I agree.

Since this ticket was a bit abused - mainly by me - the line was a bit unclear. In general, I think its better to stay within Gentoo's grounds until we've confirmed that it's not our own bad. Portage is great, but adding logic to ebuilds sometimes introduces flaws from our end.

Next time, we'll try to be less trigger happy upstream and make sure we only submit things that can be confirmed within and outside of portage.

With that said, we much appreciate your participation as a gentoo user and upstream :-)
Comment 16 Bernie Hackett 2013-05-25 23:11:54 UTC
(In reply to Johan Bergström from comment #15)
> With that said, we much appreciate your participation as a gentoo user and
> upstream :-)

My pleasure. :-)
Comment 17 Johan Bergström 2013-05-25 23:42:08 UTC
Created attachment 349182 [details]
pymongo-2.5.1-r1.ebuild

Attached is my "final" ebuild. It passes tests on python 2.5,2.6,2.7 and 3.2. If someone could try 3.3 and all flavours of pypy, that would be much appreciated.

This version slightly refines paths in python_test() and removes pkg_postinst. It refers to important information which I cannot find in the 2.5.1 changelog. We should make it conditional if the original author intended it for transitioning between 2.4.x and 2.5.x.
Comment 18 Ian Delaney (RETIRED) gentoo-dev 2013-05-26 15:31:07 UTC
Am I correct in saying we're having 2 parallel conversations here?
From yesterday;

(In reply to Johan Bergström from comment #17)
> Created attachment 349182 [details]
> pymongo-2.5.1-r1.ebuild
> 
> Attached is my "final" ebuild. It passes tests on python 2.5,2.6,2.7 and
> 3.2. If someone could try 3.3 and all flavours of pypy, that would be much
> appreciated.
> 
> This version slightly refines paths in python_test() and removes
> pkg_postinst. It refers to important information which I cannot find in the
> 2.5.1 changelog. 

What would that be?

> We should make it conditional if the original author
> intended it for transitioning between 2.4.x and 2.5.x.

Frankly I prefer my committed form. Calling nosetests we know will trip over in py2. esetup.py test just works on testing, calling nosetests for py2 without tripping over.  The changes I've made achieve the same as your intended changes but do so in a diff. way.  IN_SOURCE build brings the tests into view without having to copy them, and so forth.  Having booted into the alternate gentoo64 I finally have a 'working system' on running the testsuite.
Comment 19 Johan Bergström 2013-05-26 21:24:33 UTC
(In reply to Ian Delaney from comment #18)
> Am I correct in saying we're having 2 parallel conversations here?
> From yesterday;
> 
> (In reply to Johan Bergström from comment #17)
> > Created attachment 349182 [details]
> > pymongo-2.5.1-r1.ebuild
> > 
> > Attached is my "final" ebuild. It passes tests on python 2.5,2.6,2.7 and
> > 3.2. If someone could try 3.3 and all flavours of pypy, that would be much
> > appreciated.
> > 
> > This version slightly refines paths in python_test() and removes
> > pkg_postinst. It refers to important information which I cannot find in the
> > 2.5.1 changelog. 
> 
> What would that be?

Always prefixing with ${BUILD_DIR} (if you diff previous attached revisions you can see my trail of changes)

> 
> > We should make it conditional if the original author
> > intended it for transitioning between 2.4.x and 2.5.x.
> 
> Frankly I prefer my committed form. Calling nosetests we know will trip over
> in py2. esetup.py test just works on testing, calling nosetests for py2
> without tripping over.  The changes I've made achieve the same as your
> intended changes but do so in a diff. way.  IN_SOURCE build brings the tests
> into view without having to copy them, and so forth.  Having booted into the
> alternate gentoo64 I finally have a 'working system' on running the
> testsuite.

First of all, I would appreciate if you discussed what you wanted to change in this bug instead of simply implementing it and saying "I prefer my opinion".  For me (not having a commit flag), contributing to Gentoo is about teamwork. Having my name in metadata.xml as proxy maintainer should at least give some hint of participation?

I appreciate you taking some of the changes I made into regard but  would still be more comfortable passing DB_PORT{,2,3} to nosetests so any other servers running won't be included.
Comment 20 Ian Delaney (RETIRED) gentoo-dev 2013-05-27 07:51:09 UTC
  27 May 2013; Ian Delaney <idella4@gentoo.org> pymongo-2.5.1.ebuild,
  pymongo-2.5.ebuild:
  Adjustment to test pahse from maintainer jbergstroem, fixes Bug #463310 by
  Patrick