Your message dated Mon, 25 May 2009 21:47:13 +0000
with message-id <[email protected]>
and subject line Bug#443743: fixed in gnome-utils 2.26.0-1
has caused the Debian Bug report #443743,
regarding gnome-utils: gnome-system-log gives a bad error message if file fails 
to open
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
443743: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=443743
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gnome-utils
Version: 2.14.0.dfsg-5
Severity: minor
Tags: patch


I have patched the gnome-utils source to fix a bug with the 
"gnome-system-log" app for displaying system logs (called 'logview' in 
the source tree). At the moment if the program cannot either open or 
parse a file, it gives the error message "<filename> is not a log file". 
This is a bit unuseful if your file couldn't be opened for some other 
reason, eg permissions. The patch fixes this so that there are several 
different possible error messages. This fixes bug #349756 reported on 
bugs.gnome.org. I will also send a patch to the upstream maintainers.

The patch is against the version on stable, 2.14.0.

diff -ru o/gnome-utils-2.14.0.dfsg/logview/logrtns.c 
gnome-utils-2.14.0.dfsg/logview/logrtns.c
--- o/gnome-utils-2.14.0.dfsg/logview/logrtns.c    2005-11-23 
19:30:00.000000000 +0000
+++ gnome-utils-2.14.0.dfsg/logview/logrtns.c    2007-09-06 
03:15:15.000000000 +0100
@@ -36,7 +36,7 @@

char *error_main = N_("One file or more could not be opened");

-static LogStats *log_stats_new (char *filename, gboolean show_error);
+static int log_stats_new (LogStats **stats_ref, char *filename, 
gboolean show_error);

/* File checking */

@@ -104,12 +104,13 @@
file_is_log (char *filename, gboolean show_error)
{
     LogStats *stats;
+    int s;

     if (filename == NULL)
         return;

-    stats = log_stats_new (filename, show_error);
-    if (stats==NULL)
+    s = log_stats_new (&stats, filename, show_error);
+    if (s!=0)
         return FALSE;
     else {
         g_free (stats);
@@ -299,11 +300,11 @@
/*
    log_stats_new
    Read the log and get some statistics from it.
-   Returns NULL if the file is not a log.
+   Returns an non-zero error code if it cannot open or parse the file.
*/

-static LogStats *
-log_stats_new (char *filename, gboolean show_error)
+static int
+log_stats_new (LogStats** stats_ref, char *filename, gboolean 
show_error)
{
    GnomeVFSResult result;
    GnomeVFSFileInfo *info;
@@ -314,12 +315,12 @@
    char *found_space;

    if (filename == NULL)
-       return NULL;
+       return 1;

    /* Read first line and check that it is text */
    result = gnome_vfs_open (&handle, filename, GNOME_VFS_OPEN_READ);
    if (result != GNOME_VFS_OK) {
-       return NULL;
+          return 2;
    }

    info = gnome_vfs_file_info_new ();
@@ -327,20 +328,20 @@
    if (result != GNOME_VFS_OK || info->type != 
GNOME_VFS_FILE_TYPE_REGULAR) {
        gnome_vfs_file_info_unref (info);
        gnome_vfs_close (handle);
-       return NULL;
+           return -1;
    }

    result = gnome_vfs_read (handle, buff, sizeof(buff), &size);
    gnome_vfs_close (handle);
    if (result != GNOME_VFS_OK) {
        gnome_vfs_file_info_unref (info);
-       return NULL;
+       return -1;
    }
    
    found_space = g_strstr_len (buff, 1024, " ");
    if (found_space == NULL) {
        gnome_vfs_file_info_unref (info);
-       return NULL;
+       return -1;
    }
    
    stats = g_new (LogStats, 1);  
@@ -348,7 +349,8 @@
    stats->file_size = info->size;
    gnome_vfs_file_info_unref (info);

-   return (stats);
+   *stats_ref = stats;
+   return (0);
}

Log *
@@ -361,13 +363,14 @@
    int i, size;
    GList *days;
    Log *log;
+   int err;
    
-   stats = log_stats_new (filename, show_error);
-   if (stats == NULL) {
+   err = log_stats_new (&stats, filename, show_error);
+   if (err != 0) {
        if (file_is_zipped (filename)) {    
            zipped_name = g_strdup_printf ("%s#gzip:", filename);
-           stats = log_stats_new (filename, show_error);
-           if (stats == NULL) {
+       err = log_stats_new (&stats, filename, show_error);
+       if (err != 0) {
                opened = FALSE;
            }
        } else
@@ -375,8 +378,17 @@
    }
    
    if (opened == FALSE) {
+     switch( err ) {
+     case 2:
+       error_message = g_strdup_printf (_("File with no name"));
+       goto error;
+     case 1:
+       error_message = g_strdup_printf (_("Could not open file %s"), 
filename);
+       goto error;
+     default:
        error_message = g_strdup_printf (_("%s is not a log file."), 
filename);
        goto error;
+     }
    }

    log = g_new0 (Log, 1);  
@@ -475,7 +487,7 @@
void log_stats_reload (Log *log)
{
   g_free (log->stats);
-  log->stats = log_stats_new (log->name, TRUE);
+  log_stats_new (&log->stats, log->name, TRUE);
}

/* log_read_new_lines */

---end of patch---


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18jack-100907
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages gnome-utils depends on:
ii  e2fslibs 1.39+1.40-WIP-2006.11.14+dfsg-2 ext2 filesystem libraries
ii  gconf2   2.16.1-1                        GNOME configuration database syste
ii  libart-2 2.3.17-1                        Library of functions for 2D graphi
ii  libatk1. 1.12.4-3                        The ATK accessibility toolkit
ii  libaudio 0.2.6-6                         Open-source version of SGI's audio
ii  libavahi 0.6.16-3etch1                   Avahi client library
ii  libavahi 0.6.16-3etch1                   Avahi common library
ii  libavahi 0.6.16-3etch1                   Avahi glib integration library
ii  libbonob 2.14.0-3                        Bonobo CORBA interfaces library
ii  libbonob 2.14.0-5                        The Bonobo UI library
ii  libc6    2.3.6.ds1-13etch2               GNU C Library: Shared libraries
ii  libcairo 1.2.4-4                         The Cairo 2D vector graphics libra
ii  libdbus- 1.0.2-1                         simple interprocess messaging syst
ii  libesd0  0.2.36-3                        Enlightened Sound Daemon - Shared 
ii  libfontc 2.4.2-1.2                       generic font configuration library
ii  libfreet 2.2.1-5+etch1                   FreeType 2 font engine, shared lib
ii  libgconf 2.16.1-1                        GNOME configuration database syste
ii  libgcryp 1.2.3-2                         LGPL Crypto library - runtime libr
ii  libglade 1:2.6.0-4                       library to load .glade files at ru
ii  libglib2 2.12.4-2                        The GLib library of C routines
ii  libgnome 2.14.3-2                        Utility library for loading .deskt
ii  libgnome 0.6.0-3                         GNOME keyring services library
ii  libgnome 2.16.0-2                        The GNOME 2 library - runtime file
ii  libgnome 2.14.0-2                        A powerful object-oriented display
ii  libgnome 2.12.1-7                        The GNOME 2.2 print architecture -
ii  libgnome 2.12.1-4                        GNOME 2.2 print architecture User 
ii  libgnome 2.14.1-2                        The GNOME 2 libraries (User Interf
ii  libgnome 1:2.14.2-7                      GNOME virtual file-system (runtime
ii  libgnutl 1.4.4-3                         the GNU TLS library - runtime libr
ii  libgpg-e 1.4-1                           library for common error values an
ii  libgtk2. 2.8.20-7                        The GTK+ graphical user interface 
ii  libhal1  0.5.8.1-9                       Hardware Abstraction Layer - share
ii  libice6  1:1.0.1-2                       X11 Inter-Client Exchange library
ii  libjpeg6 6b-13                           The Independent JPEG Group's JPEG 
ii  liborbit 1:2.14.3-0.2                    libraries for ORBit2 - a CORBA ORB
ii  libpanel 2.14.3-5                        library for GNOME 2 panel applets
ii  libpango 1.14.8-5                        Layout and rendering of internatio
ii  libpng12 1.2.15~beta5-1                  PNG library - runtime
ii  libpopt0 1.10-3                          lib for parsing cmdline parameters
ii  libsm6   1:1.0.1-3                       X11 Session Management library
ii  libstart 0.8-2                           library for program launch feedbac
ii  libtasn1 0.3.6-2                         Manage ASN.1 structures (runtime)
ii  libx11-6 2:1.0.3-7                       X11 client-side library
ii  libxcurs 1.1.7-4                         X cursor management library
ii  libxext6 1:1.0.1-2                       X11 miscellaneous extension librar
ii  libxfixe 1:4.0.1-5                       X11 miscellaneous 'fixes' extensio
ii  libxi6   1:1.0.1-4                       X11 Input extension library
ii  libxiner 1:1.0.1-4.1                     X11 Xinerama extension library
ii  libxml2  2.6.27.dfsg-1                   GNOME XML library
ii  libxrand 2:1.1.0.2-5                     X11 RandR extension library
ii  libxrend 1:0.9.1-3                       X Rendering Extension client libra
ii  scrollke 0.3.14-13                       A free electronic cataloging syste
ii  zlib1g   1:1.2.3-13                      compression library - runtime

Versions of packages gnome-utils recommends:
ii  gksu                          2.0.0-1    graphical frontend to su

-- no debconf information



--- End Message ---
--- Begin Message ---
Source: gnome-utils
Source-Version: 2.26.0-1

We believe that the bug you reported is fixed in the latest version of
gnome-utils, which is due to be installed in the Debian FTP archive:

gnome-utils_2.26.0-1.diff.gz
  to pool/main/g/gnome-utils/gnome-utils_2.26.0-1.diff.gz
gnome-utils_2.26.0-1.dsc
  to pool/main/g/gnome-utils/gnome-utils_2.26.0-1.dsc
gnome-utils_2.26.0-1_i386.deb
  to pool/main/g/gnome-utils/gnome-utils_2.26.0-1_i386.deb
gnome-utils_2.26.0.orig.tar.gz
  to pool/main/g/gnome-utils/gnome-utils_2.26.0.orig.tar.gz
libgdict-1.0-6_2.26.0-1_i386.deb
  to pool/main/g/gnome-utils/libgdict-1.0-6_2.26.0-1_i386.deb
libgdict-1.0-dev_2.26.0-1_i386.deb
  to pool/main/g/gnome-utils/libgdict-1.0-dev_2.26.0-1_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Luca Bruno <[email protected]> (supplier of updated gnome-utils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 24 Mar 2009 00:02:25 +0100
Source: gnome-utils
Binary: libgdict-1.0-6 libgdict-1.0-dev gnome-utils
Architecture: source i386
Version: 2.26.0-1
Distribution: unstable
Urgency: low
Maintainer: Debian GNOME Maintainers 
<[email protected]>
Changed-By: Luca Bruno <[email protected]>
Description: 
 gnome-utils - GNOME desktop utilities
 libgdict-1.0-6 - GNOME Dictionary base library
 libgdict-1.0-dev - GNOME Dictionary base library - development files
Closes: 443743 521007 523539
Changes: 
 gnome-utils (2.26.0-1) unstable; urgency=low
 .
   [ Josselin Mouette ]
   * libgdict-1.0-dev.files: move the gtk-doc files to libgdict-1.0-dev.
   * Bump Replaces: accordingly.
   * Build-depend on libglib2.0-doc and libgtk2.0-doc to ensure proper
     xrefs.
   * Re-enable hal support on kfreebsd and hurd, now it has been ported.
   * Remove useless stuff in the descriptions. Closes: #521007.
 .
   [ Luca Bruno ]
   * New upstream release:
     + Set a meaningful error message if we can't read from the log file.
       Closes: #443743.
   * debian/patches:
     + Updated 01_logview_gksu.patch.
     + Removed 02_logview_crash.patch since logview has been rewritten.
     + Removed 03_screenshot_xinerama.patch, applied upstream.
   * debian/control.in:
     + Build-Depends version bumps:
       - libgtk2.0-dev to 2.14.0.
       - libglib2.0-dev to 2.16.0.
       - Removed libbonoboui2-dev and libgnomecanvas2-dev.
       - Added zlib1g-dev to view .gz log files.
     + Update Standards-Version to 3.8.1. No changes needed..
 .
   [ Emilio Pozuelo Monfort ]
   * Let libgdict-1.0-dev depend on ${misc:Depends}
   * debian/gnome-screenshot.1: scape hyphens where necessary.
 .
   [ Josselin Mouette ]
   * Set the team as primary maintainer. Closes: #523539.
   * Remove scrollkeeper dependency.
Checksums-Sha1: 
 d35a0b545316317f6680522ae59be4a0fb7c2eea 2300 gnome-utils_2.26.0-1.dsc
 0ecabe626fd4b95295531263661f4fe89743d600 8286440 gnome-utils_2.26.0.orig.tar.gz
 e2ee3f1420cfab3e99578bff915440920c1b0e65 34479 gnome-utils_2.26.0-1.diff.gz
 85decdf2aa834b1dc925198a55aa3971c4f05fd9 130710 
libgdict-1.0-6_2.26.0-1_i386.deb
 9a4daa67ca22e155c8059a979bcde471c625367e 172348 
libgdict-1.0-dev_2.26.0-1_i386.deb
 22b291161885c694d3dcbdc4a6c3441bcea9f370 11361650 gnome-utils_2.26.0-1_i386.deb
Checksums-Sha256: 
 a41456c20749c15fd1b287cd73977950c892bc3e988196bf8af29c32cbedc8c0 2300 
gnome-utils_2.26.0-1.dsc
 08db0824a7ef1a72f462bdde339c34f830d892d969a6756c31dfd2a98b74c2c3 8286440 
gnome-utils_2.26.0.orig.tar.gz
 58b805bace752dc6e76f60ea5e073d832977e7527d547de679af4ba24aa486b4 34479 
gnome-utils_2.26.0-1.diff.gz
 faaaee133f1ae5838e9b26403f5ea1881209c2e86e30c64d3b894e548cff0e31 130710 
libgdict-1.0-6_2.26.0-1_i386.deb
 bd5bbaaabfa9e77d0ba3e0975a64f56829c44e5d86fc8cf1a9f25ab6caddf57f 172348 
libgdict-1.0-dev_2.26.0-1_i386.deb
 7e13c4a490e6d7487731ca0e0473642d713ddd9b1bc4663bec540767e1133516 11361650 
gnome-utils_2.26.0-1_i386.deb
Files: 
 37df7632c776d42a875a4b6e8b5442ce 2300 gnome optional gnome-utils_2.26.0-1.dsc
 bc87d1bea1f94d62b8ac7af8934b257d 8286440 gnome optional 
gnome-utils_2.26.0.orig.tar.gz
 b9caa62f7928a5f3f97b3761367f3e23 34479 gnome optional 
gnome-utils_2.26.0-1.diff.gz
 a0f6051f22637d89fad76d8916e7f96e 130710 libs optional 
libgdict-1.0-6_2.26.0-1_i386.deb
 9265fdbbdf1a3cf7910ce0074eb7051c 172348 libdevel optional 
libgdict-1.0-dev_2.26.0-1_i386.deb
 c5dddd3f0c083a94273cdd1f97566a85 11361650 gnome optional 
gnome-utils_2.26.0-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iQEcBAEBAgAGBQJKGv8EAAoJENIA6zCg+12muVUH/RNLDV4V70DTQU2k0R4UoWlr
sss4f6NYLW7uWiUJqBt/xQK8hjM6HIumZ9CIqIVYWY9gk/lH81UGSRczWbO8yBdq
bPB/dipY/bpyGMJDdUpMHIxmgbpA+RNSx2q/PklUxLOewcgNIdZLs1ZizCk9oLgB
qkIZjAMSj8SgplCkrgQgFRGbUEAHWT1y6e1HpFFrFikYhzZFpLoDePb86qL3gR8Q
W37VgKcAJoho4H/P/u1N+vUFFZncZuhR1MbNYUc8ZqXNv19Bgew5EBFJnvPwML7t
u8Kk3wZmiDjUhB4g2X6eJkzNgbsSlz6h2FGPe2BZOm/BfpUti4quogOPBjtrKn0=
=B50p
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to