Mailinglist Archive: opensuse-commit (1083 mails)

< Previous Next >
commit yast2-network
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Sat, 22 Sep 2007 12:19:09 +0200
  • Message-id: <20070922101909.C496C67817A@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package yast2-network
checked in at Sat Sep 22 12:19:09 CEST 2007.

--------
--- yast2-network/yast2-network.changes 2007-09-21 12:32:52.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-network/yast2-network.changes    2007-09-21 16:22:19.776082000 +0200
@@ -1,0 +2,6 @@
+Fri Sep 21 16:03:44 CEST 2007 - kmachalkova@xxxxxxx
+
+- Remember correctly device number and device module for manually
+  added cards (#308762) 
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.L19728/_old  2007-09-22 12:19:01.000000000 +0200
+++ /var/tmp/diff_new_pack.L19728/_new  2007-09-22 12:19:01.000000000 +0200
@@ -12,7 +12,7 @@
 
 Name:           yast2-network
 Version:        2.15.79
-Release:        1
+Release:        2
 License:        GPL v2 or later
 Group:          System/YaST
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -45,7 +45,7 @@
 
 %package devel-doc
 Version:        2.15.79
-Release:        1
+Release:        2
 License:        GPL v2 or later
 Group:          System/YaST
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -140,6 +140,9 @@
 %exclude %{prefix}/share/doc/packages/yast2-network/README
 %changelog
 * Fri Sep 21 2007 - kmachalkova@xxxxxxx
+- Remember correctly device number and device module for manually
+  added cards (#308762)
+* Fri Sep 21 2007 - kmachalkova@xxxxxxx
 - Correct manual adding of network devices and assigning firewall
   zones (pass 'eth1' 'wlan0' string instead of 'eth-eth1' or
   'wlan-wlan0') (partly #308763)

++++++ yast2-network-2.15.79.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.79/src/lan/hardware.ycp new/yast2-network-2.15.79/src/lan/hardware.ycp
--- old/yast2-network-2.15.79/src/lan/hardware.ycp      2007-09-21 12:18:01.000000000 +0200
+++ new/yast2-network-2.15.79/src/lan/hardware.ycp      2007-09-21 15:54:28.000000000 +0200
@@ -4,7 +4,7 @@
  * Summary:    Hardware dialogs
  * Authors:    Michal Svec <msvec@xxxxxxx>
  *
- * $Id: hardware.ycp 40780 2007-09-06 12:14:17Z mzugec $
+ * $Id: hardware.ycp 41024 2007-09-21 13:54:28Z kmachalkova $
  */
 
 {
@@ -79,8 +79,14 @@
        hardware["type"] = "eth";
     }
     hardware["realtype"] = NetworkDevices::RealType(hardware["type"]:"", hardware["hotplug"]:"");
-    if (hasAnyValue(NetworkDevices::Name)) hardware["device"] = NetworkDevices::device_num(NetworkDevices::Name);
-       else hardware["device"] = LanItems::device;
+    /*if (hasAnyValue(NetworkDevices::Name))
+    {
+       hardware["device"] = NetworkDevices::device_num(NetworkDevices::Name);
+    }*/
+
+    //Use rather LanItems::device, so that device number is initialized correctly at all times (#308763) 
+    hardware["device"] = LanItems::device;
+
     string driver = LanItems::getCurrentItem()["udev", "driver"]:"";
 
 
@@ -438,16 +444,23 @@
 
 void storeHW (string key, map event) {
 if (LanItems::operation==`add){
- LanItems::type = (string) UI::QueryWidget(`id(`dev), `Value);
- string nm = (string) UI::QueryWidget(`id(`num), `Value);
- string name=NetworkDevices::device_name(LanItems::type, nm);
-           if(contains(NetworkDevices::List(""), name)) {
-               Popup::Error(sformat(_("Configuration name %1 (%2) already exists.
+
+    LanItems::type = (string) UI::QueryWidget(`id(`dev), `Value);
+    string nm = (string) UI::QueryWidget(`id(`num), `Value);
+    //Remember current device number (#308763)
+    LanItems::device = nm;
+
+    string name=NetworkDevices::device_name(LanItems::type, nm);
+    if(contains(NetworkDevices::List(""), name)) {
+       Popup::Error(sformat(_("Configuration name %1 (%2) already exists.
 Choose a different one."), nm, NetworkDevices::device_name(hardware["type"]:"", nm)));
-               UI::SetFocus(`id(`num));
-           }
- NetworkDevices::Name = name;
- LanItems::Items[LanItems::current, "ifcfg"]= name;
+       UI::SetFocus(`id(`num));
+    }
+
+    NetworkDevices::Name = name;
+    LanItems::Items[LanItems::current, "ifcfg"]= name;
+    //Initialize udev map, so that setDriver (see below) sets correct module
+    LanItems::Items[LanItems::current, "udev"]= $[];
 }
 
  LanItems::setDriver((string) UI::QueryWidget(`modul, `Value));


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >