pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/misc/gnome2-utils Fix the gnome-screenshot application...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d128601f9881
branches:  trunk
changeset: 518808:d128601f9881
user:      jmmv <jmmv%pkgsrc.org@localhost>
date:      Mon Sep 18 16:38:44 2006 +0000

description:
Fix the gnome-screenshot application under NetBSD and close PR pkg/31936.
Bump PKGREVISION to 2.

NetBSD's poll(2) raises a POLLIN event when a file descriptor is closed;
Linux doesn't seem to do this.  This caused an unexpected G_IO_IN event
in gnome-screenshot's code that was used to detect errors, instead of the
G_IO_HUP it was expecting.

diffstat:

 misc/gnome2-utils/Makefile         |   4 +-
 misc/gnome2-utils/distinfo         |   4 +-
 misc/gnome2-utils/patches/patch-ac |  41 +++++++++++++++++++++++++++++++++++--
 3 files changed, 42 insertions(+), 7 deletions(-)

diffs (81 lines):

diff -r ede93f88bad2 -r d128601f9881 misc/gnome2-utils/Makefile
--- a/misc/gnome2-utils/Makefile        Mon Sep 18 16:05:47 2006 +0000
+++ b/misc/gnome2-utils/Makefile        Mon Sep 18 16:38:44 2006 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.60 2006/09/16 12:20:39 jmmv Exp $
+# $NetBSD: Makefile,v 1.61 2006/09/18 16:38:44 jmmv Exp $
 #
 
 DISTNAME=              gnome-utils-2.16.0
-PKGREVISION=           1
+PKGREVISION=           2
 CATEGORIES=            misc gnome
 MASTER_SITES=          ${MASTER_SITE_GNOME:=sources/gnome-utils/2.16/}
 EXTRACT_SUFX=          .tar.bz2
diff -r ede93f88bad2 -r d128601f9881 misc/gnome2-utils/distinfo
--- a/misc/gnome2-utils/distinfo        Mon Sep 18 16:05:47 2006 +0000
+++ b/misc/gnome2-utils/distinfo        Mon Sep 18 16:38:44 2006 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.17 2006/09/15 15:23:27 jmmv Exp $
+$NetBSD: distinfo,v 1.18 2006/09/18 16:38:45 jmmv Exp $
 
 SHA1 (gnome-utils-2.16.0.tar.bz2) = 32af23b4f5948ab94c2d0e1cf7e657ab2bd92874
 RMD160 (gnome-utils-2.16.0.tar.bz2) = 9b166182a0f1ed5baf6caa1b6ab66643c5ecdca3
 Size (gnome-utils-2.16.0.tar.bz2) = 3144914 bytes
 SHA1 (patch-aa) = 0ae23e6027b164a2e8a42eafeadcede0b9034ede
-SHA1 (patch-ac) = 331b43a0f5d79555f79d448c6ea2a36ce6783ea5
+SHA1 (patch-ac) = 29075057d795d7604980471ce1c88411f1c9bec3
diff -r ede93f88bad2 -r d128601f9881 misc/gnome2-utils/patches/patch-ac
--- a/misc/gnome2-utils/patches/patch-ac        Mon Sep 18 16:05:47 2006 +0000
+++ b/misc/gnome2-utils/patches/patch-ac        Mon Sep 18 16:38:44 2006 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ac,v 1.3 2006/01/20 03:16:14 joerg Exp $
+$NetBSD: patch-ac,v 1.4 2006/09/18 16:38:45 jmmv Exp $
 
---- gnome-screenshot/screenshot-save.c.orig    2006-01-20 02:52:06.000000000 +0000
+--- gnome-screenshot/screenshot-save.c.orig    2006-06-11 13:19:30.000000000 +0200
 +++ gnome-screenshot/screenshot-save.c
-@@ -12,8 +12,6 @@ static char *tmp_filename = NULL;
+@@ -14,8 +14,6 @@ static char *tmp_filename = NULL;
  static SaveFunction save_callback = NULL;
  static gpointer save_user_data = NULL;
  
@@ -11,3 +11,38 @@
  
  
  /* Strategy for saving:
+@@ -98,6 +96,7 @@ read_pipe_from_child (GIOChannel   *sour
+       GtkWidget *dialog;
+ 
+       g_io_channel_read_line (source, &error_message, NULL, NULL, NULL);
++      if (error_message != NULL && strcmp (error_message, "OK") != 0) {
+       message = g_strdup_printf ("Unable to save the screenshot to disk:\n\n%s", error_message);
+       dialog = gtk_message_dialog_new (NULL, 0,
+                                      GTK_MESSAGE_ERROR,
+@@ -106,6 +105,7 @@ read_pipe_from_child (GIOChannel   *sour
+       gtk_dialog_run (GTK_DIALOG (dialog));
+       gtk_widget_destroy (dialog);
+       exit (1);
++      }
+     }
+ 
+   (*save_callback) (save_user_data);
+@@ -194,8 +194,7 @@ screenshot_save_start (GdkPixbuf    *pix
+                  ERROR_MESSAGE,
+                  strlen (ERROR_MESSAGE));
+       }
+-      /* By closing the pipe, we let the main process know that we're
+-       * done saving it. */
++      write (pipe_from_child[1], "OK", strlen ("OK"));
+       close (pipe_from_child[1]);
+       read (parent_exit_notification[0], &c, 1);
+ 
+@@ -211,7 +210,7 @@ screenshot_save_start (GdkPixbuf    *pix
+ 
+       channel = g_io_channel_unix_new (pipe_from_child[0]);
+       g_io_add_watch (channel,
+-                    G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL,
++                    G_IO_IN | G_IO_ERR | G_IO_NVAL,
+                     read_pipe_from_child,
+                     NULL);
+       g_io_channel_unref (channel);



Home | Main Index | Thread Index | Old Index