rpms/gnome-desktop/F-11 pnpids.patch, NONE, 1.1 gnome-desktop.spec, 1.212, 1.213
Matthias Clasen
mclasen at fedoraproject.org
Wed May 6 20:25:39 UTC 2009
- Previous message: rpms/kdebase-workspace/F-11 kdebase-workspace.spec,1.219,1.220
- Next message: rpms/plymouth/devel charge.plymouth, NONE, 1.1 .cvsignore, 1.11, 1.12 plymouth.spec, 1.126, 1.127 sources, 1.52, 1.53 plymouth-0.7.0-destroy-terminal-on-detach.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mclasen
Update of /cvs/pkgs/rpms/gnome-desktop/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11930
Modified Files:
gnome-desktop.spec
Added Files:
pnpids.patch
Log Message:
read pnp ids from hwdata, if available
pnpids.patch:
--- NEW FILE pnpids.patch ---
--- gnome-desktop-2.26.1/libgnome-desktop/display-name.c 2009-05-06 16:19:08.498375080 -0400
+++ hacked/libgnome-desktop/display-name.c 2009-05-06 16:17:08.483375623 -0400
@@ -182,15 +182,58 @@
{ "???", "Unknown" },
};
+static GHashTable *hwdata = NULL;
+
+#define PNP_IDS "/usr/share/hwdata/pnp.ids"
+
+static void
+read_hwdata (void)
+{
+ gchar *contents;
+ gchar **lines;
+ gchar *line;
+ gchar *code, *name;
+ gint i;
+
+ if (hwdata)
+ return;
+
+ hwdata = g_hash_table_new (g_str_hash, g_str_equal);
+
+ if (g_file_get_contents (PNP_IDS, &contents, NULL, NULL)) {
+ lines = g_strsplit (contents, "\n", -1);
+ for (i = 0; lines[i]; i++) {
+ line = lines[i];
+ if (line[3] == '\t') {
+ code = line;
+ line[3] = '\0';
+ name = line + 4;
+ g_hash_table_insert (hwdata, code, name);
+ }
+ }
+ g_free (lines);
+ }
+ g_free (contents);
+}
+
+
static const char *
find_vendor (const char *code)
{
int i;
+ const char *vendor_name;
+
+ read_hwdata ();
+
+ vendor_name = g_hash_table_lookup (hwdata, code);
+
+ if (vendor_name)
+ return vendor_name;
for (i = 0; i < sizeof (vendors) / sizeof (vendors[0]); ++i)
{
const Vendor *v = &(vendors[i]);
-
+
if (strcmp (v->vendor_id, code) == 0)
return v->vendor_name;
}
Index: gnome-desktop.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-desktop/F-11/gnome-desktop.spec,v
retrieving revision 1.212
retrieving revision 1.213
diff -u -p -r1.212 -r1.213
--- gnome-desktop.spec 29 Apr 2009 15:11:50 -0000 1.212
+++ gnome-desktop.spec 6 May 2009 20:25:09 -0000 1.213
@@ -12,13 +12,15 @@
Summary: Package containing code shared among gnome-panel, gnome-session, nautilus, etc
Name: gnome-desktop
Version: 2.26.1
-Release: 4%{?dist}
+Release: 5%{?dist}
URL: http://www.gnome.org
Source0: http://download.gnome.org/sources/gnome-desktop/2.26/%{name}-%{version}.tar.bz2
# fixed upstream
Patch0: give-me-back-my-rotations.patch
# fixed upstream
Patch1: you-never-find-a-haystack-in-a-needle.patch
+# http://bugzilla.gnome.org/show_bug.cgi?id=581621
+Patch2: pnpids.patch
License: GPLv2+ and LGPLv2+
Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -78,6 +80,7 @@ libgnomedesktop.
%setup -q
%patch0 -p1 -b .rotations
%patch1 -p1 -b .unknown-monitors
+%patch2 -p1 -b .pnpids.patch
%build
%configure --with-gnome-distributor="Red Hat, Inc" --disable-scrollkeeper
@@ -123,6 +126,9 @@ rm -rf $RPM_BUILD_ROOT
%doc %{_datadir}/gtk-doc/html/gnome-desktop/
%changelog
+* Wed May 6 2009 Matthias Clasen <mclasen at redhat.com> - 2.26.1-5
+- Read vendor names from hwdata, when available
+
* Wed Apr 29 2009 Matthias Clasen <mclasen at redhat.com> - 2.26.1-4
- Remove debug spew
- Previous message: rpms/kdebase-workspace/F-11 kdebase-workspace.spec,1.219,1.220
- Next message: rpms/plymouth/devel charge.plymouth, NONE, 1.1 .cvsignore, 1.11, 1.12 plymouth.spec, 1.126, 1.127 sources, 1.52, 1.53 plymouth-0.7.0-destroy-terminal-on-detach.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list