Vineyard does not create folder in /tmp

Bug #862855 reported by marzojr
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Vineyard
Fix Released
High
Christian Dannie Storgaard

Bug Description

After one of the most recent updates (I am not sure which, because I only noticed it today), I have been unable to set configurations with vineyard-preferences; they load and display correctly, but the program crashes when saving the changes with the following error:

There was an error running the threaded function: [Errno 2] No such file or directory: '/tmp/python-wine/setregistry-Zv4sJ.reg'
/usr/lib/pymodules/python2.7/vineyard/async.py:64
/usr/bin/vineyard-preferences:431
/usr/lib/pymodules/python2.7/vineyard/widgets/sound_driver.py:53
/usr/lib/pymodules/python2.7/wine/audio.py:198
/usr/lib/pymodules/python2.7/wine/registry.py:349
/usr/lib/pymodules/python2.7/wine/registry.py:92
/usr/lib/python2.7/codecs.py:881
<type 'exceptions.IOError'>: [Errno 2] No such file or directory: '/tmp/python-wine/setregistry-Zv4sJ.reg'
None

I tried to create the /tmp/python-wine directory, and it works fine now; this means Vineyards is failing to create the directory if it does not already exist.

Revision history for this message
Christian Dannie Storgaard (cybolic) wrote :

Thanks for the bug report.
It should be fixed in revision 355, as well as a few other potential similar cases.

Just for your information, Vineyard now uses /tmp/vineyard-$UID so there aren't any problems with multiple users running Vineyard at the same time.

Changed in vineyard:
importance: Undecided → High
status: New → Fix Committed
assignee: nobody → Christian Dannie Storgaard (cybolic)
summary: - Vineyards does not create /tmp folder
+ Vineyard does not create folder in /tmp
Revision history for this message
Krzysztof Sikorski (krzysztof-sikorski) wrote :

On my machine the change from r354 method introduces an import bug:

rad@reyka:~/vineyard$ ./vineyard-preferences
Error occured
There was an error running the threaded function: global name 'wine' is not defined
/home/rad/vineyard/vineyard/async.py:64
./vineyard-preferences:177
<type 'exceptions.NameError'>: global name 'wine' is not defined
None

It seems like the import from __init_modules method is not seen in async class.
I pulled the source to confirm - and yes, the error doesn't appear in r353.

It might matter that I just upgraded to Oneiric (which might bumped up libs' versions etc) - but I haven't used the prefs program for a while so I'm not sure if that's the cause.

Revision history for this message
Christian Dannie Storgaard (cybolic) wrote :

The cause is unfortunately me not checking if things work before pushing a new revision.
I was trying to get the window to appear faster by letting python-wine be imported at a later state - it works now in revision 357, sorry about not testing it earlier.
I'm a bit pressed for time these days, but that doesn't mean I shouldn't test first - I'll try to avoid a similar situation in the future.
Thanks for yet another good bug report.

Changed in vineyard:
status: Fix Committed → Fix Released
Revision history for this message
marzojr (marzojr) wrote :

I am now getting the following related error when trying to apply/save changes:

Error occured
There was an error running the threaded function: [Errno 2] No such file or directory: '/tmp//tmp/vineyard-1000/setregistry-Qq35A.reg'
/usr/lib/pymodules/python2.7/vineyard/async.py:64
/usr/bin/vineyard-preferences:439
/usr/lib/pymodules/python2.7/wine/drives.py:248
/usr/lib/pymodules/python2.7/wine/registry.py:349
/usr/lib/pymodules/python2.7/wine/registry.py:92
/usr/lib/python2.7/codecs.py:881
<type 'exceptions.IOError'>: [Errno 2] No such file or directory: '/tmp//tmp/vineyard-1000/setregistry-Qq35A.reg'
None

Should I add another bug report?

Revision history for this message
marzojr (marzojr) wrote :

FYI, this error seems to be in /usr/lib/pymodules/python2.7/wine/registry.py:91 -- it uses tempname and common.ENV['VINEYARDTMP'], both of which have /tmp prefixes. I am unsure on how to fix it, though, not having looked in any depth at the vineyard code.

Revision history for this message
Christian Dannie Storgaard (cybolic) wrote :

Thanks for that report and sorry for the delay. It should now be fixed in rev. 359.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.