temporary log file

John A Meinel john at arbash-meinel.com
Sat Feb 11 15:36:34 GMT 2006


Wouter Bolsterlee wrote:
> På Sat, Feb 11, 2006 at 07:58:58AM -0600, John A Meinel skrev:
>> martin f krafft wrote:
>>> I am only just starting to come back to bzr, and right now only by
>>> means of 0.7.0-2 on sarge. If my issue is outdated, please don't
>>> whip me. Basically, the issue is that /etc/logcheck is r-x for me
>>> (no need to write or delete files therein), but
>>>
>>> seamus:/etc/logcheck> bzr commit
>>> bzr: ERROR: exceptions.OSError: [Errno 13] Permission denied: './bzr_log.dIj4RL'
>>>   at /usr/lib/python2.4/tempfile.py line 236
>>>   in _mkstemp_inner
>>>
>>> Would it not make more sense to create that temporary file in
>>> $TMPDIR, or .bzr/ at least? Why clutter the actual repository?
>>>
>>> Cheers,
>>>
>> I guess I don't see what is actually creating this file. Can you give us
>> the full traceback from ~/.bzr.log?
> 
> I think that spawning an external commit message editor creates the file.
> 
>   mvrgr, Wouter
> 

It could be, but we obviously are using mkstemp for the commit message,
so where is he committing versus where he is doing revision control.

I'm guessing that he might be controlling /etc/logcheck, and when he
goes to commit, it is trying to create the log file in the current
directory.

We could create it anywhere, I'm not positive why we are creating it in
that specific location.

The specific lines in question are in msgeditor.py line 88 or so:
    try:
        tmp_fileno, msgfilename = tempfile.mkstemp(prefix='bzr_log.',
dir=u'.')
        msgfile = os.close(tmp_fileno)

Which basically says to create the commit message in the current working
directory. We could certainly just remove the dir=() portion.
Can someone comment why it is there?

(The commit message associated with that line is just the comment about
changing dir='.' to dir=u'.').

So I'm guessing the work was done by Aaron.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060211/b1dac122/attachment.pgp 


More information about the bazaar mailing list