Mailinglist Archive: opensuse-commit (1083 mails)

< Previous Next >
commit yast2-network
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Mon, 10 Sep 2007 13:00:35 +0200
  • Message-id: <20070910110035.CE916678334@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package yast2-network
checked in at Mon Sep 10 13:00:35 CEST 2007.

--------
--- yast2-network/yast2-network.changes 2007-09-06 16:25:27.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-network/yast2-network.changes    2007-09-07 13:09:30.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Sep  7 12:55:00 CEST 2007 - mzugec@xxxxxxx
+
+- fixed firmware installation for wlan cards (#307401)
+- 2.15.75 
+
+-------------------------------------------------------------------

Old:
----
  yast2-network-2.15.74.tar.bz2

New:
----
  yast2-network-2.15.75.tar.bz2

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

Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.xh6649/_old  2007-09-10 13:00:25.000000000 +0200
+++ /var/tmp/diff_new_pack.xh6649/_new  2007-09-10 13:00:25.000000000 +0200
@@ -1,5 +1,5 @@
 #
-# spec file for package yast2-network (Version 2.15.74)
+# spec file for package yast2-network (Version 2.15.75)
 #
 # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
 # This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
 # norootforbuild
 
 Name:           yast2-network
-Version:        2.15.74
+Version:        2.15.75
 Release:        1
 License:        GPL v2 or later
 Group:          System/YaST
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-Source0:        yast2-network-2.15.74.tar.bz2
+Source0:        yast2-network-2.15.75.tar.bz2
 prefix:                /usr
 # should be required by devtools
 BuildRequires:  perl-XML-Writer pkgconfig rpm
@@ -43,12 +43,12 @@
 Conflicts:      yast2-core < 2.10.6
 Summary:        YaST2 - Network Configuration
 %package devel-doc
-Version:        2.15.74
+Version:        2.15.75
 Release:        1
 License:        GPL v2 or later
 Group:          System/YaST
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-Source0:        yast2-network-2.15.74.tar.bz2
+Source0:        yast2-network-2.15.75.tar.bz2
 prefix:                /usr
 Requires:       yast2-network >= 2.15.53
 Summary:        YaST2 - Developer documentation for yast2-network
@@ -73,7 +73,7 @@
     Michal Svec <msvec@xxxxxxx>
 
 %prep
-%setup -n yast2-network-2.15.74
+%setup -n yast2-network-2.15.75
 
 %build
 %{prefix}/bin/y2tool y2autoconf
@@ -141,6 +141,9 @@
 %exclude %{prefix}/share/doc/packages/yast2-network/README
 
 %changelog
+* Fri Sep 07 2007 - mzugec@xxxxxxx
+- fixed firmware installation for wlan cards (#307401)
+- 2.15.75
 * Thu Sep 06 2007 - mzugec@xxxxxxx
 - fixed missing space between source and destination when copy udev
   rules into installed system (#307162)

++++++ yast2-network-2.15.74.tar.bz2 -> yast2-network-2.15.75.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.74/src/lan/address.ycp new/yast2-network-2.15.75/src/lan/address.ycp
--- old/yast2-network-2.15.74/src/lan/address.ycp       2007-09-06 14:14:20.000000000 +0200
+++ new/yast2-network-2.15.75/src/lan/address.ycp       2007-09-07 13:09:00.000000000 +0200
@@ -4,7 +4,7 @@
  * Summary:    Network card adresss configuration dialogs
  * Authors:    Michal Svec <msvec@xxxxxxx>
  *
- * $Id: address.ycp 40780 2007-09-06 12:14:17Z mzugec $
+ * $Id: address.ycp 40799 2007-09-07 11:08:57Z mzugec $
  */
 
 {
@@ -567,7 +567,6 @@
     });
 }
 
-
 /**
  * Dialog for setting up IP address
  * @return dialog result
@@ -864,9 +863,10 @@
            "abort_button" : Label::CancelButton (),
            "next_button" : Label::NextButton (),
            "fallback_functions" : functions,
+           "disable_buttons" :
+  (LanItems::operation!=`add ||(LanItems::operation==`edit && LanItems::getCurrentItem()["ifcfg"]:""=="")) ? [ "back_button" ] : []
            ]);
     Wizard::RestoreAbortButton();
-    if (LanItems::operation!=`add) Wizard::DisableBackButton ();
 
     y2milestone ("ShowAndRun: %1", ret);
 
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.74/src/lan/complex.ycp new/yast2-network-2.15.75/src/lan/complex.ycp
--- old/yast2-network-2.15.74/src/lan/complex.ycp       2007-09-06 14:25:47.000000000 +0200
+++ new/yast2-network-2.15.75/src/lan/complex.ycp       2007-09-07 13:09:00.000000000 +0200
@@ -4,7 +4,7 @@
  * Summary:    Summary, overview and IO dialogs for network cards config
  * Authors:    Michal Svec <msvec@xxxxxxx>
  *
- * $Id: complex.ycp 40782 2007-09-06 12:25:44Z mzugec $
+ * $Id: complex.ycp 40799 2007-09-07 11:08:57Z mzugec $
  */
 
 {
@@ -111,29 +111,7 @@
 }
 
 define boolean AddInterface () {
-    //this is the map of kernel modules vs. requested firmware
-    //non-empty keys are firmware packages shipped by SUSE
-    map <string, string> request_firmware = $[
-       "atmel_pci" : "atmel-firmware",
-       "atmel_cs"  : "atmel-firmware",
-       "at76_usb"  : "atmel-firmware",
-       "ipw2100" : "ipw-firmware",
-       "ipw2200" : "ipw-firmware",
-       "ipw3945" : "ipw-firmware",
-       "iwl3945" : "iwl3945-ucode",
-       "iwl4965" : "iwl4965-ucode",
-       "bcm43xx" : "",
-       "prism54" : "",
-       "spectrum_cs" : "",
-       "zd1201" : "",
-       "zd1211rw" : "",
-       "acx" : "",
-       "rt61pci" : "",
-       "rt73usb" : "",
-       "prism54usb":""
-    ];
     Lan::Add ();
-
     LanItems::SelectHWMap(LanItems::getCurrentItem()["hwinfo"]:$[]);
     LanItems::Items[LanItems::current, "ifcfg"] = LanItems::getCurrentItem()["hwinfo", "dev_name"]:"";
     LanItems::Items[LanItems::current, "commited"] = false;
@@ -149,15 +127,17 @@
            return false;
        }
     }
-    else if(haskey(request_firmware, NetworkModules::Alias)){
-       string fw = request_firmware[NetworkModules::Alias]:"";
+*/
+    if (LanItems::needFirmwareCurrentItem()){
+       string fw = LanItems::GetFirmwareForCurrentItem();
        if (fw != ""){
            if ((!Package::Installed(fw) && !Package::Available(fw))){
                Popup::Message(sformat(_("The device needs a firmware to function properly. It can be installed from
 %1 Add-On CD.\nTo install the firmware, add Add-On CD to your YaST installation sources and return 
 to this configuration dialog."), Product::name));
                return false;
-           }
+           } else
+               if (!contains(LanItems::Requires, fw)) LanItems::Requires = add(LanItems::Requires, fw);
        }
        else {
                return (Popup::ContinueCancel(_("The device needs a firmware to function properly. It can be usually downloaded 
@@ -166,7 +146,7 @@
 once you have installed the firmware.")));
        }
     }
-*/
+
     // this is one of 3 places to install packages :-(
     // - kernel modules (InstallKernel): before loaded
     // - smpppd & kinternet: before net start
@@ -176,6 +156,9 @@
        if(PackagesInstall(LanItems::Requires) != `next)
            return false;
     }
+/*
+   TODO: Refresh hwinfo in LanItems
+*/
     return true;
 }
 
@@ -221,12 +204,14 @@
 
 void enableDisableButtons(){
  LanItems::current = (integer)UI::QueryWidget (`id (`_hw_items), `CurrentItem);
+
  UI::ChangeWidget(`_hw_sum, `Value,LanItems::GetItemDescription());
  if (!LanItems::IsItemConfigured()) // unconfigured
                         UI::ChangeWidget(`id(`delete), `Enabled, false);
        else UI::ChangeWidget(`id(`delete), `Enabled, true);
-   if (!hasAnyValue(LanItems::getCurrentItem()["hwinfo", "dev_name"]:"") && size(LanItems::getCurrentItem()["hwinfo"]:$[])>0) UI::ChangeWidget(`id(`edit), `Enabled, false);
-       else UI::ChangeWidget(`id(`edit), `Enabled, true);
+
+ UI::ChangeWidget(`id(`edit), `Enabled, LanItems::enableCurrentEditButton());
+
     if (!Mode::config() && Lan::HaveXenBridge ()) // #196479
     {
        // #178848
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.74/src/modules/LanItems.ycp new/yast2-network-2.15.75/src/modules/LanItems.ycp
--- old/yast2-network-2.15.74/src/modules/LanItems.ycp  2007-09-06 15:24:02.000000000 +0200
+++ new/yast2-network-2.15.75/src/modules/LanItems.ycp  2007-09-07 12:45:44.000000000 +0200
@@ -132,6 +132,28 @@
 global string nm_name = "";
 global string nm_name_old = nil;
 
+    //this is the map of kernel modules vs. requested firmware
+    //non-empty keys are firmware packages shipped by SUSE
+map <string, string> request_firmware = $[
+       "atmel_pci" : "atmel-firmware",
+       "atmel_cs"  : "atmel-firmware",
+       "at76_usb"  : "atmel-firmware",
+       "ipw2100" : "ipw-firmware",
+       "ipw2200" : "ipw-firmware",
+       "ipw3945" : "ipw-firmware",
+       "iwl3945" : "iwl3945-ucode",
+       "iwl4965" : "iwl4965-ucode",
+       "bcm43xx" : "",
+       "prism54" : "",
+       "spectrum_cs" : "",
+       "zd1201" : "",
+       "zd1211rw" : "",
+       "acx" : "",
+       "rt61pci" : "",
+       "rt73usb" : "",
+       "prism54usb":""
+    ];
+
 include "network/hardware.ycp";
 
 boolean ReadUdevRules(){
@@ -1370,5 +1392,43 @@
  Items[current, "udev", "driver"] = driver;
 }
 
+global boolean needFirmwareCurrentItem(){
+ boolean need = false;
+ if (hasAnyValue(getCurrentItem()["hwinfo", "driver"]:"")){
+  if(haskey(request_firmware, getCurrentItem()["hwinfo", "driver"]:"")) need = true;
+ } else{
+    foreach(map driver, getCurrentItem()["hwinfo", "drivers"]:[], {
+     if(haskey(request_firmware, driver["modules", 0,0]:"")) {
+      y2milestone("driver %1 needs firmware", driver["modules", 0,0]:"");
+      need = true;
+     }
+    });
+  }
+ y2milestone("item %1 needs firmware:%2", current, need);
+ return need;
+}
+
+global string GetFirmwareForCurrentItem(){
+ string kernel_module="";
+ if (hasAnyValue(getCurrentItem()["hwinfo", "driver"]:"")){
+  if(haskey(request_firmware, getCurrentItem()["hwinfo", "driver"]:"")) kernel_module=getCurrentItem()["hwinfo", "driver"]:"";
+ } else{
+    foreach(map driver, getCurrentItem()["hwinfo", "drivers"]:[], {
+     if(haskey(request_firmware, driver["modules", 0,0]:"")) {
+      kernel_module = driver["modules", 0,0]:"";
+      break;
+     }
+    });
+  }
+ string firmware = request_firmware[kernel_module]:"";
+ y2milestone("driver %1 needs firmware %2", kernel_module, firmware);
+ return firmware;
+}
+
+global boolean enableCurrentEditButton(){
+ if (needFirmwareCurrentItem()) return true;
+ if (!hasAnyValue(LanItems::getCurrentItem()["hwinfo", "dev_name"]:"") && size(LanItems::getCurrentItem()["hwinfo"]:$[])>0) return false;
+       else return true;
+}
 
 }
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.74/VERSION new/yast2-network-2.15.75/VERSION
--- old/yast2-network-2.15.74/VERSION   2007-09-06 14:05:16.000000000 +0200
+++ new/yast2-network-2.15.75/VERSION   2007-09-07 12:54:52.000000000 +0200
@@ -1 +1 @@
-2.15.74
+2.15.75


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



Remember to have fun...

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

< Previous Next >