Hello community, here is the log from the commit of package yast2-network for openSUSE:Factory checked in at Wed Nov 10 18:31:52 CET 2010. -------- --- yast2-network/yast2-network.changes 2010-10-13 09:55:28.000000000 +0200 +++ yast2-network/yast2-network.changes 2010-11-03 17:14:52.000000000 +0100 @@ -1,0 +2,19 @@ +Wed Nov 3 17:03:37 CET 2010 - mzugec@suse.cz + +- support for ordering in bonding slaves (bnc#640611) +- 2.20.1 + +------------------------------------------------------------------- +Wed Oct 27 13:53:54 CEST 2010 - mzugec@suse.cz + +- AY: when no network profile, don't change network configuration +(bnc#649494) +- 2.19.41 + +------------------------------------------------------------------- +Tue Oct 26 14:44:47 CEST 2010 - mzugec@suse.cz + +- added "No IP" option for bridge devices (bnc#648620) +- 2.19.40 + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yast2-network-2.19.39.tar.bz2 New: ---- yast2-network-2.20.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-network.spec ++++++ --- /var/tmp/diff_new_pack.0H6oHz/_old 2010-11-10 18:30:35.000000000 +0100 +++ /var/tmp/diff_new_pack.0H6oHz/_new 2010-11-10 18:30:35.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package yast2-network (Version 2.19.39) +# spec file for package yast2-network (Version 2.20.1) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,10 +19,11 @@ Name: yast2-network -Version: 2.19.39 +Version: 2.20.1 Release: 1 + BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-network-2.19.39.tar.bz2 +Source0: yast2-network-2.20.1.tar.bz2 Prefix: /usr @@ -72,7 +73,7 @@ This package contains autogenerated documentation for yast2-network %prep -%setup -n yast2-network-2.19.39 +%setup -n yast2-network-2.20.1 %build %{prefix}/bin/y2tool y2autoconf @@ -142,5 +143,4 @@ %doc %{prefix}/share/doc/packages/yast2-network %exclude %{prefix}/share/doc/packages/yast2-network/COPYING %exclude %{prefix}/share/doc/packages/yast2-network/README - %changelog ++++++ yast2-network-2.19.39.tar.bz2 -> yast2-network-2.20.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.19.39/VERSION new/yast2-network-2.20.1/VERSION --- old/yast2-network-2.19.39/VERSION 2010-10-13 09:49:33.000000000 +0200 +++ new/yast2-network-2.20.1/VERSION 2010-11-03 17:10:55.000000000 +0100 @@ -1 +1 @@ -2.19.39 +2.20.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.19.39/src/lan/address.ycp new/yast2-network-2.20.1/src/lan/address.ycp --- old/yast2-network-2.19.39/src/lan/address.ycp 2010-10-13 09:49:33.000000000 +0200 +++ new/yast2-network-2.20.1/src/lan/address.ycp 2010-11-03 17:11:08.000000000 +0100 @@ -4,7 +4,7 @@ * Summary: Network card adresss configuration dialogs * Authors: Michal Svec <msvec@suse.cz> * - * $Id: address.ycp 62621 2010-10-12 15:44:43Z mzugec $ + * $Id: address.ycp 62737 2010-11-03 16:07:25Z mzugec $ */ { @@ -159,6 +159,27 @@ } +integer getISlaveIndex(string slave){ + list<term> items = (list<term>)UI::QueryWidget(`msbox_items, `Items); + integer index = -1; + integer pos=0; + foreach(term it, (list<term>)items, { + if(it[0, 0]:""==slave){ + index = pos; + break; + } + pos=pos+1; + }); + return index; +} + +void enableSlaveButtons(){ + list<term> items = (list<term>)UI::QueryWidget(`msbox_items, `Items); + string current = tostring(UI::QueryWidget(`msbox_items, `CurrentItem)); + integer index = getISlaveIndex(current); + UI::ChangeWidget(`up, `Enabled, index>0); + UI::ChangeWidget(`down, `Enabled, index<size(items)-1); +} /** * Default function to init the value of slave devices box. @@ -167,11 +188,11 @@ void InitSlave(string key) { settings["SLAVES"] = LanItems::bond_slaves; - UI::ChangeWidget(`id("BONDSLAVE"), `SelectedItems, settings["SLAVES"]:[]); + UI::ChangeWidget(`msbox_items, `SelectedItems, settings["SLAVES"]:[]); - settings["BONDOPTION"] = LanItems::bond_option; + settings["BONDOPTION"] = LanItems::bond_option; - list items = createUnconfigured(settings["SLAVES"]:[]); + list items = createUnconfigured(settings["SLAVES"]:[]); map <string, any> configurations = NetworkInterfaces::FilterDevices("netcard"); foreach(string devtype, splitstring(NetworkInterfaces::CardRegex["netcard"]:"", "|"), { foreach(string devname, (list<string>) Map::Keys(configurations[devtype]:$[]), { @@ -182,8 +203,72 @@ }); }); - UI::ChangeWidget(`id(key), `Items, items); -y2internal("slaves %1", settings["SLAVES"]:[]); + // reorder the items + list l2=[]; + list l1=[]; + foreach(term t, (list<term>) items, { + if (contains(settings["SLAVES"]:[], t[0,0]:"")){ + l1=add(l1, t); + } else { + l2=add(l2, t); + } + }); + + items=[]; + foreach(string s, settings["SLAVES"]:[],{ + foreach(term t, (list<term>) l1,{ + if (t[0,0]:""==s) items=add(items, t); + }); + }); + + items=union(items,l2); + UI::ChangeWidget(`msbox_items, `Items, items); + enableSlaveButtons(); +} + +symbol HandleSlave(string key, map event) +{ + if (event["EventReason"]:"" =="SelectionChanged"){ + enableSlaveButtons(); + } else if (event["EventReason"]:""=="Activated" && event["WidgetClass"]:nil==`PushButton){ + list<term> items = (list<term>)UI::QueryWidget(`msbox_items, `Items); + string current = tostring(UI::QueryWidget(`msbox_items, `CurrentItem)); + integer index = getISlaveIndex(current); + list<term> new_items=[]; + integer pos=0; + switch(event["ID"]:`nil){ + case `up: + while(index>pos+1){ + new_items=add(new_items, items[pos]:nil); + pos=pos+1; + } + new_items=add(new_items, items[index]:nil); + new_items=add(new_items, items[index-1]:nil); + new_items=(list<term>)union(new_items, (list<term>)sublist(items, index)); + break; + case `down: + while(index>pos){ + new_items=add(new_items, items[pos]:nil); + pos=pos+1; + } + new_items=add(new_items, items[index+1]:nil); + new_items=add(new_items, items[index]:nil); + new_items=(list<term>)union(new_items, (list<term>)sublist(items, index+1)); + break; + default: + y2warning("unknown action"); + return nil; + } + items = new_items; + UI::ChangeWidget(`msbox_items, `Items, items); + enableSlaveButtons(); + + } else + { + y2debug("event:%1", event); + } + + return nil; } /** @@ -193,7 +278,7 @@ */ void StoreSlave(string key, map event) { - settings["SLAVES"] = (list<string>)UI::QueryWidget (`id(key), `SelectedItems); + settings["SLAVES"] = (list<string>)UI::QueryWidget (`msbox_items, `SelectedItems); settings["BONDOPTION"] = UI::QueryWidget (`id("BONDOPTION"), `Value); LanItems::bond_slaves = settings["SLAVES"]:[]; LanItems::bond_option = settings["BONDOPTION"]:""; @@ -228,8 +313,11 @@ * @param key id of the widget */ void initBootProto (string key) { +/* if (LanItems::type=="br") UI::ReplaceWidget(`rp, `Empty()); - else if (LanItems::type!="eth") UI::ReplaceWidget(`rp, `Left( + else +*/ + if (LanItems::type!="eth") UI::ReplaceWidget(`rp, `Left( `RadioButton(`id(`none),`opt(`notify), _("No IP Address (for Bonding Devices)")))); switch(settings["BOOTPROTO"]:""){ case "static": UI::ChangeWidget(`id(`bootproto), `CurrentButton, `static); @@ -464,14 +552,14 @@ if (UI::QueryWidget(`bootproto, `CurrentButton) == `static) { string ipa = (string) UI::QueryWidget (`ipaddr, `Value); - if (! IP::Check(ipa)){ + if (ipa!="" && !IP::Check(ipa)){ Popup::Error(_("No valid IP address.")); UI::SetFocus(`ipaddr); return false; } string mask=(string) UI::QueryWidget (`netmask, `Value); - if(!validPrefixOrNetmask(ipa, mask)){ + if((ipa!="" && mask!="") && !validPrefixOrNetmask(ipa, mask)){ Popup::Error(_("No valid netmask or prefix length.")); UI::SetFocus(`netmask); return false; @@ -653,11 +741,15 @@ "help": help["etherdevice"]:"", ], "BONDSLAVE": $[ - "widget": `multi_selection_box, + "widget": `custom, + "custom_widget" : `Frame(_("Bond Slaves and Order"), `VBox( + `MultiSelectionBox(`id(`msbox_items), `opt(`notify), "", []), + `HBox(`PushButton(`id(`up), `opt(`disabled), _("Up") ), `PushButton(`id(`down), `opt(`disabled), _("Down") ) ) + )), "label": _("Bond &Slaves"), - "opt": [`shrinkable], - "items" : [ ], +// "opt": [`shrinkable], "init": InitSlave, + "handle": HandleSlave, "store": StoreSlave, "help": help["bondslave"]:"", ], @@ -845,9 +937,12 @@ "TUNNEL_SET_OWNER" : LanItems::tunnel_set_owner, "TUNNEL_SET_GROUP" : LanItems::tunnel_set_group ]; - } else { + } +/* + else { if(settings["BOOTPROTO"]:"" == "static" && settings["IPADDR"]:"" == "" && !no_dhcp) settings["BOOTPROTO"] = "dhcp"; } +*/ // #65524 if (LanItems::operation == `add && force_static_ip) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.19.39/src/lan/help.ycp new/yast2-network-2.20.1/src/lan/help.ycp --- old/yast2-network-2.19.39/src/lan/help.ycp 2010-02-08 16:19:14.000000000 +0100 +++ new/yast2-network-2.20.1/src/lan/help.ycp 2010-10-26 14:40:50.000000000 +0200 @@ -175,7 +175,7 @@ /* Address dialog help 6/8 */ "netmask": _("<p>For <b>Static Address Setup</b> enter the static IP address for your computer (for example: <tt>192.168.100.99</tt>) and -the network mask (usually <tt>255.255.255.0</tt> or just lenght of prefix <tt>/24</tt>). For special case - unconfigured interface use <tt>0.0.0.0</tt> and <tt>/32</tt>.Optionally, you can enter +the network mask (usually <tt>255.255.255.0</tt> or just lenght of prefix <tt>/24</tt>).Optionally, you can enter a fully qualified hostname for this IP address. The hostname will be written to <tt>/etc/hosts</tt>.</p> ") + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.19.39/src/modules/Routing.ycp new/yast2-network-2.20.1/src/modules/Routing.ycp --- old/yast2-network-2.19.39/src/modules/Routing.ycp 2009-12-08 09:20:52.000000000 +0100 +++ new/yast2-network-2.20.1/src/modules/Routing.ycp 2010-11-02 09:35:23.000000000 +0100 @@ -4,7 +4,7 @@ * Summary: Routing data (/etc/sysconfig/network/routes) * Authors: Michal Svec <msvec@suse.cz> * - * $Id: Routing.ycp 59982 2009-12-07 15:28:12Z kmachalkova $ + * $Id: Routing.ycp 62691 2010-10-27 11:55:09Z mzugec $ * * See routes(5) * Does not work with interface-specific routes yet (ifroute-lo...) @@ -30,6 +30,8 @@ */ global list<map> Routes = []; +// modified by AY (bnc#649494) +boolean modified = nil; /** * Enable IP forwarding * .sysconfig.sysctl.IP_FORWARD @@ -58,6 +60,8 @@ */ global define boolean Modified() { boolean ret = (Routes != Orig_Routes || Forward != Orig_Forward); + // probably called without Read() (bnc#649494) + if (Orig_Routes==nil && Orig_Forward==nil && modified!=true) ret = false; y2debug("ret=%1", ret); return ret; } @@ -226,6 +230,8 @@ Orig_Routes = nil; Orig_Forward = nil; + modified=true; + return true; } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org