Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 160811 - net-mail/archivemail-0.7 python-2.5 fix
Summary: net-mail/archivemail-0.7 python-2.5 fix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Grant Goodyear (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: python-2.5
  Show dependency tree
 
Reported: 2007-01-08 00:45 UTC by Ali Polatel (RETIRED)
Modified: 2007-05-13 10:17 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
archivemail-0.7.0-fpname.patch (archivemail-0.7.0-fpname.patch,2.21 KB, patch)
2007-01-08 00:52 UTC, Ali Polatel (RETIRED)
Details | Diff
archivemail-0.7.0-fpname.patch (archivemail-0.7.0-fpname.patch,2.71 KB, patch)
2007-05-10 08:41 UTC, Ali Polatel (RETIRED)
Details | Diff
fixed patch (archivemail-0.7.0-fpname.patch,3.23 KB, patch)
2007-05-10 09:08 UTC, Ali Polatel (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ali Polatel (RETIRED) gentoo-dev 2007-01-08 00:45:05 UTC
archivemail doesn't work with python-2.5.
 Here is the traceback:
hawking@mars:~ archivemail -d 5 .maildir/local
Traceback (most recent call last):
  File "/usr/bin/archivemail", line 1469, in <module>
    main()
  File "/usr/bin/archivemail", line 687, in main
    archive(mailbox_path)
  File "/usr/bin/archivemail", line 1130, in archive
    _archive_dir(mailbox_name, final_archive_name, "maildir")
  File "/usr/bin/archivemail", line 1270, in _archive_dir
    add_status_headers(msg)
  File "/usr/bin/archivemail", line 809, in add_status_headers
    match = re.search(":2,(.+)$", message.fp.name)
AttributeError: _ProxyFile instance has no attribute 'name'

  .maildir/local is a Maildir and message is a rfc822.Message instance.
  In python2.4 message.fp.name gives the path of the file where this message is stored. In python2.5 this doesn't exist but same info is avaliable from 'message.fp._file.name'
  I've written a patch for archivemail-0.7.0 to check for python version and decide whether to use message.fp.name or message.fp._file.name and the tool seems to work fine. According to "What's new in Python 2.5" the mailbox module underwent a massive rewrite so I won't be surprised if there are some other problems but I guess upstream is responsible for those :-)
 
Regards,
Ali
Comment 1 Ali Polatel (RETIRED) gentoo-dev 2007-01-08 00:52:16 UTC
Created attachment 105971 [details, diff]
archivemail-0.7.0-fpname.patch
Comment 2 Torsten Veller (RETIRED) gentoo-dev 2007-02-27 07:22:04 UTC
Ali, sorry for the late reply.

Can you please report this upstream and keep us up-to-date? http://sourceforge.net/tracker/?group_id=49630

Thanks.
Comment 3 Luis Medinas (RETIRED) gentoo-dev 2007-02-27 11:17:22 UTC
can we get this fix on the tree now ? Or you need some help ?
Comment 4 Ali Polatel (RETIRED) gentoo-dev 2007-02-28 00:04:01 UTC
(In reply to comment #2)
> Ali, sorry for the late reply.
> 
> Can you please report this upstream and keep us up-to-date?
> http://sourceforge.net/tracker/?group_id=49630
> 
> Thanks.
> 

Done
http://sourceforge.net/tracker/index.php?func=detail&aid=1670422&group_id=49630&atid=456910
Comment 5 Ali Polatel (RETIRED) gentoo-dev 2007-05-10 08:41:36 UTC
Created attachment 118726 [details, diff]
archivemail-0.7.0-fpname.patch

 There are two more message.fp.name calls in is_flagged() and is_unread() which I haven't noticed as they were hidden in try/except blocks. The updated patch fixes them and uses sys.hexversion instead of the ugly sys.version_info[1]
 
 P.S.: The upstream doesn't seem to respond to the bug report and as python-2.5 is hopefully getting unmasked soon maybe we should just fix this in the tree ;)
Comment 6 Ali Polatel (RETIRED) gentoo-dev 2007-05-10 09:08:23 UTC
Created attachment 118737 [details, diff]
fixed patch

 my apologies.. forgot to fix one in _archive_dir()
Comment 7 Torsten Veller (RETIRED) gentoo-dev 2007-05-10 09:16:22 UTC
(In reply to comment #5)
> Created an attachment (id=118726) [edit]
> archivemail-0.7.0-fpname.patch
> 
>  There are two more message.fp.name calls in is_flagged() and is_unread() which
> I haven't noticed as they were hidden in try/except blocks. The updated patch
> fixes them and uses sys.hexversion instead of the ugly sys.version_info[1]
> 
>  P.S.: The upstream doesn't seem to respond to the bug report and as python-2.5
> is hopefully getting unmasked soon maybe we should just fix this in the tree ;)

Yes, i've been watching the upstream bug too. Anyhow send the new patch upstream too, please.
I'll fix the ebuild in the tree in the next 24 hours.
I asked Grant to take a look at the patch some time ago (as I don't know much about python and its changes from 2.4 to 2.5).
Comment 8 Ali Polatel (RETIRED) gentoo-dev 2007-05-10 09:40:07 UTC
(In reply to comment #7)
> 
> Yes, i've been watching the upstream bug too. Anyhow send the new patch
> upstream too, please.
 done

Comment 9 Torsten Veller (RETIRED) gentoo-dev 2007-05-13 10:17:15 UTC
Commited.
Thanks :)