Comment 2 for bug 254791

Revision history for this message
Lucio Torre (lucio.torre) wrote : Re: [Bug 254791] [NEW] export to tar broken on mac os x

On Mon, Aug 4, 2008 at 7:12 PM, Robert Collins
<email address hidden> wrote:
> On Mon, 2008-08-04 at 21:59 +0000, Lucio Torre wrote:
>> Public bug reported:
>>
>> Mac OS X 10.4, python2.5
>>
>> running "make check" fails after 204 tests on test_tar_export.
>
>> File "/Users/lucio/Projects/canonical/bzr.dev/bzrlib/export/tar_exporter.py", line 40, in tar_exporter
>> ball = tarfile.open(None, 'w|' + compression, sys.stdout)
>> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/tarfile.py", line 1168, in open
>> _Stream(name, filemode, comptype, fileobj, bufsize))
>> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/tarfile.py", line 1047, in __init__
>> self.name = os.path.abspath(name)
>> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 402, in abspath
>> if not isabs(path):
>> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 49, in isabs
>> return s.startswith('/')
>> AttributeError: 'NoneType' object has no attribute 'startswith'
>
> This appears to be a python bug.
>
> pydoc tarfile.open ->
> tarfile.open = open(cls, name=None, mode='r', fileobj=None,
> bufsize=10240)
>
> We're passing no name and a fileobj of sys.stdout - your tarfile.py is
> being bogus by trying to get the abs path for None.
>
> Are you running a release python?
>
> -Rob
> --
> GPG key available at: <http://www.robertcollins.net/keys.txt>.
>
> --
> export to tar broken on mac os x
> https://bugs.launchpad.net/bugs/254791
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Bazaar Version Control System: New
>
> Bug description:
> Mac OS X 10.4, python2.5
>
> running "make check" fails after 204 tests on test_tar_export.
>
> traceback:
> ======================================================================
> ERROR: test_tar_export (bzrlib.tests.blackbox.test_export.TestExport)
>
> vvvv[log from bzrlib.tests.blackbox.test_export.TestExport.test_tar_export]---
> 278.671 creating repository in file:///private/tmp/testbzr-zCBSWy.tmp/bzrlib.tests.blackbox.test_export.TestExport.test_tar_export/work/tar/.bzr/.
> 278.706 creating branch <bzrlib.branch.BzrBranchFormat6 object at 0x4066eb0> in file:///private/tmp/testbzr-zCBSWy.tmp/bzrlib.tests.blackbox.test_export.TestExport.test_tar_export/work/tar/.bzr/
> 278.879 trying to create missing lock '/private/tmp/testbzr-zCBSWy.tmp/bzrlib.tests.blackbox.test_export.TestExport.test_tar_export/work/tar/.bzr/checkout/dirstate'
> 278.882 opening working tree '/private/tmp/testbzr-zCBSWy.tmp/bzrlib.tests.blackbox.test_export.TestExport.test_tar_export/work/tar'
> 279.085 run bzr: ['ignore', 'something']
> 279.085 bzr arguments: ['ignore', 'something']
> 279.091 encoding stdout as sys.stdout encoding 'ascii'
> 279.111 opening working tree '/private/tmp/testbzr-zCBSWy.tmp/bzrlib.tests.blackbox.test_export.TestExport.test_tar_export/work/tar'
> 279.202 preparing to commit
> INFO Committing to: /private/tmp/testbzr-zCBSWy.tmp/bzrlib.tests.blackbox.test_export.TestExport.test_tar_export/work/tar/
> 279.261 Selecting files for commit with filter None
> INFO added .bzr-adir
> INFO added .bzrignore
> INFO added .bzrrules
> INFO added a
> INFO added .bzr-adir/afile
> INFO Committed revision 1.
> 279.471 run bzr: ['export', 'test.tar.gz']
> 279.471 bzr arguments: ['export', 'test.tar.gz']
> 279.482 encoding stdout as sys.stdout encoding 'ascii'
> 279.495 opening working tree '/private/tmp/testbzr-zCBSWy.tmp/bzrlib.tests.blackbox.test_export.TestExport.test_tar_export/work/tar'
> 279.518 export version <RevisionTree instance at 44055d0, <email address hidden>'>
> 279.544 run bzr: ['export', '--format=tgz', '--root=test', '-']
> 279.545 bzr arguments: ['export', '--format=tgz', '--root=test', '-']
> 279.550 encoding stdout as sys.stdout encoding 'ascii'
> 279.564 opening working tree '/private/tmp/testbzr-zCBSWy.tmp/bzrlib.tests.blackbox.test_export.TestExport.test_tar_export/work/tar'
> 279.726 opening working tree '/tmp/testbzr-zCBSWy.tmp'
>
> ^^^^[log from bzrlib.tests.blackbox.test_export.TestExport.test_tar_export]---
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/Users/lucio/Projects/canonical/bzr.dev/bzrlib/tests/blackbox/test_export.py", line 60, in test_tar_export
> out, err = self.run_bzr('export --format=tgz --root=test -')
> File "/Users/lucio/Projects/canonical/bzr.dev/bzrlib/tests/__init__.py", line 1466, in run_bzr
> working_dir=working_dir,
> File "/Users/lucio/Projects/canonical/bzr.dev/bzrlib/tests/__init__.py", line 1380, in _run_bzr_autosplit
> encoding=encoding, stdin=stdin, working_dir=working_dir,
> File "/Users/lucio/Projects/canonical/bzr.dev/bzrlib/tests/__init__.py", line 1410, in _run_bzr_core
> args)
> File "/Users/lucio/Projects/canonical/bzr.dev/bzrlib/tests/__init__.py", line 1696, in apply_redirected
> return a_callable(*args, **kwargs)
> File "/Users/lucio/Projects/canonical/bzr.dev/bzrlib/commands.py", line 876, in run_bzr_catch_user_errors
> return run_bzr(argv)
> File "/Users/lucio/Projects/canonical/bzr.dev/bzrlib/commands.py", line 797, in run_bzr
> ret = run(*run_argv)
> File "/Users/lucio/Projects/canonical/bzr.dev/bzrlib/commands.py", line 499, in run_argv_aliases
> return self.run(**all_cmd_args)
> File "/Users/lucio/Projects/canonical/bzr.dev/bzrlib/builtins.py", line 2027, in run
> export(t, dest, format, root)
> File "/Users/lucio/Projects/canonical/bzr.dev/bzrlib/export/__init__.py", line 97, in export
> return _exporters[format](tree, dest, root)
> File "/Users/lucio/Projects/canonical/bzr.dev/bzrlib/export/__init__.py", line 61, in _loader
> return func(tree, dest, root)
> File "/Users/lucio/Projects/canonical/bzr.dev/bzrlib/export/tar_exporter.py", line 86, in tgz_exporter
> tar_exporter(tree, dest, root, compression='gz')
> File "/Users/lucio/Projects/canonical/bzr.dev/bzrlib/export/tar_exporter.py", line 40, in tar_exporter
> ball = tarfile.open(None, 'w|' + compression, sys.stdout)
> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/tarfile.py", line 1168, in open
> _Stream(name, filemode, comptype, fileobj, bufsize))
> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/tarfile.py", line 1047, in __init__
> self.name = os.path.abspath(name)
> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 402, in abspath
> if not isabs(path):
> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 49, in isabs
> return s.startswith('/')
> AttributeError: 'NoneType' object has no attribute 'startswith'
>
> ----------------------------------------------------------------------
> Ran 204 tests in 236.461s
>
> FAILED (errors=1)
> Missing feature 'Internally performed glob expansion' skipped 2 tests.
> tests failed
> bzrlib.tests.blackbox.test_branch.TestBranchStacked.test_branch_stacked_from_smart_server is leaking threads among 5 leaking tests
> make: *** [check] Error 1
>

apparently not:
Python 2.5.1 Stackless 3.1b3 060516 (python-2.51:55546, May 24 2007, 08:50:09)
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>