r23102 - in /desktop/experimental/glib2.0/debian: changelog patches/05-dont-fail-a-couple-of-tests-when-running-as-root.patch patches/06-test-for-unexisting-files-in-TMP-and-not-in-HOME.patch

pochu at users.alioth.debian.org pochu at users.alioth.debian.org
Tue Feb 23 17:34:22 UTC 2010


Author: pochu
Date: Tue Feb 23 17:34:16 2010
New Revision: 23102

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=23102
Log:
* debian/patches/05-dont-fail-a-couple-of-tests-when-running-as-root.patch:
  - Updated.
* 06-test-for-unexisting-files-in-TMP-and-not-in-HOME.patch:
  - Added, don't look for an unexisting file in $HOME since it will
    fail with an unexpected result if it's not writable (which happens
    on some buildds). Look at $TMP instead.

Added:
    desktop/experimental/glib2.0/debian/patches/06-test-for-unexisting-files-in-TMP-and-not-in-HOME.patch
Modified:
    desktop/experimental/glib2.0/debian/changelog
    desktop/experimental/glib2.0/debian/patches/05-dont-fail-a-couple-of-tests-when-running-as-root.patch

Modified: desktop/experimental/glib2.0/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/changelog?rev=23102&op=diff
==============================================================================
--- desktop/experimental/glib2.0/debian/changelog [utf-8] (original)
+++ desktop/experimental/glib2.0/debian/changelog [utf-8] Tue Feb 23 17:34:16 2010
@@ -1,3 +1,14 @@
+glib2.0 (2.23.4-2) UNRELEASED; urgency=low
+
+  * debian/patches/05-dont-fail-a-couple-of-tests-when-running-as-root.patch:
+    - Updated.
+  * 06-test-for-unexisting-files-in-TMP-and-not-in-HOME.patch:
+    - Added, don't look for an unexisting file in $HOME since it will
+      fail with an unexpected result if it's not writable (which happens
+      on some buildds). Look at $TMP instead.
+
+ -- Emilio Pozuelo Monfort <pochu at debian.org>  Mon, 22 Feb 2010 17:50:16 +0100
+
 glib2.0 (2.23.4-1) experimental; urgency=low
 
   [ Emilio Pozuelo Monfort ]

Modified: desktop/experimental/glib2.0/debian/patches/05-dont-fail-a-couple-of-tests-when-running-as-root.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/patches/05-dont-fail-a-couple-of-tests-when-running-as-root.patch?rev=23102&op=diff
==============================================================================
--- desktop/experimental/glib2.0/debian/patches/05-dont-fail-a-couple-of-tests-when-running-as-root.patch [utf-8] (original)
+++ desktop/experimental/glib2.0/debian/patches/05-dont-fail-a-couple-of-tests-when-running-as-root.patch [utf-8] Tue Feb 23 17:34:16 2010
@@ -1,4 +1,4 @@
-From 7e9b5759df9fd29c03d9eb0ee6ddf41321af13e3 Mon Sep 17 00:00:00 2001
+From 84001b496a4abf1b3a09535b661de021303998ce Mon Sep 17 00:00:00 2001
 From: Emilio Pozuelo Monfort <pochu27 at gmail.com>
 Date: Fri, 19 Feb 2010 19:00:02 +0100
 Subject: [PATCH] Don't fail a couple of tests when running as root
@@ -9,11 +9,11 @@
 
 https://bugzilla.gnome.org/show_bug.cgi?id=552912
 ---
- gio/tests/live-g-file.c |   15 +++++++++++++--
- 1 files changed, 13 insertions(+), 2 deletions(-)
+ gio/tests/live-g-file.c |   18 ++++++++++++++++--
+ 1 files changed, 16 insertions(+), 2 deletions(-)
 
 diff --git a/gio/tests/live-g-file.c b/gio/tests/live-g-file.c
-index e0f9bff..cb548ac 100644
+index e0f9bff..1ca70ce 100644
 --- a/gio/tests/live-g-file.c
 +++ b/gio/tests/live-g-file.c
 @@ -23,6 +23,8 @@
@@ -25,14 +25,22 @@
  #include <string.h>
  #include <sys/stat.h>
  
-@@ -715,8 +717,17 @@ do_copy_move (GFile * root, struct StructureItem item, const char *target_dir,
+@@ -100,6 +102,7 @@ static const struct StructureItem sample_struct[] = {
+ 	{"lost_symlink",		"nowhere",	G_FILE_TYPE_SYMBOLIC_LINK, G_FILE_CREATE_NONE, 0, 0, TEST_COPY | TEST_DELETE_NORMAL | TEST_OPEN | TEST_INVALID_SYMLINK},
+   };
+ 
++static gboolean test_suite;
+ static gboolean write_test;
+ static gboolean verbose;
+ static gboolean posix_compat;
+@@ -715,8 +718,17 @@ do_copy_move (GFile * root, struct StructureItem item, const char *target_dir,
    else if (((item.extra_flags & TEST_NO_ACCESS) == TEST_NO_ACCESS) ||
  	   (extra_flags == TEST_NO_ACCESS))
      {
 -      g_assert_cmpint (res, ==, FALSE);
 -      g_assert_error (error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED);
 +      /* This works for root, see bug #552912 */
-+      if (getuid () == 0)
++      if (test_suite && getuid () == 0)
 +	{
 +	  g_assert_cmpint (res, ==, TRUE);
 +	  g_assert_no_error (error);
@@ -45,6 +53,22 @@
      }
    /*  no error should be found, all exceptions defined above  */
    else
+@@ -1111,6 +1123,7 @@ main (int argc, char *argv[])
+     {NULL}
+   };
+ 
++  test_suite = FALSE;
+   verbose = FALSE;
+   write_test = FALSE;
+   only_create_struct = FALSE;
+@@ -1124,6 +1137,7 @@ main (int argc, char *argv[])
+   /*  no extra parameters specified, assume we're executed from glib test suite  */ 
+   if (argc < 2)
+     {
++	  test_suite = TRUE;
+ 	  verbose = TRUE;
+ 	  write_test = TRUE;
+ 	  only_create_struct = FALSE;
 -- 
 1.7.0
 

Added: desktop/experimental/glib2.0/debian/patches/06-test-for-unexisting-files-in-TMP-and-not-in-HOME.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/patches/06-test-for-unexisting-files-in-TMP-and-not-in-HOME.patch?rev=23102&op=file
==============================================================================
--- desktop/experimental/glib2.0/debian/patches/06-test-for-unexisting-files-in-TMP-and-not-in-HOME.patch (added)
+++ desktop/experimental/glib2.0/debian/patches/06-test-for-unexisting-files-in-TMP-and-not-in-HOME.patch [utf-8] Tue Feb 23 17:34:16 2010
@@ -1,0 +1,30 @@
+From ff454df9cd375d604e15373520fb2de04c2f8306 Mon Sep 17 00:00:00 2001
+From: Emilio Pozuelo Monfort <pochu27 at gmail.com>
+Date: Tue, 23 Feb 2010 18:19:16 +0100
+Subject: [PATCH] Test for unexisting files in $TMP and not in $HOME
+
+Some buildd environments have an unwritable $HOME, which makes the
+test that looks for an unexisting file there fail. Use $TMP instead,
+which should be more reliable.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=610860
+---
+ gio/tests/readwrite.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/gio/tests/readwrite.c b/gio/tests/readwrite.c
+index 0d56185..2b1bd5e 100644
+--- a/gio/tests/readwrite.c
++++ b/gio/tests/readwrite.c
+@@ -140,7 +140,7 @@ test_g_file_open_readwrite (void)
+ 			     original_data, -1, NULL);
+   g_assert (res);
+ 
+-  path = g_build_filename (g_get_home_dir (), "g-a-nonexisting-file", NULL);
++  path = g_build_filename (g_get_tmp_dir (), "g-a-nonexisting-file", NULL);
+   file = g_file_new_for_path (path);
+   g_free (path);
+   error = NULL;
+-- 
+1.7.0
+




More information about the pkg-gnome-commits mailing list