rpms/telepathy-glib/F-9 append_log_file.patch, NONE, 1.1 telepathy-glib.spec, 1.15, 1.16
Guillaume Desmottes
gdesmott at fedoraproject.org
Mon Aug 25 09:17:56 UTC 2008
- Previous message (by thread): rpms/arpack/F-9 arpack.spec,1.1,1.2
- Next message (by thread): rpms/fail2ban/F-8 fail2ban-0.8.3-init.patch, NONE, 1.1 .cvsignore, 1.6, 1.7 fail2ban.spec, 1.12, 1.13 sources, 1.8, 1.9 fail2ban-0.8.1-init.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: gdesmott
Update of /cvs/pkgs/rpms/telepathy-glib/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18191
Modified Files:
telepathy-glib.spec
Added Files:
append_log_file.patch
Log Message:
tp_debug_divert_messages: open the file in append mode if the filename is prefixed with '+'. Backported from upstream. (dev.laptop.org #7833)
append_log_file.patch:
--- NEW FILE append_log_file.patch ---
diff --git a/telepathy-glib/debug.c b/telepathy-glib/debug.c
index a16df5a..37687c0 100644
--- a/telepathy-glib/debug.c
+++ b/telepathy-glib/debug.c
@@ -299,6 +299,11 @@ tp_debug_set_persistent (gboolean persistent)
* stdout and stderr, and sending all messages that would have gone there
* to the given file instead.
*
+ * By default the file is truncated and hence overwritten each time the
+ * process is executed.
+ * Since version 0.7.UNRELEASED, if the filename is prefixed with '+' then the
+ * file is not truncated and output is added at the end of the file.
+ *
* Passing %NULL to this function is guaranteed to have no effect. This is
* so you can call it with the recommended usage
* <literal>tp_debug_divert_messages (g_getenv ("MYAPP_LOGFILE"))</literal>
@@ -317,7 +322,16 @@ tp_debug_divert_messages (const gchar *filename)
if (filename == NULL)
return;
- fd = g_open (filename, O_WRONLY | O_CREAT | O_TRUNC, 0644);
+ if (filename[0] == '+')
+ {
+ /* open in append mode */
+ fd = g_open (filename + 1, O_WRONLY | O_CREAT | O_APPEND, 0644);
+ }
+ else
+ {
+ /* open in trunc mode */
+ fd = g_open (filename, O_WRONLY | O_CREAT | O_TRUNC, 0644);
+ }
if (fd == -1)
{
Index: telepathy-glib.spec
===================================================================
RCS file: /cvs/pkgs/rpms/telepathy-glib/F-9/telepathy-glib.spec,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- telepathy-glib.spec 3 Jul 2008 11:46:23 -0000 1.15
+++ telepathy-glib.spec 25 Aug 2008 09:17:26 -0000 1.16
@@ -4,7 +4,7 @@
Name: telepathy-glib
Version: 0.7.11
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: GLib bindings for Telepathy
Group: System Environment/Libraries
@@ -23,6 +23,9 @@
# https://bugzilla.redhat.com/show_bug.cgi?id=436773
Patch0: telepathy-glib-broken-pkgconfig.patch
+# https://dev.laptop.org/ticket/7833
+Patch1: append_log_file.patch
+
%description
Telepathy-glib is the glib bindings for the telepathy unified framework
for all forms of real time conversations, including instant messaging, IRC,
@@ -48,6 +51,7 @@
%prep
%setup -q
%patch0 -p1 -b .requires
+%patch1 -p1 -b .logfile
%check
#make check
@@ -89,6 +93,10 @@
%changelog
+* Mon Aug 25 2008 Guillaume Desmottes <guillaume.desmottes at collabora.co.uk> - 0.7.11-2
+- tp_debug_divert_messages: open the file in append mode if the filename is prefixed
+with '+'. Backported from upstream. (dev.laptop.org #7833)
+
* Thu Jul 3 2008 Guillaume Desmottes <guillaume.desmottes at collabora.co.uk> - 0.7.11-1
- Update to 0.7.11
- Previous message (by thread): rpms/arpack/F-9 arpack.spec,1.1,1.2
- Next message (by thread): rpms/fail2ban/F-8 fail2ban-0.8.3-init.patch, NONE, 1.1 .cvsignore, 1.6, 1.7 fail2ban.spec, 1.12, 1.13 sources, 1.8, 1.9 fail2ban-0.8.1-init.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list