New cleanup code doesn't have the cwd correct when calling os.remove

Bug #609783 reported by Paul Hummer on 2010-07-25
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Tarmac
High
Paul Hummer

Bug Description

Monty Taylor just had this exception:

Started by user mordred
Building on master
[workspace] $ /bin/sh -xe /tmp/hudson3540036410919537597.sh
+ tarmac land lp:nova
Traceback (most recent call last):
  File "/usr/local/bin/tarmac", line 6, in <module>
    main()
  File "/usr/local/lib/python2.6/dist-packages/tarmac/bin/__init__.py", line 28, in main
    registry.run(args)
  File "/usr/local/lib/python2.6/dist-packages/tarmac/bin/registry.py", line 51, in run
    self._run(args)
  File "/usr/local/lib/python2.6/dist-packages/tarmac/bin/registry.py", line 39, in _run
    run_bzr(args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/tarmac/bin/commands.py", line 253, in run
    self._do_merges(branch_url)
  File "/usr/local/lib/python2.6/dist-packages/tarmac/bin/commands.py", line 132, in _do_merges
    target = Branch.create(lp_branch, self.config, create_tree=True)
  File "/usr/local/lib/python2.6/dist-packages/tarmac/branch.py", line 51, in create
    clazz.create_tree()
  File "/usr/local/lib/python2.6/dist-packages/tarmac/branch.py", line 75, in create_tree
    self.cleanup()
  File "/usr/local/lib/python2.6/dist-packages/tarmac/branch.py", line 82, in cleanup
    os.remove(unknown)
OSError: [Errno 2] No such file or directory: '_trial_temp'
Finished: FAILURE

It's pretty easy to see that tree.unknowns() is not returning abspaths like I thought it was.

Related branches

Paul Hummer (rockstar) wrote :

Fixed in revno 320

Changed in tarmac:
status: Triaged → Fix Committed
Paul Hummer (rockstar) on 2010-09-18
Changed in tarmac:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers