aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2009-05-02 09:01:53 +0800
committermarcus <marcus@FreeBSD.org>2009-05-02 09:01:53 +0800
commit1bee448fb82aaa21fb94023d6cad3dbc0a181179 (patch)
tree48f13dc8d9a23e61185ca0ae80d6ae2d6fca5aff /devel
parentd0ea56414cce66e0a87956e668d4b0bd8bf2a312 (diff)
downloadfreebsd-ports-gnome-1bee448fb82aaa21fb94023d6cad3dbc0a181179.tar.gz
freebsd-ports-gnome-1bee448fb82aaa21fb94023d6cad3dbc0a181179.tar.zst
freebsd-ports-gnome-1bee448fb82aaa21fb94023d6cad3dbc0a181179.zip
Further extend the previous patches to make sure that excluded paths
do not get opened (but rather they will be polled).
Diffstat (limited to 'devel')
-rw-r--r--devel/gamin/Makefile2
-rw-r--r--devel/gamin/files/patch-server_gam_kqueue.c28
-rw-r--r--devel/gamin/files/patch-server_gam_server.c14
3 files changed, 34 insertions, 10 deletions
diff --git a/devel/gamin/Makefile b/devel/gamin/Makefile
index 1ad36da74534..e367c6d6a805 100644
--- a/devel/gamin/Makefile
+++ b/devel/gamin/Makefile
@@ -8,7 +8,7 @@
PORTNAME= gamin
PORTVERSION= 0.1.10
-PORTREVISION?= 1
+PORTREVISION?= 2
CATEGORIES?= devel
MASTER_SITES= http://www.gnome.org/~veillard/gamin/sources/
diff --git a/devel/gamin/files/patch-server_gam_kqueue.c b/devel/gamin/files/patch-server_gam_kqueue.c
index df4437e31664..7c65fe56911e 100644
--- a/devel/gamin/files/patch-server_gam_kqueue.c
+++ b/devel/gamin/files/patch-server_gam_kqueue.c
@@ -1,5 +1,5 @@
--- server/gam_kqueue.c.orig 2007-07-04 09:50:41.000000000 -0400
-+++ server/gam_kqueue.c 2007-08-10 15:03:59.000000000 -0400
++++ server/gam_kqueue.c 2009-05-01 20:52:14.000000000 -0400
@@ -10,9 +10,10 @@
* FAM should do: we do not call g_dir_open() if the file is a
* symbolic link).
@@ -37,7 +37,15 @@
#include <sys/types.h>
#include <sys/sysctl.h>
#include <sys/stat.h>
-@@ -326,7 +329,7 @@ gam_kqueue_isdir (const char *pathname,
+@@ -62,6 +65,7 @@
+ #include "gam_error.h"
+ #include "gam_kqueue.h"
+ #include "gam_event.h"
++#include "gam_excludes.h"
+ #include "gam_server.h"
+ #include "gam_poll_basic.h"
+
+@@ -326,7 +330,7 @@ gam_kqueue_isdir (const char *pathname,
static gboolean
gam_kqueue_get_uint_sysctl (const char *name, unsigned int *value)
{
@@ -46,7 +54,7 @@
if (sysctlbyname(name, value, &value_len, (void *)NULL, 0) < 0)
{
-@@ -509,6 +512,9 @@ static gboolean
+@@ -509,33 +513,52 @@ static gboolean
gam_kqueue_monitor_enable_kqueue (Monitor *mon)
{
struct kevent ev[1];
@@ -56,9 +64,15 @@
if (open_files == max_open_files)
{
-@@ -516,26 +522,36 @@ gam_kqueue_monitor_enable_kqueue (Monito
+ GAM_DEBUG(DEBUG_INFO, "cannot open %s (max_open_files limit reached), falling back to poll\n", mon->pathname);
return FALSE;
}
++
++ if (gam_exclude_check(mon->pathname))
++ {
++ GAM_DEBUG(DEBUG_INFO, "not using kqueue for %s since it is excluded, falling back to poll\n", mon->pathname);
++ return FALSE;
++ }
- mon->fd = open(mon->pathname, O_RDONLY | O_NOFOLLOW);
+ mon->fd = open(mon->pathname, O_RDONLY | O_NONBLOCK | O_NOFOLLOW);
@@ -99,7 +113,7 @@
}
static void
-@@ -840,6 +856,8 @@ gam_kqueue_sub_monitor_emit_event (SubMo
+@@ -840,6 +863,8 @@ gam_kqueue_sub_monitor_emit_event (SubMo
case GAMIN_EVENT_MOVED:
gam_kqueue_sub_monitor_set_missing(smon);
break;
@@ -108,7 +122,7 @@
}
gam_server_emit_event(mon->pathname, isdir, event, smon->subs, 1);
-@@ -981,6 +999,8 @@ gam_kqueue_file_monitor_emit_event (File
+@@ -981,6 +1006,8 @@ gam_kqueue_file_monitor_emit_event (File
gam_kqueue_hash_table_remove(fmon->smon->fmons, fmon);
break;
@@ -117,7 +131,7 @@
}
}
-@@ -1167,6 +1187,9 @@ gam_kqueue_init (void)
+@@ -1167,6 +1194,9 @@ gam_kqueue_init (void)
channel = g_io_channel_unix_new(kq);
g_io_add_watch(channel, G_IO_IN, gam_kqueue_kevent_cb, NULL);
diff --git a/devel/gamin/files/patch-server_gam_server.c b/devel/gamin/files/patch-server_gam_server.c
index 886a93c70cdd..77c9b75f4357 100644
--- a/devel/gamin/files/patch-server_gam_server.c
+++ b/devel/gamin/files/patch-server_gam_server.c
@@ -1,5 +1,5 @@
--- server/gam_server.c.orig 2007-07-04 09:36:49.000000000 -0400
-+++ server/gam_server.c 2009-04-15 22:37:01.000000000 -0400
++++ server/gam_server.c 2009-05-01 20:25:41.000000000 -0400
@@ -32,7 +32,7 @@
#include "gam_server.h"
#include "gam_channel.h"
@@ -19,7 +19,17 @@
} else {
gam_fs_mon_type type;
type = gam_fs_get_mon_type (path);
-@@ -438,7 +439,7 @@ gam_server_get_kernel_handler (void)
+@@ -243,7 +244,8 @@ gam_remove_subscription(GamSubscription
+ return gam_poll_remove_subscription (sub);
+ else
+ #endif
+- return gam_kernel_remove_subscription(sub);
++ /*return gam_kernel_remove_subscription(sub);*/
++ return gam_poll_remove_subscription (sub);
+ } else {
+ gam_fs_mon_type type;
+ type = gam_fs_get_mon_type (path);
+@@ -438,7 +440,7 @@ gam_server_get_kernel_handler (void)
GamPollHandler
gam_server_get_poll_handler (void)
{