[Pkg-utopia-commits] r940 - in packages/unstable/hal/debian: .
patches
Sjoerd Simons
sjoerd at costa.debian.org
Mon Aug 14 22:05:33 UTC 2006
Author: sjoerd
Date: 2006-08-14 22:05:30 +0000 (Mon, 14 Aug 2006)
New Revision: 940
Added:
packages/unstable/hal/debian/patches/14_probe_volume_invalidlabel.patch
Modified:
packages/unstable/hal/debian/changelog
Log:
* debian/patches/14_probe_volume_invalidlabel.patch
- Added. Don't try to fix device labels with invalid UTF-8 characters if
more than 20% of the characters is invalid. This avoids totally
unintelligible labels while still preserving only mildly damaged ones.
- From the ubuntu hal package, patch created by Martin Pitt
Modified: packages/unstable/hal/debian/changelog
===================================================================
--- packages/unstable/hal/debian/changelog 2006-08-14 22:00:35 UTC (rev 939)
+++ packages/unstable/hal/debian/changelog 2006-08-14 22:05:30 UTC (rev 940)
@@ -16,6 +16,11 @@
- Added. refresh ACPI events after suspend/hibernate
- From the ubuntu hal package, patch created by Paul Sladen based on
upstream CVS.
+ * debian/patches/14_probe_volume_invalidlabel.patch
+ - Added. Don't try to fix device labels with invalid UTF-8 characters if
+ more than 20% of the characters is invalid. This avoids totally
+ unintelligible labels while still preserving only mildly damaged ones.
+ - From the ubuntu hal package, patch created by Martin Pitt
[ Sebastian Dröge ]
* debian/pycompat,
@@ -27,7 +32,7 @@
+ Add myself to Uploaders
- -- Sjoerd Simons <sjoerd at debian.org> Mon, 14 Aug 2006 23:59:24 +0200
+ -- Sjoerd Simons <sjoerd at debian.org> Tue, 15 Aug 2006 00:03:31 +0200
hal (0.5.7-2) unstable; urgency=low
Added: packages/unstable/hal/debian/patches/14_probe_volume_invalidlabel.patch
===================================================================
--- packages/unstable/hal/debian/patches/14_probe_volume_invalidlabel.patch 2006-08-14 22:00:35 UTC (rev 939)
+++ packages/unstable/hal/debian/patches/14_probe_volume_invalidlabel.patch 2006-08-14 22:05:30 UTC (rev 940)
@@ -0,0 +1,25 @@
+diff -ruN hal-0.5.7-old/hald/linux2/probing/probe-volume.c hal-0.5.7/hald/linux2/probing/probe-volume.c
+--- hal-0.5.7-old/hald/linux2/probing/probe-volume.c 2006-02-22 22:27:52.000000000 +0100
++++ hal-0.5.7/hald/linux2/probing/probe-volume.c 2006-05-10 18:20:39.000000000 +0200
+@@ -67,6 +67,7 @@
+ char *endchar;
+ char *newstr;
+ char *s;
++ unsigned fixes = 0;
+
+ if (str == NULL)
+ return NULL;
+@@ -75,6 +76,13 @@
+ s = newstr;
+ while (!g_utf8_validate (s, -1, (const char **) &endchar)) {
+ *endchar = '_';
++ ++fixes;
++ }
++
++ /* If we had to fix more than 20% of the characters, give up */
++ if (fixes > 0 && g_utf8_strlen (newstr, -1) / fixes < 5) {
++ g_free (newstr);
++ newstr = g_strdup("");
+ }
+
+ return newstr;
More information about the Pkg-utopia-commits
mailing list