[Python-apps-commits] r6829 - in packages/archivemail/trunk/debian (13 files)
nikolaus-guest at users.alioth.debian.org
nikolaus-guest at users.alioth.debian.org
Sat Mar 26 19:10:21 UTC 2011
Date: Saturday, March 26, 2011 @ 19:10:05
Author: nikolaus-guest
Revision: 6829
Import archivemail 0.8.2
* New maintainer
* Drop Debian patches that are obsolete for archivemail 0.8.2
* Remove README.source: the `3.0 (quilt)' source package format is
standard and integrated into dpkg-source. Pointing to the README.source
provided by the quilt package is misleading.
* Simplify debian/rules
* Bump up Standards-Version to 3.9.1 (no changes required)
* Move fix of manpage installation path from debian/rules to a patch
(patch cherry-picked upstream)
Added:
packages/archivemail/trunk/debian/patches/fix-manpage-path.diff
Modified:
packages/archivemail/trunk/debian/changelog
packages/archivemail/trunk/debian/clean
packages/archivemail/trunk/debian/control
packages/archivemail/trunk/debian/patches/series
packages/archivemail/trunk/debian/rules
Deleted:
packages/archivemail/trunk/debian/README.source
packages/archivemail/trunk/debian/patches/add-archive-all-switch.diff
packages/archivemail/trunk/debian/patches/add-archive-name-switch.diff
packages/archivemail/trunk/debian/patches/add-prefix-switch.diff
packages/archivemail/trunk/debian/patches/empty-mailbox-objects-fix.diff
packages/archivemail/trunk/debian/patches/preserve-symlinks.diff
packages/archivemail/trunk/debian/patches/relax-timestamps-test.diff
Deleted: packages/archivemail/trunk/debian/README.source
===================================================================
--- packages/archivemail/trunk/debian/README.source 2011-03-26 18:29:43 UTC (rev 6828)
+++ packages/archivemail/trunk/debian/README.source 2011-03-26 19:10:05 UTC (rev 6829)
@@ -1 +0,0 @@
-See /usr/share/doc/quilt/README.source
Modified: packages/archivemail/trunk/debian/changelog
===================================================================
--- packages/archivemail/trunk/debian/changelog 2011-03-26 18:29:43 UTC (rev 6828)
+++ packages/archivemail/trunk/debian/changelog 2011-03-26 19:10:05 UTC (rev 6829)
@@ -1,3 +1,16 @@
+archivemail (0.8.2-1) unstable; urgency=low
+
+ * New maintainer. Closes: #553592.
+ * New upstream release; drop obsolete patches.
+ * Bump up Standards-Version to 3.9.1 (no changes required)
+ * Drop README.source, it's unnecessary for a source package in standard 3.0
+ (quilt) format
+ * Simplify debian/rules
+ * Move fix of manpage installation path from debian/rules to a patch
+ cherry-picked from upstream
+
+ -- Nikolaus Schulz <microschulz at web.de> Sat, 26 Mar 2011 17:45:15 +0100
+
archivemail (0.7.2-9) unstable; urgency=low
* Increase minimum version of python-support to 0.90 for python2.6
Modified: packages/archivemail/trunk/debian/clean
===================================================================
--- packages/archivemail/trunk/debian/clean 2011-03-26 18:29:43 UTC (rev 6828)
+++ packages/archivemail/trunk/debian/clean 2011-03-26 19:10:05 UTC (rev 6829)
@@ -1,4 +1,4 @@
archivemail.py
archivemail.pyc
-debian/manpage.refs
-debian/manpage.links
+manpage.refs
+manpage.links
Modified: packages/archivemail/trunk/debian/control
===================================================================
--- packages/archivemail/trunk/debian/control 2011-03-26 18:29:43 UTC (rev 6828)
+++ packages/archivemail/trunk/debian/control 2011-03-26 19:10:05 UTC (rev 6829)
@@ -1,10 +1,10 @@
Source: archivemail
Section: mail
Priority: optional
-Maintainer: Serafeim Zanikolas <sez at debian.org>
+Maintainer: Nikolaus Schulz <microschulz at web.de>
Uploaders: Python Applications Packaging Team <python-apps-team at lists.alioth.debian.org>
Build-Depends: debhelper (>= 7.0.50~), python, docbook, docbook-utils, python-support (>= 0.90)
-Standards-Version: 3.9.0
+Standards-Version: 3.9.1
Vcs-Svn: svn://svn.debian.org/python-apps/packages/archivemail/trunk
Vcs-Browser: http://svn.debian.org/viewsvn/python-apps/packages/archivemail/trunk/
Homepage: http://archivemail.sourceforge.net/
Deleted: packages/archivemail/trunk/debian/patches/add-archive-all-switch.diff
===================================================================
--- packages/archivemail/trunk/debian/patches/add-archive-all-switch.diff 2011-03-26 18:29:43 UTC (rev 6828)
+++ packages/archivemail/trunk/debian/patches/add-archive-all-switch.diff 2011-03-26 19:10:05 UTC (rev 6829)
@@ -1,139 +0,0 @@
-# Description: add, document and test --all option
-# Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=470675
-# Author: Serafeim Zanikolas <serzan at hellug.gr>
-# Last-Update: 2009-02-22
-Index: archivemail/archivemail
-===================================================================
---- archivemail.orig/archivemail 2008-09-06 15:11:32.000000000 +0100
-+++ archivemail/archivemail 2008-09-06 15:14:23.000000000 +0100
-@@ -179,6 +179,7 @@
- delete_old_mail = 0
- dry_run = 0
- filter_append = None
-+ archive_all = 0
- include_flagged = 0
- lockfile_attempts = 5
- lockfile_extension = ".lock"
-@@ -209,14 +210,14 @@
-
- """
- try:
-- opts, args = getopt.getopt(args, '?D:S:Vd:hno:F:P:qs:uvp:',
-+ opts, args = getopt.getopt(args, '?D:S:Vd:hno:F:P:qs:uvp:',
- ["date=", "days=", "delete", "dry-run", "help",
- "include-flagged", "no-compress", "output-dir=",
- "archive-name=",
- "filter-append=", "pwfile=", "dont-mangle",
- "preserve-unread", "quiet", "size=", "suffix=",
- "verbose", "version", "warn-duplicate", "copy",
-- "prefix="])
-+ "prefix=", "all"])
- except getopt.error, msg:
- user_error(msg)
-
-@@ -227,6 +228,8 @@
- if self.copy_old_mail:
- user_error("found conflicting options --copy and --delete")
- self.delete_old_mail = 1
-+ if o == ('--all'):
-+ self.archive_all = 1
- if o == '--include-flagged':
- self.include_flagged = 1
- if o == '--no-compress':
-@@ -277,6 +280,9 @@
- if o in ('-V', '--version'):
- print __version__ + "\n\n" + __copyright__
- sys.exit(0)
-+ if self.archive_all and archive_by:
-+ user_error("--all must not be used with other " +
-+ "filtering options")
- return args
-
- def sanity_check(self):
-@@ -681,6 +687,8 @@
- mailbox compressed with gzip.
-
- Options are as follows:
-+ --all archive all messages (not to be used along with other
-+ filter switches; use with caution)
- -d, --days=NUM archive messages older than NUM days (default: %d)
- -D, --date=DATE archive messages older than DATE
- -o, --output-dir=DIR directory to store archives (default: same as original)
-@@ -1009,6 +1017,8 @@
-
- def should_archive(message):
- """Return true if we should archive the message, false otherwise"""
-+ if options.archive_all:
-+ return 1
- old = 0
- time_message = guess_delivery_time(message)
- if options.date_old_max == None:
-Index: archivemail/archivemail.sgml
-===================================================================
---- archivemail.orig/archivemail.sgml 2008-09-06 15:11:32.000000000 +0100
-+++ archivemail/archivemail.sgml 2008-09-06 15:16:25.000000000 +0100
-@@ -119,6 +119,15 @@
-
- <VarListEntry>
- <Term>
-+ <Option>--all</Option>
-+</Term>
-+<ListItem><Para>
-+Archive _all_ messages. Not to be combined with other filter switches.
-+</Para></ListItem>
-+</VarListEntry>
-+
-+<VarListEntry>
-+<Term>
- <Option>-d <Replaceable/NUM/, --days=<Replaceable/NUM/</Option>
- </Term>
- <ListItem><Para>Archive messages older than <Replaceable/NUM/ days.
-Index: archivemail/test_archivemail.py
-===================================================================
---- archivemail.orig/test_archivemail.py 2008-09-06 15:13:17.000000000 +0100
-+++ archivemail/test_archivemail.py 2008-09-06 19:58:49.000000000 +0100
-@@ -974,6 +974,44 @@
- super(TestArchiveDryRun, self).tearDown()
-
-
-+class TestArchiveAll(TestCaseInTempdir):
-+ """make sure the 'all' option works"""
-+ def setUp(self):
-+ super(TestArchiveAll, self).setUp()
-+ archivemail.options.quiet = 1
-+
-+ def testValidUse(self):
-+ """test that it works when used without any other archive_by option"""
-+ for execute in ("package", "system_long"):
-+ self.setUp()
-+ self.mbox_name = make_mbox(messages=3, hours_old=(24 * 12))
-+ self.mbox = archivemail.Mbox(self.mbox_name)
-+ if execute == "package":
-+ archivemail.options.archive_all = 1
-+ archivemail.archive(self.mbox_name)
-+ elif execute == "system_long":
-+ run = "./archivemail.py --all --quiet "\
-+ + "%s 2>&1 >/dev/null" % self.mbox_name
-+ self.assertEqual(os.system(run), 0)
-+ else:
-+ sys.exit(1)
-+ assert(os.path.exists(self.mbox_name))
-+ self.assertTrue(self.mbox.is_empty())
-+ self.tearDown()
-+
-+ def testInvalidUses(self):
-+ """test that it gives up with invoked with either -d or -D"""
-+ for arg in ["-d 30", "--days=30",\
-+ "-D 2008-07-30", "--date=2008-07-30"]:
-+ run = ("./archivemail.py --all %s --quiet "\
-+ + "whatever >/dev/null 2>&1") % arg
-+ self.assertEqual(os.system(run), 256)
-+
-+ def tearDown(self):
-+ archivemail.options.archive_all = 0
-+ archivemail.options.quiet = 0
-+ super(TestArchiveAll, self).tearDown()
-+
- class TestArchiveDays(TestCaseInTempdir):
- """make sure the 'days' option works"""
- def setUp(self):
Deleted: packages/archivemail/trunk/debian/patches/add-archive-name-switch.diff
===================================================================
--- packages/archivemail/trunk/debian/patches/add-archive-name-switch.diff 2011-03-26 18:29:43 UTC (rev 6828)
+++ packages/archivemail/trunk/debian/patches/add-archive-name-switch.diff 2011-03-26 19:10:05 UTC (rev 6829)
@@ -1,71 +0,0 @@
-# Description: add and document --archive-name option
-# Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=247340
-# Author: Serafeim Zanikolas <serzan at hellug.gr>
-# Last-Update: 2008-08-15
-Index: archivemail/archivemail
-===================================================================
---- archivemail.orig/archivemail 2008-08-15 20:38:03.000000000 +0100
-+++ archivemail/archivemail 2008-08-15 21:39:57.000000000 +0100
-@@ -172,6 +172,7 @@
- class Options:
- """Class to store runtime options, including defaults"""
- archive_suffix = "_archive"
-+ archive_name = None
- days_old_max = 180
- date_old_max = None
- delete_old_mail = 0
-@@ -210,6 +211,7 @@
- opts, args = getopt.getopt(args, '?D:S:Vd:hno:F:P:qs:uv',
- ["date=", "days=", "delete", "dry-run", "help",
- "include-flagged", "no-compress", "output-dir=",
-+ "archive-name=",
- "filter-append=", "pwfile=", "dont-mangle",
- "preserve-unread", "quiet", "size=", "suffix=",
- "verbose", "version", "warn-duplicate", "copy"])
-@@ -262,6 +264,8 @@
- self.mangle_from = 0
- if o in ('-v', '--verbose'):
- self.verbose = 1
-+ if o in ('--archive-name'):
-+ self.archive_name = os.path.expanduser(a)
- if o == '--copy':
- if self.delete_old_mail:
- user_error("found conflicting options --copy and --delete")
-@@ -663,6 +667,8 @@
- -P, --pwfile=FILE file to read imap password from (default: None)
- -F, --filter-append=STRING append arbitrary string to the IMAP filter string
- -s, --suffix=NAME suffix for archive filename (default: '%s')
-+ --archive-name=NAME specify whole archive filename, overrides prefix
-+ and suffix
- -S, --size=NUM only archive messages NUM bytes or larger
- -n, --dry-run don't write to anything - just show what would be done
- -u, --preserve-unread never archive unread messages
-@@ -1102,6 +1108,8 @@
- final_archive_name = mailbox_name.split('/')[-1] + parsed_suffix
- else:
- final_archive_name = mailbox_name + parsed_suffix
-+ if options.archive_name:
-+ final_archive_name = options.archive_name
- if options.output_dir:
- final_archive_name = os.path.join(options.output_dir,
- os.path.basename(final_archive_name))
-Index: archivemail/archivemail.sgml
-===================================================================
---- archivemail.orig/archivemail.sgml 2008-08-15 20:38:03.000000000 +0100
-+++ archivemail/archivemail.sgml 2008-08-15 21:38:49.000000000 +0100
-@@ -238,6 +238,15 @@
-
- <VarListEntry>
- <Term>
-+ <Option>--archive-name</Option>
-+</Term>
-+<ListItem><Para>
-+Specify whole archive filename, overrides prefix and suffix.
-+</Para></ListItem>
-+</VarListEntry>
-+
-+<VarListEntry>
-+<Term>
- <Option>-S <Replaceable/NUM/, --size=<Replaceable/NUM/</Option>
- </Term>
- <ListItem><Para>Only archive messages that are <Replaceable/NUM/ bytes or
Deleted: packages/archivemail/trunk/debian/patches/add-prefix-switch.diff
===================================================================
--- packages/archivemail/trunk/debian/patches/add-prefix-switch.diff 2011-03-26 18:29:43 UTC (rev 6828)
+++ packages/archivemail/trunk/debian/patches/add-prefix-switch.diff 2011-03-26 19:10:05 UTC (rev 6829)
@@ -1,142 +0,0 @@
-# Description: add, document and test --prefix option for archive name
-# Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=247340
-# Author: Serafeim Zanikolas <serzan at hellug.gr>
-# Last-Update: 2009-02-22
-Index: archivemail/archivemail
-===================================================================
---- archivemail.orig/archivemail 2008-08-15 21:40:17.000000000 +0100
-+++ archivemail/archivemail 2008-08-15 21:40:17.000000000 +0100
-@@ -171,6 +171,7 @@
-
- class Options:
- """Class to store runtime options, including defaults"""
-+ archive_prefix = None
- archive_suffix = "_archive"
- archive_name = None
- days_old_max = 180
-@@ -208,13 +209,14 @@
-
- """
- try:
-- opts, args = getopt.getopt(args, '?D:S:Vd:hno:F:P:qs:uv',
-+ opts, args = getopt.getopt(args, '?D:S:Vd:hno:F:P:qs:uvp:',
- ["date=", "days=", "delete", "dry-run", "help",
- "include-flagged", "no-compress", "output-dir=",
-- "archive-name=",
-+ "archive-name=",
- "filter-append=", "pwfile=", "dont-mangle",
- "preserve-unread", "quiet", "size=", "suffix=",
-- "verbose", "version", "warn-duplicate", "copy"])
-+ "verbose", "version", "warn-duplicate", "copy",
-+ "prefix="])
- except getopt.error, msg:
- user_error(msg)
-
-@@ -254,6 +256,8 @@
- self.dry_run = 1
- if o in ('-q', '--quiet'):
- self.quiet = 1
-+ if o in ('-p', '--prefix'):
-+ self.archive_prefix = a
- if o in ('-s', '--suffix'):
- self.archive_suffix = a
- if o in ('-S', '--size'):
-@@ -682,6 +686,7 @@
- -o, --output-dir=DIR directory to store archives (default: same as original)
- -P, --pwfile=FILE file to read imap password from (default: None)
- -F, --filter-append=STRING append arbitrary string to the IMAP filter string
-+ -p, --prefix=NAME prefix for archive filename (default: none)
- -s, --suffix=NAME suffix for archive filename (default: '%s')
- --archive-name=NAME specify whole archive filename, overrides prefix
- and suffix
-@@ -1124,8 +1129,11 @@
- final_archive_name = mailbox_name.split('/')[-1] + parsed_suffix
- else:
- final_archive_name = mailbox_name + parsed_suffix
-+ if options.archive_prefix:
-+ final_archive_name = os.path.join(os.path.dirname(final_archive_name),\
-+ options.archive_prefix + os.path.basename(final_archive_name))
- if options.archive_name:
-- final_archive_name = options.archive_name
-+ final_archive_name = options.archive_name
- if options.output_dir:
- final_archive_name = os.path.join(options.output_dir,
- os.path.basename(final_archive_name))
-Index: archivemail/test_archivemail.py
-===================================================================
---- archivemail.orig/test_archivemail.py 2008-08-15 21:40:17.000000000 +0100
-+++ archivemail/test_archivemail.py 2008-08-15 21:40:17.000000000 +0100
-@@ -889,6 +889,54 @@
- archivemail.options.archive_suffix = "_archive"
- super(TestArchiveMboxSuffix, self).tearDown()
-
-+class TestArchiveMboxPrefix(TestCaseInTempdir):
-+ """make sure the 'prefix' option works"""
-+ def setUp(self):
-+ super(TestArchiveMboxPrefix, self).setUp()
-+ archivemail.options.quiet = 1
-+
-+ def testPrefix(self):
-+ """archiving with specified --prefix arguments"""
-+ for prefix in ["blah-"]:
-+ for execute in ("system_long", "system_short", "package"):
-+ self.setUp()
-+ days_old_max = 180
-+ self.mbox_name = make_mbox(messages=3,
-+ hours_old=(24 * (days_old_max+1)))
-+ self.copy_name = tempfile.mkstemp()[1]
-+ shutil.copyfile(self.mbox_name, self.copy_name)
-+ if execute == "system_long":
-+ run = "./archivemail.py --quiet --prefix='%s' %s" % \
-+ (prefix, self.mbox_name)
-+ self.assertEqual(os.system(run), 0)
-+ elif execute == "system_short":
-+ run = "./archivemail.py --quiet -p'%s' %s" % \
-+ (prefix, self.mbox_name)
-+ self.assertEqual(os.system(run), 0)
-+ elif execute == "package":
-+ archivemail.options.archive_prefix = prefix
-+ archivemail.archive(self.mbox_name)
-+ else:
-+ sys.exit(1)
-+ assert(os.path.exists(self.mbox_name))
-+ self.assertEqual(os.path.getsize(self.mbox_name), 0)
-+
-+ archive_name = os.path.join(os.path.dirname(self.mbox_name),\
-+ prefix + os.path.basename(self.mbox_name) +\
-+ "_archive.gz")
-+ assert(os.path.exists(archive_name))
-+ self.assertEqual(os.system("gzip -d %s" % archive_name), 0)
-+ archive_name = re.sub("\.gz$", "", archive_name)
-+ assert(os.path.exists(archive_name))
-+ assert(filecmp.cmp(archive_name, self.copy_name, shallow=0))
-+ os.remove(archive_name)
-+ self.tearDown()
-+
-+ def tearDown(self):
-+ archivemail.options.quiet = 0
-+ archivemail.options.archive_prefix = None
-+ super(TestArchiveMboxPrefix, self).tearDown()
-+
-
- class TestArchiveDryRun(TestCaseInTempdir):
- """make sure the 'dry-run' option works"""
-Index: archivemail/archivemail.sgml
-===================================================================
---- archivemail.orig/archivemail.sgml 2008-08-15 21:38:49.000000000 +0100
-+++ archivemail/archivemail.sgml 2008-08-15 21:40:34.000000000 +0100
-@@ -170,6 +170,14 @@
-
- <VarListEntry>
- <Term>
-+ <Option>-p <Replaceable/NAME/, --prefix=<Replaceable/NAME/</Option>
-+</Term>
-+<ListItem><Para>Prefix <Replaceable/NAME/ to the archive name.
-+</Para></ListItem>
-+</VarListEntry>
-+
-+<VarListEntry>
-+<Term>
- <Option>-s <Replaceable/NAME/, --suffix=<Replaceable/NAME/</Option>
- </Term>
- <ListItem><Para>
Deleted: packages/archivemail/trunk/debian/patches/empty-mailbox-objects-fix.diff
===================================================================
--- packages/archivemail/trunk/debian/patches/empty-mailbox-objects-fix.diff 2011-03-26 18:29:43 UTC (rev 6828)
+++ packages/archivemail/trunk/debian/patches/empty-mailbox-objects-fix.diff 2011-03-26 19:10:05 UTC (rev 6829)
@@ -1,17 +0,0 @@
-# Description: add, document and test --all option
-# Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=476806
-# Author: Joey Hess <joeyh at debian.org>
-# Last-Update: 2008-08-14
-Index: archivemail/archivemail
-===================================================================
---- archivemail.orig/archivemail 2008-08-14 21:24:03.000000000 +0100
-+++ archivemail/archivemail 2008-08-14 21:24:12.000000000 +0100
-@@ -1278,7 +1278,7 @@
- original = mailbox.MHMailbox(mailbox_name)
- else:
- unexpected_error("unknown type: %s" % type)
-- assert(original)
-+ #assert(original)
-
- cache = IdentityCache(mailbox_name)
-
Added: packages/archivemail/trunk/debian/patches/fix-manpage-path.diff
===================================================================
--- packages/archivemail/trunk/debian/patches/fix-manpage-path.diff (rev 0)
+++ packages/archivemail/trunk/debian/patches/fix-manpage-path.diff 2011-03-26 19:10:05 UTC (rev 6829)
@@ -0,0 +1,20 @@
+commit 393f08bb2edd764c2810b2b88e6eef80952f44bd
+Author: Nikolaus Schulz <microschulz at web.de>
+Date: Sun Nov 28 02:02:51 2010 +0100
+
+ setup.py: install manpage into share/man/man1 instead of man/man1
+
+ This change aims to comply with the FHS, which puts manpages into
+ /usr/share/man, not /usr/man.
+
+diff --git a/setup.py b/setup.py
+index 33eab7c..a1449db 100755
+--- a/setup.py
++++ b/setup.py
+@@ -29,5 +29,5 @@ setup(name="archivemail",
+ maintainer="Nikolaus Schulz, Peter Poeml",
+ maintainer_email="nikosch at users.sourceforge.net, poeml at users.sourceforge.net",
+ scripts=["archivemail"],
+- data_files=[("man/man1", ["archivemail.1"])],
++ data_files=[("share/man/man1", ["archivemail.1"])],
+ )
Deleted: packages/archivemail/trunk/debian/patches/preserve-symlinks.diff
===================================================================
--- packages/archivemail/trunk/debian/patches/preserve-symlinks.diff 2011-03-26 18:29:43 UTC (rev 6828)
+++ packages/archivemail/trunk/debian/patches/preserve-symlinks.diff 2011-03-26 19:10:05 UTC (rev 6829)
@@ -1,97 +0,0 @@
-# Description: do not overwrite <mailbox>_archive.gz when it is a symbolic link
-# Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=349068
-# Author: Serafeim Zanikolas <serzan at hellug.gr>
-# Last-Update: 2009-02-22
-Index: archivemail/archivemail
-===================================================================
---- archivemail.orig/archivemail 2008-08-15 21:41:37.000000000 +0100
-+++ archivemail/archivemail 2008-08-15 22:00:20.000000000 +0100
-@@ -487,6 +487,20 @@
- """Return the current size of the mbox file"""
- return os.path.getsize(self.mbox_file_name)
-
-+ def get_link_target(self, file_name):
-+ """Return the supplied file name if not a link; else its target."""
-+ if not os.path.islink(file_name):
-+ return file_name
-+ orig_file_name = prev = file_name
-+ while os.path.islink(file_name):
-+ prev = file_name
-+ file_name = os.readlink(file_name)
-+ if not os.path.isabs(file_name):
-+ file_name = os.path.abspath(os.path.join(os.path.dirname(prev),
-+ file_name))
-+ if not os.path.exists(file_name):
-+ unexpected_error("%s is a broken symbolic link" % orig_file_name)
-+ return file_name
-
- class RetainMbox(Mbox):
- """Class for holding messages that will be retained from the original
-@@ -525,6 +539,7 @@
- mode = os.stat(self.__final_name)[stat.ST_MODE]
- os.chmod(self.mbox_file_name, mode)
-
-+ self.__final_name = self.get_link_target(self.__final_name)
- vprint("renaming '%s' to '%s'" % (self.mbox_file_name, self.__final_name))
- try:
- os.rename(self.mbox_file_name, self.__final_name)
-@@ -615,6 +630,7 @@
- final_name = self.__final_name
- if not options.no_compress:
- final_name = final_name + ".gz"
-+ final_name = self.get_link_target(final_name)
- vprint("renaming '%s' to '%s'" % (self.mbox_file_name,
- final_name))
- try:
-@@ -1145,9 +1161,6 @@
- tempfile.tempdir = new_temp_dir
- vprint("set tempfile directory to '%s'" % new_temp_dir)
-
-- if os.path.islink(mailbox_name):
-- unexpected_error("'%s' is a symbolic link -- I feel nervous!" %
-- mailbox_name)
- if imap_scheme == 'imap' or imap_scheme == 'imaps':
- vprint("guessing mailbox is of type: imap(s)")
- _archive_imap(mailbox_name, final_archive_name)
-Index: archivemail/test_archivemail.py
-===================================================================
---- archivemail.orig/test_archivemail.py 2008-08-15 21:40:56.000000000 +0100
-+++ archivemail/test_archivemail.py 2008-08-15 21:59:10.000000000 +0100
-@@ -99,6 +99,37 @@
-
- ############ Mbox Class testing ##############
-
-+class TestMboxSymLinkResolution(TestCaseInTempdir):
-+ def setUp(self):
-+ super(TestMboxSymLinkResolution, self).setUp()
-+ self.mbox_file_name = make_mbox()
-+ self.mbox = archivemail.Mbox(self.mbox_file_name)
-+
-+ def testAbsoluteSymlink(self):
-+ """Resolve an absolute symlink in a different directory"""
-+ link_name = "%s/symlink-to-mbox" % tempfile.mkdtemp()
-+ os.symlink(self.mbox_file_name, link_name)
-+ link_target = self.mbox.get_link_target(link_name)
-+ self.assertEqual(self.mbox_file_name, link_target)
-+
-+ def testRelativeSymlink(self):
-+ """Resolve a relative symlink in a different directory"""
-+ link_dir = tempfile.mkdtemp()
-+ link_name = "%s/symlink-to-mbox" % link_dir
-+ run = "cd %s && ln -s ../%s %s" % (link_dir,\
-+ os.path.basename(self.mbox_file_name),\
-+ os.path.basename(link_name))
-+ self.assertEqual(os.system(run), 0)
-+ link_target = self.mbox.get_link_target(link_name)
-+ self.assertEqual(self.mbox_file_name, link_target)
-+
-+ def testBrokenSymlink(self):
-+ """Archive name that is a broken link should raise an error"""
-+ link_name = "%s/symlink-to-mbox" % tempfile.mkdtemp()
-+ os.symlink("%s-missing" % self.mbox_file_name, link_name)
-+ self.assertRaises(archivemail.UnexpectedError,
-+ self.mbox.get_link_target, link_name)
-+
- class TestMboxIsEmpty(TestCaseInTempdir):
- def setUp(self):
- super(TestMboxIsEmpty, self).setUp()
Deleted: packages/archivemail/trunk/debian/patches/relax-timestamps-test.diff
===================================================================
--- packages/archivemail/trunk/debian/patches/relax-timestamps-test.diff 2011-03-26 18:29:43 UTC (rev 6828)
+++ packages/archivemail/trunk/debian/patches/relax-timestamps-test.diff 2011-03-26 19:10:05 UTC (rev 6829)
@@ -1,48 +0,0 @@
-# Description: add, document and test --all option
-# Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549736
-# Author: Nikolaus Schulz <microschulz at web.de>
-# Last-Update: 2009-10-10
---- a/test_archivemail.py
-+++ b/test_archivemail.py
-@@ -69,6 +69,8 @@
- print "Try renaming it from 'archivemail' to 'archivemail.py'."
- sys.exit(1)
-
-+# precision of os.utime() when restoring mbox timestamps
-+utimes_precision = 5
-
- class TestCaseInTempdir(unittest.TestCase):
- """Base class for testcases that need to create temporary files.
-@@ -718,8 +720,8 @@
- assert(os.path.exists(self.mbox_name))
- new_atime = os.path.getatime(self.mbox_name)
- new_mtime = os.path.getmtime(self.mbox_name)
-- self.assertEqual(self.mtime, new_mtime)
-- self.assertEqual(self.atime, new_atime)
-+ self.assertAlmostEqual(self.mtime, new_mtime, utimes_precision)
-+ self.assertAlmostEqual(self.atime, new_atime, utimes_precision)
- self.tearDown()
-
- def testMixed(self):
-@@ -741,8 +743,8 @@
- assert(os.path.exists(self.mbox_name))
- new_atime = os.path.getatime(self.mbox_name)
- new_mtime = os.path.getmtime(self.mbox_name)
-- self.assertEqual(self.mtime, new_mtime)
-- self.assertEqual(self.atime, new_atime)
-+ self.assertAlmostEqual(self.mtime, new_mtime, utimes_precision)
-+ self.assertAlmostEqual(self.atime, new_atime, utimes_precision)
- self.tearDown()
-
- def testOld(self):
-@@ -764,8 +766,8 @@
- assert(os.path.exists(self.mbox_name))
- new_atime = os.path.getatime(self.mbox_name)
- new_mtime = os.path.getmtime(self.mbox_name)
-- self.assertEqual(self.mtime, new_mtime)
-- self.assertEqual(self.atime, new_atime)
-+ self.assertAlmostEqual(self.mtime, new_mtime, utimes_precision)
-+ self.assertAlmostEqual(self.atime, new_atime, utimes_precision)
- self.tearDown()
-
- def tearDown(self):
Modified: packages/archivemail/trunk/debian/patches/series
===================================================================
--- packages/archivemail/trunk/debian/patches/series 2011-03-26 18:29:43 UTC (rev 6828)
+++ packages/archivemail/trunk/debian/patches/series 2011-03-26 19:10:05 UTC (rev 6829)
@@ -1,7 +1,2 @@
-add-archive-name-switch.diff
-empty-mailbox-objects-fix.diff
fix-path-in-example.diff
-preserve-symlinks.diff
-add-prefix-switch.diff
-add-archive-all-switch.diff
-relax-timestamps-test.diff
+fix-manpage-path.diff
Modified: packages/archivemail/trunk/debian/rules
===================================================================
--- packages/archivemail/trunk/debian/rules 2011-03-26 18:29:43 UTC (rev 6828)
+++ packages/archivemail/trunk/debian/rules 2011-03-26 19:10:05 UTC (rev 6829)
@@ -1,27 +1,19 @@
#!/usr/bin/make -f
-ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-TESTS_TARGET = check
-else
-TESTS_TARGET =
-endif
-
%:
dh $@
-check:
- ln -sf archivemail archivemail.py
- ./test_archivemail.py
- rm -f archivemail.py
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+override_dh_auto_test:
+ ./test_archivemail
+endif
-override_dh_auto_build: $(TESTS_TARGET)
- docbook2man archivemail.sgml -o debian/
- touch build-stamp
-
-override_dh_auto_install:
- dh binary-indep --before dh_auto_install
+override_dh_auto_build:
mv archivemail.1 archivemail.1.orig
- mv debian/archivemail.1 .
- dh_auto_install -- --install-data=usr/share
- dh binary-indep --remaining
- mv archivemail.1.orig archivemail.1
+ docbook2man archivemail.sgml
+
+override_dh_clean:
+ if [ -f archivemail.1.orig ]; then \
+ mv archivemail.1.orig archivemail.1; \
+ fi
+ dh_clean
More information about the Python-apps-commits
mailing list