Go to file
Peter Colberg 3299b2240c Applied patch from Peter Colberg to remove usage of hard linking
Closes: #535160

Bug#535160: offlineimap fails on encfs (FUSE) due to hard linking

Package: offlineimap
Version: 6.0.3
Severity: normal
Tags: patch

Hi,

if the localrepository is stored on an encfs, offlineimap fails as follows:

    OfflineIMAP 6.0.3
    Copyright (C) 2002 - 2008 John Goerzen <jgoerzen@complete.org>
    This software comes with ABSOLUTELY NO WARRANTY; see the file
    COPYING for details.  This is free software, and you are welcome
    to distribute it under the conditions laid out in COPYING.
    ***** Processing account pleione
    Copying folder structure from IMAP to Maildir
    Establishing connection to tunnel:eval `keychain --quiet --eval` && ssh -q mymailhost /usr/sbin/dovecot --exec-mail imap.
    Syncing Drafts: IMAP -> Maildir
    Syncing INBOX: IMAP -> Maildir
    ----------8<----------
    Syncing net: IMAP -> Maildir
    Copy message 360 IMAP[net] -> Maildir[net], LocalStatus[net]
    Syncing personal: IMAP -> Maildir
    Thread 'Copy message 360 from net' terminated with exception:
    Traceback (most recent call last):
      File "/var/lib/python-support/python2.4/offlineimap/threadutil.py", line 149, in run
	Thread.run(self)
      File "threading.py", line 422, in run
	self.__target(*self.__args, **self.__kwargs)
      File "/var/lib/python-support/python2.4/offlineimap/folder/Base.py", line 282, in copymessageto
	newuid = object.savemessage(uid, message, flags, rtime)
      File "/var/lib/python-support/python2.4/offlineimap/folder/Maildir.py", line 198, in savemessage
	os.path.join(tmpdir, messagename))
    OSError: [Errno 1] Operation not permitted

    Last 4 debug messages logged for Copy message 360 from net prior to exception:
    ----------8<----------

As encfs does not support hard linking, the rename of the temporary
message file fails.

This is the only occurrence of hard linking in offlineimap and can be
fixed by using an atomic `os.rename` instead of `os.link`+`os.unlink`.
I have been using the attached patch for more than 1.5 years and have
never again had any problems with offlineimap on encfs.

Regards,
Peter
2009-06-30 00:03:37 -05:00
bin Prepping 6.0.3 2008-08-13 00:05:17 -05:00
debian Update changelog 2009-05-05 15:17:59 -05:00
docs/sgml-common Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00
offlineimap Applied patch from Peter Colberg to remove usage of hard linking 2009-06-30 00:03:37 -05:00
.gitignore gitignore generated files from 'make doc' 2009-04-17 10:37:48 -05:00
COPYING Update FSF address 2006-08-12 05:15:55 +01:00
COPYRIGHT Update for 5.99.7 2008-03-04 08:32:29 -06:00
FAQ.html Add the FAQ 2006-12-02 22:03:05 +01:00
Makefile 'make clean' remove manual.ps 2009-04-17 10:37:37 -05:00
offlineimap.conf Fixed typos thanks to Alexey Mahotkin 2009-04-21 00:01:01 -05:00
offlineimap.conf.minimal Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00
offlineimap.py Prepping 6.0.3 2008-08-13 00:05:17 -05:00
offlineimap.sgml Small doc grammar fix. fixes #74. 2008-06-11 15:27:03 -05:00
offlineimap.spec Updating version number to 4.0.16 2006-12-02 21:59:02 +01:00
setup.py Updated copyright and version info for 4.0.15 2006-11-30 10:51:14 +01:00
UPGRADING Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00