pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/glib2 fix some code which assumes that the dev_t...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9b7566902973
branches:  trunk
changeset: 542017:9b7566902973
user:      drochner <drochner%pkgsrc.org@localhost>
date:      Tue Apr 29 18:58:40 2008 +0000

description:
fix some code which assumes that the dev_t of the user's home directory
is not equal to zero. On NetBSD, wd0a has major and minor number 0,
so that assumption doesn't hold.
Tested, and reported upstream, by Jared D. McNeill. (gnome bug #530196)
Also reported as NetBSD PR pkg/38518.
bump PKGREVISION

diffstat:

 devel/glib2/Makefile         |   3 ++-
 devel/glib2/distinfo         |   3 ++-
 devel/glib2/patches/patch-ca |  37 +++++++++++++++++++++++++++++++++++++
 3 files changed, 41 insertions(+), 2 deletions(-)

diffs (70 lines):

diff -r 316a34241190 -r 9b7566902973 devel/glib2/Makefile
--- a/devel/glib2/Makefile      Tue Apr 29 18:39:24 2008 +0000
+++ b/devel/glib2/Makefile      Tue Apr 29 18:58:40 2008 +0000
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.134 2008/04/13 13:15:59 tnn Exp $
+# $NetBSD: Makefile,v 1.135 2008/04/29 18:58:40 drochner Exp $
 
 # When updating glib2, please apply patch-ak to configure.in
 # Then run a matching version of autoconf to regen patch-aa.
 DISTNAME=              glib-2.16.3
 PKGNAME=               ${DISTNAME:S/glib/glib2/}
+PKGREVISION=           1
 CATEGORIES=            devel
 MASTER_SITES=          ftp://ftp.gtk.org/pub/glib/2.16/ \
                        ftp://ftp.cs.umn.edu/pub/gimp/pub/glib/2.16/ \
diff -r 316a34241190 -r 9b7566902973 devel/glib2/distinfo
--- a/devel/glib2/distinfo      Tue Apr 29 18:39:24 2008 +0000
+++ b/devel/glib2/distinfo      Tue Apr 29 18:58:40 2008 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.94 2008/04/10 12:13:49 drochner Exp $
+$NetBSD: distinfo,v 1.95 2008/04/29 18:58:40 drochner Exp $
 
 SHA1 (glib-2.16.3.tar.bz2) = f73fd53130a46f21ff4ee9faa69b9956787c571e
 RMD160 (glib-2.16.3.tar.bz2) = 72260f5f9022ee3f97b79b5705ad6117adc279fd
@@ -16,3 +16,4 @@
 SHA1 (patch-ak) = 4eee3ce549ba0972ab5d5d8166d37d2b61320e68
 SHA1 (patch-al) = aa2dbd63d53298aab3a30ec6d27e836717c960e3
 SHA1 (patch-ba) = 43dda2f4d89a82e645ef8f24d62f13ca9e4ddd9d
+SHA1 (patch-ca) = 8cfc2903cfb4faf42ec79da0acdc66446e0fb091
diff -r 316a34241190 -r 9b7566902973 devel/glib2/patches/patch-ca
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/glib2/patches/patch-ca      Tue Apr 29 18:58:40 2008 +0000
@@ -0,0 +1,37 @@
+$NetBSD: patch-ca,v 1.1 2008/04/29 18:58:40 drochner Exp $
+
+--- gio/glocalfile.c.orig      2008-04-28 13:27:29.000000000 +0200
++++ gio/glocalfile.c
+@@ -1580,7 +1580,8 @@ escape_trash_name (char *name)
+ gboolean
+ _g_local_file_has_trash_dir (const char *dirname, dev_t dir_dev)
+ {
+-  static gsize home_dev = 0;
++  static gsize home_dev_set = 0;
++  static dev_t home_dev;
+   char *topdir, *globaldir, *trashdir, *tmpname;
+   uid_t uid;
+   char uid_str[32];
+@@ -1588,18 +1589,17 @@ _g_local_file_has_trash_dir (const char 
+   gboolean res;
+   int statres;
+       
+-  if (g_once_init_enter (&home_dev))
++  if (g_once_init_enter (&home_dev_set))
+     {
+-      gsize setup_value = 0;
+       struct stat home_stat;
+       
+       g_stat (g_get_home_dir (), &home_stat);
+-      setup_value = home_stat.st_dev;
+-      g_once_init_leave (&home_dev, setup_value);
++      home_dev = home_stat.st_dev;
++      g_once_init_leave (&home_dev_set, 1);
+     }
+ 
+   /* Assume we can trash to the home */
+-  if (dir_dev == (dev_t)home_dev)
++  if (dir_dev == home_dev)
+     return TRUE;
+ 
+   topdir = find_mountpoint_for (dirname, dir_dev);



Home | Main Index | Thread Index | Old Index