Hello community,
here is the log from the commit of package NetworkManager
checked in at Wed Mar 12 19:22:17 CET 2008.
--------
--- NetworkManager/NetworkManager.changes 2008-03-03 16:32:43.000000000 +0100
+++ /mounts/work_src_done/STABLE/NetworkManager/NetworkManager.changes 2008-03-12 19:13:56.232603000 +0100
@@ -1,0 +2,5 @@
+Wed Mar 12 19:16:51 CET 2008 - tambet@suse.de
+
+- Work with updated HAL (bnc #369539).
+
+-------------------------------------------------------------------
New:
----
nm-hal-property-names.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ NetworkManager.spec ++++++
--- /var/tmp/diff_new_pack.iy7311/_old 2008-03-12 19:21:48.000000000 +0100
+++ /var/tmp/diff_new_pack.iy7311/_new 2008-03-12 19:21:48.000000000 +0100
@@ -13,7 +13,7 @@
Name: NetworkManager
Url: http://www.gnome.org/projects/NetworkManager/
Version: 0.7.0
-Release: 33
+Release: 36
License: GPL v2 or later
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: hal-devel intltool iproute2 libgcrypt-devel libnl-devel libtool ppp-devel wireless-tools
@@ -24,6 +24,7 @@
Source0: NetworkManager-%{version}.tar.bz2
Source1: nfs
Source2: nm-system-settings.conf
+Patch0: nm-hal-property-names.patch
Requires: wpa_supplicant >= 0.5.8-54
Requires: dhcp-client
Obsoletes: dhcdbd <= 1.14
@@ -86,8 +87,7 @@
%prep
%setup
-
-%build
+%patch0 -p1
pppddir=`ls -1d /usr/lib/pppd/2*`
test -n "$pppddir" || exit 1
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
@@ -171,6 +171,8 @@
%{_libdir}/libnm_glib_vpn.so.*
%changelog
+* Wed Mar 12 2008 tambet@suse.de
+- Work with updated HAL (bnc #369539).
* Mon Mar 03 2008 maw@suse.de
- Fix build on biarch systems.
* Sat Mar 01 2008 tambet@suse.de
++++++ nm-hal-property-names.patch ++++++
commit bdcc08cf7b876eb8d7d43dc71d4860c6610470e7
Author: dcbw
Date: Fri Mar 7 17:13:38 2008 +0000
2008-03-07 Dan Williams
* src/nm-hal-manager.c
- (nm_get_device_driver_name): use net.originating_device first, fall
back to physical device. HAL has deprecated physical_device.
* libnm-glib/nm-device.c
- (get_product_and_vendor): use net.originating_device first, fall
back to physical device. HAL has deprecated physical_device.
- (nm_device_update_description): s/physical_device_udi/orig_dev_udi
git-svn-id: svn+ssh://svn.gnome.org/svn/NetworkManager/trunk@3386 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
diff --git a/ChangeLog b/ChangeLog
index 954c666..93a96bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2008-03-07 Dan Williams
+ * src/nm-hal-manager.c
+ - (nm_get_device_driver_name): use net.originating_device first, fall
+ back to physical device. HAL has deprecated physical_device.
+
+ * libnm-glib/nm-device.c
+ - (get_product_and_vendor): use net.originating_device first, fall
+ back to physical device. HAL has deprecated physical_device.
+ - (nm_device_update_description): s/physical_device_udi/orig_dev_udi
+
+2008-03-07 Dan Williams
+
* src/nm-netlink.c
- (nm_netlink_get_default_handle): mistakenly removed too much code in
last commit; fix that
diff --git a/libnm-glib/nm-device.c b/libnm-glib/nm-device.c
index 7bfe597..f057cc0 100644
--- a/libnm-glib/nm-device.c
+++ b/libnm-glib/nm-device.c
@@ -273,7 +273,7 @@ nm_device_get_state (NMDevice *device)
static char *
get_product_and_vendor (DBusGConnection *connection,
const char *udi,
- gboolean want_physdev,
+ gboolean want_origdev,
gboolean warn,
char **product,
char **vendor)
@@ -313,14 +313,38 @@ get_product_and_vendor (DBusGConnection *connection,
err = NULL;
}
- if (!dbus_g_proxy_call (proxy, "GetPropertyString", &err,
- G_TYPE_STRING, want_physdev ? "net.physical_device" : "info.parent",
- G_TYPE_INVALID,
- G_TYPE_STRING, &parent,
- G_TYPE_INVALID)) {
- g_warning ("Error getting physical device info from HAL: %s", err->message);
- g_error_free (err);
- }
+ if (want_origdev) {
+ dbus_g_proxy_call (proxy, "GetPropertyString", NULL,
+ G_TYPE_STRING, "net.originating_device",
+ G_TYPE_INVALID,
+ G_TYPE_STRING, &parent,
+ G_TYPE_INVALID);
+
+ if (!parent) {
+ /* Older HAL uses 'physical_device' */
+ dbus_g_proxy_call (proxy, "GetPropertyString", &err,
+ G_TYPE_STRING, "net.physical_device",
+ G_TYPE_INVALID,
+ G_TYPE_STRING, &parent,
+ G_TYPE_INVALID);
+ }
+
+ if (err || !parent) {
+ g_warning ("Error getting originating device info from HAL: %s",
+ err ? err->message : "unknown error");
+ if (err)
+ g_error_free (err);
+ }
+ } else {
+ if (!dbus_g_proxy_call (proxy, "GetPropertyString", &err,
+ G_TYPE_STRING, "info.parent",
+ G_TYPE_INVALID,
+ G_TYPE_STRING, &parent,
+ G_TYPE_INVALID)) {
+ g_warning ("Error getting parent device info from HAL: %s", err->message);
+ g_error_free (err);
+ }
+ }
if (parent && tmp_product && tmp_vendor) {
*product = tmp_product;
@@ -340,7 +364,7 @@ nm_device_update_description (NMDevice *device)
NMDevicePrivate *priv;
DBusGConnection *connection;
char *udi;
- char *physical_device_udi = NULL;
+ char *orig_dev_udi = NULL;
char *pd_parent_udi = NULL;
g_return_if_fail (NM_IS_DEVICE (device));
@@ -354,9 +378,9 @@ nm_device_update_description (NMDevice *device)
connection = nm_object_get_connection (NM_OBJECT (device));
g_return_if_fail (connection != NULL);
- /* First, get the physical device info */
+ /* First, get the originating device info */
udi = nm_device_get_udi (device);
- physical_device_udi = get_product_and_vendor (connection, udi, TRUE, FALSE, &priv->product, &priv->vendor);
+ orig_dev_udi = get_product_and_vendor (connection, udi, TRUE, FALSE, &priv->product, &priv->vendor);
g_free (udi);
/* Ignore product and vendor for the Network Interface */
@@ -367,17 +391,17 @@ nm_device_update_description (NMDevice *device)
priv->vendor = NULL;
}
- /* Get product and vendor off the physical device if possible */
+ /* Get product and vendor off the originating device if possible */
pd_parent_udi = get_product_and_vendor (connection,
- physical_device_udi,
+ orig_dev_udi,
FALSE,
FALSE,
&priv->product,
&priv->vendor);
- g_free (physical_device_udi);
+ g_free (orig_dev_udi);
- /* If one of the product/vendor isn't found on the physical device, try the
- * parent of the physical device.
+ /* If one of the product/vendor isn't found on the originating device, try the
+ * parent of the originating device.
*/
if (!priv->product || !priv->vendor) {
char *ignore;
diff --git a/src/nm-hal-manager.c b/src/nm-hal-manager.c
index c6e66ac..9aee42b 100644
--- a/src/nm-hal-manager.c
+++ b/src/nm-hal-manager.c
@@ -68,16 +68,21 @@ get_creator (NMHalManager *manager, const char *udi)
static char *
nm_get_device_driver_name (LibHalContext *ctx, const char *udi)
{
- char *physdev_udi;
+ char *origdev_udi;
char *driver_name = NULL;
- physdev_udi = libhal_device_get_property_string (ctx, udi, "net.physical_device", NULL);
- if (physdev_udi && libhal_device_property_exists (ctx, physdev_udi, "info.linux.driver", NULL)) {
- char *drv = libhal_device_get_property_string (ctx, physdev_udi, "info.linux.driver", NULL);
+ origdev_udi = libhal_device_get_property_string (ctx, udi, "net.originating_device", NULL);
+ if (!origdev_udi) {
+ /* Older HAL uses 'physical_device' */
+ origdev_udi = libhal_device_get_property_string (ctx, udi, "net.physical_device", NULL);
+ }
+
+ if (origdev_udi && libhal_device_property_exists (ctx, origdev_udi, "info.linux.driver", NULL)) {
+ char *drv = libhal_device_get_property_string (ctx, origdev_udi, "info.linux.driver", NULL);
driver_name = g_strdup (drv);
libhal_free_string (drv);
}
- libhal_free_string (physdev_udi);
+ libhal_free_string (origdev_udi);
return driver_name;
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org