diff -u glib2.0-2.23.4/debian/changelog glib2.0-2.23.4/debian/changelog --- glib2.0-2.23.4/debian/changelog +++ glib2.0-2.23.4/debian/changelog @@ -1,3 +1,10 @@ +glib2.0 (2.23.4-1ubuntu3) lucid; urgency=low + + * Add debian/patches/80_unit.patch to use SI prefixes for base-10 units. Refer + to https://wiki.ubuntu.com/UnitsPolicy for more details (LP: #369525). + + -- Benjamin Drung Tue, 09 Mar 2010 17:24:26 +0100 + glib2.0 (2.23.4-1ubuntu2) lucid; urgency=low * Add subunit support to gtester-report. diff -u glib2.0-2.23.4/debian/patches/series glib2.0-2.23.4/debian/patches/series --- glib2.0-2.23.4/debian/patches/series +++ glib2.0-2.23.4/debian/patches/series @@ -8,0 +9 @@ +80_unit.patch only in patch2: unchanged: --- glib2.0-2.23.4.orig/debian/patches/80_unit.patch +++ glib2.0-2.23.4/debian/patches/80_unit.patch @@ -0,0 +1,40 @@ +Description: Use SI prefixes for base-10 units and not for base-2 units + More details can be found on https://wiki.ubuntu.com/UnitsPolicy +Bug-Ubuntu: https://launchpad.net/bug/369525 +Author: Benjamin Drung + +--- glib2.0-2.23.4.orig/glib/gfileutils.c 2010-03-09 17:26:20.604513785 +0100 ++++ glib2.0-2.23.4/glib/gfileutils.c 2010-03-09 17:29:05.475763433 +0100 +@@ -1742,7 +1742,7 @@ + return str; + } + +-#define KILOBYTE_FACTOR (G_GOFFSET_CONSTANT (1024)) ++#define KILOBYTE_FACTOR (G_GOFFSET_CONSTANT (1000)) + #define MEGABYTE_FACTOR (KILOBYTE_FACTOR * KILOBYTE_FACTOR) + #define GIGABYTE_FACTOR (MEGABYTE_FACTOR * KILOBYTE_FACTOR) + #define TERABYTE_FACTOR (GIGABYTE_FACTOR * KILOBYTE_FACTOR) +@@ -1754,11 +1754,11 @@ + * @size: a size in bytes. + * + * Formats a size (for example the size of a file) into a human readable string. +- * Sizes are rounded to the nearest size prefix (KB, MB, GB) and are displayed +- * rounded to the nearest tenth. E.g. the file size 3292528 bytes will be ++ * Sizes are rounded to the nearest size prefix (kB, MB, GB) and are displayed ++ * rounded to the nearest tenth. E.g. the file size 3139528 bytes will be + * converted into the string "3.1 MB". + * +- * The prefix units base is 1024 (i.e. 1 KB is 1024 bytes). ++ * The prefix units base is 1000 (i.e. 1 kB is 1000 bytes). + * + * This string should be freed with g_free() when not needed any longer. + * +@@ -1779,7 +1779,7 @@ + if (size < (goffset) MEGABYTE_FACTOR) + { + displayed_size = (gdouble) size / (gdouble) KILOBYTE_FACTOR; +- return g_strdup_printf (_("%.1f KB"), displayed_size); ++ return g_strdup_printf (_("%.1f kB"), displayed_size); + } + else if (size < (goffset) GIGABYTE_FACTOR) + {