rpms/gnomad2/devel gnomad2-2.8.11.patch, NONE, 1.1 gnomad2.spec, 1.17, 1.18
Linus Walleij (snirkel)
fedora-extras-commits at redhat.com
Sun Feb 11 22:55:07 UTC 2007
Author: snirkel
Update of /cvs/extras/rpms/gnomad2/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31851
Modified Files:
gnomad2.spec
Added Files:
gnomad2-2.8.11.patch
Log Message:
Problem with g_stat().
gnomad2-2.8.11.patch:
--- NEW FILE gnomad2-2.8.11.patch ---
--- gnomad2-2.8.11-orig/src/filesystem.c 2007-01-09 22:30:27.000000000 +0100
+++ gnomad2/src/filesystem.c 2007-02-11 23:45:15.000000000 +0100
@@ -261,6 +261,9 @@
/* Directories: no full path, just dirname; size 0 */
filelist = NULL;
tmppath = filename_fromutf8(base_path);
+ if (gnomad_debug != 0) {
+ g_print("Getting directory listing for: %s\n", base_path);
+ }
dirp = opendir(tmppath);
if (!dirp){
if (gnomad_debug != 0) {
@@ -277,15 +280,22 @@
int is_dir;
int is_file;
- strncpy(path_buffer, tmppath, 512);
- strcat(path_buffer, G_DIR_SEPARATOR_S);
- strcat(path_buffer, dir_entry->d_name);
- if (g_stat(path_buffer, &entry_status)) {
+ strncpy(path_buffer, tmppath, sizeof(path_buffer));
+ path_buffer[sizeof(path_buffer)-1] = '\0';
+ strncat(path_buffer, G_DIR_SEPARATOR_S, sizeof(path_buffer)-strlen(path_buffer));
+ path_buffer[sizeof(path_buffer)-1] = '\0';
+ strncat(path_buffer, dir_entry->d_name, sizeof(path_buffer)-strlen(path_buffer));
+ path_buffer[sizeof(path_buffer)-1] = '\0';
+ if (gnomad_debug != 0) {
+ g_print("Examining dir path: %s\n", path_buffer);
+ }
+ if (stat(path_buffer, &entry_status)) {
if (gnomad_debug != 0) {
g_print("Failed to read file status for %s.\n", path_buffer);
}
continue;
}
+ g_print("Examining dir path (2): %s\n", path_buffer);
size = (int) entry_status.st_size;
is_dir = S_ISDIR(entry_status.st_mode);
is_file = S_ISREG(entry_status.st_mode);
@@ -324,6 +334,8 @@
g_ascii_strcasecmp(tmp,"wma")
#ifdef HAVE_LIBMTP
// Additional music codecs supported by libmtp
+ // TODO: base this on the list of filetypes actually
+ // supported by a particular device, if one is connected.
&&
g_ascii_strcasecmp(tmp,"ogg") &&
g_ascii_strcasecmp(tmp,"flac") &&
@@ -348,6 +360,7 @@
}
#ifndef G_OS_WIN32
filename = g_strdup(path_buffer);
+ g_printf("strdup(%s)=%s\n", path_buffer, filename);
#else
// On Windows we need to convert into UTF-8 since
// this does not use the stdio wrappers properly.
Index: gnomad2.spec
===================================================================
RCS file: /cvs/extras/rpms/gnomad2/devel/gnomad2.spec,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- gnomad2.spec 29 Jan 2007 20:03:58 -0000 1.17
+++ gnomad2.spec 11 Feb 2007 22:54:35 -0000 1.18
@@ -10,7 +10,7 @@
Name: gnomad2
Version: 2.8.11
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A GNOME 2.0 client for the Creative Jukeboxes and Dell DJs
License: GPL
@@ -18,6 +18,7 @@
Group: Applications/Multimedia
Source: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+Patch0: gnomad2-2.8.11.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
@@ -42,6 +43,7 @@
%prep
%setup
+%patch0 -p1
%build
%configure
@@ -80,6 +82,8 @@
%doc AUTHORS NEWS README COPYING ChangeLog
%changelog
+* Sun Feb 11 2007 Linus Walleij <triad at df.lth.se> 2.8.11-2
+- RH buildsystem mangles g_stat() some way, patch to use just stat()
* Mon Jan 29 2007 Linus Walleij <triad at df.lth.se> 2.8.11-1
- New upstream version fixing a bug.
* Wed Jan 24 2007 Linus Walleij <triad at df.lth.se> 2.8.10-1
More information about the fedora-extras-commits
mailing list