From issue #13481: --- 2012-07-05 17:35:36,798: Creating zypper lock... 2012-07-05 17:35:36,799: Failed to create zypper lock file: [Errno 18] Invalid cross-device link 2012-07-05 17:35:36,801: Traceback (most recent call last): 2012-07-05 17:35:36,801: File "/opt/thinlinc/modules/thinlinc/tlsetup/pkginsthelp.py", line 44, in <lambda> 2012-07-05 17:35:36,801: self . __worker_thread = thread . start_new_thread ( lambda : self . __worker ( ) , ( ) ) 2012-07-05 17:35:36,801: File "/opt/thinlinc/modules/thinlinc/tlsetup/pkginsthelp.py", line 51, in __worker 2012-07-05 17:35:36,801: self . __job ( ) 2012-07-05 17:35:36,801: File "/opt/thinlinc/modules/thinlinc/tlsetup/pkginsthelp.py", line 215, in __resolver_job 2012-07-05 17:35:36,801: if iI ( self . __packageinstaller ) : 2012-07-05 17:35:36,801: File "/opt/thinlinc/modules/thinlinc/tlsetup/pkginsthelp.py", line 108, in iI 2012-07-05 17:35:36,801: oo = backend . resolve ( ) 2012-07-05 17:35:36,801: File "/opt/thinlinc/modules/thinlinc/packageinstaller/zypperbackend.py", line 397, in resolve 2012-07-05 17:35:36,802: self . lock ( ) 2012-07-05 17:35:36,802: File "/opt/thinlinc/modules/thinlinc/packageinstaller/zypperbackend.py", line 317, in lock 2012-07-05 17:35:36,802: raise Exception ( "Failed to create zypper lock file" ) 2012-07-05 17:35:36,802: Exception: Failed to create zypper lock file --- In this case, if /tmp and /var/run are not on the same partition, trying to move the lock file os.rename() (zypperbackend.py:313) will fail. From http://docs.python.org/library/os.html?highlight=os.rename#os.rename: "The operation may fail on some Unix flavors if src and dst are on different filesystems" To resolve this, the lock file should be created in place by specifying the target directory when calling tempfile.mkstemp().
Created attachment 447 [details] Suggested patch
Fixed in r25683. Now creates temp file in target directory. Initial testing performed on SLED11SP2, seems to work fine.
Works great. Tested on SLED11SP2, after doing: mount -t tmpfs /tmp /tmp