Bug 116914 - Fix mail/svnmailer with lang/python25+
Summary: Fix mail/svnmailer with lang/python25+
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Andrej Zverev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-04 17:40 UTC by Philip M. Gollucci
Modified: 2007-10-08 13:02 UTC (History)
0 users

See Also:


Attachments
file.txt (2.46 KB, text/plain)
2007-10-04 17:40 UTC, Philip M. Gollucci
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philip M. Gollucci 2007-10-04 17:40:01 UTC
Starting with Python 2.5 (PYTHON_REL == 250) Exceptional Handling is built-in.

See Misc/News:
 * Exceptions are now built-in in python (LP: #111735)
    (Thanks to Daniel Gruen for providing the patch)
  * debian/control: Modify Maintainer value to match
    DebianMaintainerField spec.

mail/svnmailer doesn't account for this.

Fix: Conditionally apply this patch if PYTHON_REL >= 250

Patch obtained from:
http://launchpadlibrarian.net/8131802/svnmailer-1.0.8-python2.5.diff

Note additional of files directory and new patch file.

portlint -ACN
port looks clean.

Patch attached with submission follows:
How-To-Repeat: cvsup to a ports tree post 2.5 python default.
cd mail/svnmailer
make install

#!/bin/sh
SVNADMIN=/usr/local/bin/svnadmin
MAILER=/usr/local/bin/svn-mailer
CONFIG=/usr/local/etc/svn-mailer.conf
REPOS=/home/svn
$MAILER -d "$REPOS" -r "1" -f $CONFIG

Notifier: svnmailer.util.SplittingDecorator
Revision: 3428
Groups: [u'defaults']
Traceback (most recent call last):
  File "/usr/local/lib/python2.5/site-packages/svnmailer/main.py", line 101, in run
    notifier.run()
  File "/usr/local/lib/python2.5/site-packages/svnmailer/notifier/_mail.py", line 62, in run
    for mail in self.getMails():
  File "/usr/local/lib/python2.5/site-packages/svnmailer/notifier/_mail.py", line 83, in getMails
    for mail in self.composeMail():
  File "/usr/local/lib/python2.5/site-packages/svnmailer/notifier/_textmail.py", line 131, in composeMail
    self.writeNotification()
  File "/usr/local/lib/python2.5/site-packages/svnmailer/notifier/_mail.py", line 96, in writeNotification
    self.writeDiffList()
  File "/usr/local/lib/python2.5/site-packages/svnmailer/notifier/_text.py", line 183, in writeDiffList
    self.writeContentDiff(change)
  File "/usr/local/lib/python2.5/site-packages/svnmailer/notifier/_textmail.py", line 303, in writeContentDiff
    self.__super.writeContentDiff(change)
  File "/usr/local/lib/python2.5/site-packages/svnmailer/notifier/_text.py", line 352, in writeContentDiff
    change, enc = enc, default = default
  File "/usr/local/lib/python2.5/site-packages/svnmailer/notifier/_base.py", line 300, in dumpContent
    enc1, enc2 = self.getContentEncodings(change)
  File "/usr/local/lib/python2.5/site-packages/svnmailer/notifier/_base.py", line 348, in getContentEncodings
    from encodings import exceptions
ImportError: cannot import name exceptions
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-10-04 17:40:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->az

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2007-10-08 12:53:26 UTC
az          2007-10-08 11:53:15 UTC

  FreeBSD ports repository

  Modified files:
    mail/svnmailer       Makefile 
  Added files:
    mail/svnmailer/files py25-src-lib-svnmailer-notifier-_base.py 
  Log:
  - Fix with python25+
  
  PR:     ports/116885, ports/116914
  Submitted by:   Philip M.Gollucci <pgollucci at p6m7g8.com>
  
  Revision  Changes    Path
  1.8       +8 -1      ports/mail/svnmailer/Makefile
  1.1       +45 -0     ports/mail/svnmailer/files/py25-src-lib-svnmailer-notifier-_base.py (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Andrej Zverev freebsd_committer freebsd_triage 2007-10-08 13:02:08 UTC
State Changed
From-To: open->closed

Committed. Thanks!