[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#685658: unblock: maildir-utils/0.9.8.5-3



Hi Julien, hi all,

On Mi, 10 Okt 2012, Julien Cristau wrote:
> It's not clear to me why you're saying an epoch would be necessary.  The
> fix you sent could be applied to the version in testing and uploaded
> there directly.  If you could prepare that upload and send us a final
> debdiff that would be great.

Ok, so *how* would I name the new version? ANd how do I upload
directly to testing?

I have prepared a package with
	maildir-utils (0.9.8.4-4) testing; urgency=low
so the release lies above the version in testing, but still below
the version in unstable.

The full diff between the source package in testing and the one 
prepared is here:
diff --git a/debian/changelog b/debian/changelog
index b848fab..fb202fe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+maildir-utils (0.9.8.4-4) testing; urgency=low
+
+  * cherry pick git commit 4fa0c57d from upstream that fixes encoding
+    problems due to optimizations (Closes: #685472)
+    thanks to Olaf Meeuwissen for the detailed analysis)
+
+ -- Norbert Preining <preining@debian.org>  Thu, 11 Oct 2012 07:32:09 +0900
+
 maildir-utils (0.9.8.4-3) unstable; urgency=high
 
   * conflict with mailutils << 1:2.99.97-3 (same files) (Closes: #678484)
diff --git a/debian/patches/series b/debian/patches/series
index 61df53d..8090f3a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ fix-mug2-build
 fix-manpages
 disable-emacs-compile
 upstream-xapian-ignore-third-digit
+upstream_4fa0c57d_iso-2022-jp
diff --git a/debian/patches/upstream_4fa0c57d_iso-2022-jp b/debian/patches/upstream_4fa0c57d_iso-2022-jp
new file mode 100644
index 0000000..b7dfff2
--- /dev/null
+++ b/debian/patches/upstream_4fa0c57d_iso-2022-jp
@@ -0,0 +1,47 @@
+---
+ src/mu-msg-file.c |   23 +++++------------------
+ 1 file changed, 5 insertions(+), 18 deletions(-)
+
+--- maildir-utils.git.orig/src/mu-msg-file.c
++++ maildir-utils.git/src/mu-msg-file.c
+@@ -468,13 +468,6 @@
+ {
+ 	GMimeContentType *ctype;
+ 	const char* charset;
+-	unsigned char *cur;
+-
+-	/* optimization: if the buffer is plain ascii, no conversion
+-	 * is done... */
+-	for (cur = (unsigned char*)buffer; *cur && *cur < 0x80; ++cur);
+-	if (*cur == '\0')
+-		return buffer;
+ 
+ 	ctype = g_mime_object_get_content_type (GMIME_OBJECT(part));
+ 	g_return_val_if_fail (GMIME_IS_CONTENT_TYPE(ctype), NULL);
+@@ -484,21 +477,15 @@
+ 	if (charset) {
+ 		char *utf8;
+ 		utf8 = mu_str_convert_to_utf8
+-		         (buffer,
+-			  g_mime_charset_iconv_name (charset));
++		         (buffer,  g_mime_charset_iconv_name (charset));
+ 		if (utf8) {
+ 			g_free (buffer);
+ 			return utf8;
+ 		}
+-	} else if (g_utf8_validate (buffer, -1, NULL)) {
+-		/*  check if the buffer is valid utf8, even if it doesn't
+-		 *  say so explicitly... if that is the case, return it as-is */
+-
+-		/* nothing to do, buffer is already utf8 */
+-
+-	} else {
+-		/* hmmm.... no charset at all, or conversion failed; ugly
+-		  *  hack: replace all non-ascii chars with '.' */
++	} else if (!g_utf8_validate (buffer, -1, NULL)) {
++		/* if it's already utf8, nothing to do otherwise: no
++		   charset at all, or conversion failed; ugly * hack:
++		   replace all non-ascii chars with '.' */
+ 		mu_str_asciify_in_place (buffer);
+ 	}
+ 

I am not sure how to upload this beast, whether the version number
and distribution is fine, so please let me know.

Best wishes

Norbert
------------------------------------------------------------------------
Norbert Preining            preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan                                 TeX Live & Debian Developer
DSA: 0x09C5B094   fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
DORRIDGE (n.)
Technical term for one of the lame excuses written in very small print
on the side of packets of food or washing powder to explain why
there's hardly anything inside. Examples include 'Contents may have
settled in transit' and 'To keep each biscuit fresh they have been
individually wrapped in silver paper and cellophane and separated with
corrugated lining, a cardboard flap, and heavy industrial tyres'.
			--- Douglas Adams, The Meaning of Liff


Reply to: