Hello community, here is the log from the commit of package yast2-iscsi-server checked in at Sun May 21 01:37:42 CEST 2006. -------- --- yast2-iscsi-server/yast2-iscsi-server.changes 2006-05-18 15:34:44.000000000 +0200 +++ yast2-iscsi-server/yast2-iscsi-server.changes 2006-05-19 16:52:10.000000000 +0200 @@ -1,0 +2,5 @@ +Fri May 19 16:43:52 CEST 2006 - mzugec@suse.cz + +- fixed #177060 incorrect storing data between dialogs + +------------------------------------------------------------------- Old: ---- yast2-iscsi-server-2.13.21.tar.bz2 New: ---- yast2-iscsi-server-2.13.22.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-iscsi-server.spec ++++++ --- /var/tmp/diff_new_pack.ouzbKl/_old 2006-05-21 01:37:14.000000000 +0200 +++ /var/tmp/diff_new_pack.ouzbKl/_new 2006-05-21 01:37:14.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package yast2-iscsi-server (Version 2.13.21) +# spec file for package yast2-iscsi-server (Version 2.13.22) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -11,12 +11,12 @@ # norootforbuild Name: yast2-iscsi-server -Version: 2.13.21 +Version: 2.13.22 Release: 1 License: GPL Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-iscsi-server-2.13.21.tar.bz2 +Source0: yast2-iscsi-server-2.13.22.tar.bz2 prefix: /usr BuildRequires: docbook-xsl-stylesheets doxygen libxslt perl-XML-Writer popt-devel sgml-skel update-desktop-files yast2 yast2-devtools yast2-packagemanager-devel yast2-perl-bindings yast2-testsuite Requires: yast2 @@ -29,7 +29,7 @@ %prep -%setup -n yast2-iscsi-server-2.13.21 +%setup -n yast2-iscsi-server-2.13.22 %build %{prefix}/bin/y2tool y2autoconf @@ -64,6 +64,8 @@ %doc %{prefix}/share/doc/packages/yast2-iscsi-server %changelog -n yast2-iscsi-server +* Fri May 19 2006 - mzugec@suse.cz +- fixed #177060 incorrect storing data between dialogs * Thu May 18 2006 - mzugec@suse.cz - fixed #176724 - duplicates configuration entry * Thu May 18 2006 - mzugec@suse.cz ++++++ yast2-iscsi-server-2.13.21.tar.bz2 -> yast2-iscsi-server-2.13.22.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-iscsi-server-2.13.21/VERSION new/yast2-iscsi-server-2.13.22/VERSION --- old/yast2-iscsi-server-2.13.21/VERSION 2006-05-18 15:31:42.000000000 +0200 +++ new/yast2-iscsi-server-2.13.22/VERSION 2006-05-19 16:43:45.000000000 +0200 @@ -1 +1 @@ -2.13.21 +2.13.22 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-iscsi-server-2.13.21/configure new/yast2-iscsi-server-2.13.22/configure --- old/yast2-iscsi-server-2.13.21/configure 2006-05-18 15:29:41.000000000 +0200 +++ new/yast2-iscsi-server-2.13.22/configure 2006-05-19 16:20:33.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for yast2-iscsi-server 2.13.20. +# Generated by GNU Autoconf 2.59 for yast2-iscsi-server 2.13.21. # # Report bugs to <http://bugs.opensuse.org/>. # @@ -269,8 +269,8 @@ # Identity of this package. PACKAGE_NAME='yast2-iscsi-server' PACKAGE_TARNAME='yast2-iscsi-server' -PACKAGE_VERSION='2.13.20' -PACKAGE_STRING='yast2-iscsi-server 2.13.20' +PACKAGE_VERSION='2.13.21' +PACKAGE_STRING='yast2-iscsi-server 2.13.21' PACKAGE_BUGREPORT='http://bugs.opensuse.org/' ac_unique_file="RPMNAME" @@ -728,7 +728,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures yast2-iscsi-server 2.13.20 to adapt to many kinds of systems. +\`configure' configures yast2-iscsi-server 2.13.21 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -795,7 +795,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yast2-iscsi-server 2.13.20:";; + short | recursive ) echo "Configuration of yast2-iscsi-server 2.13.21:";; esac cat <<\_ACEOF @@ -908,7 +908,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -yast2-iscsi-server configure 2.13.20 +yast2-iscsi-server configure 2.13.21 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -922,7 +922,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by yast2-iscsi-server $as_me 2.13.20, which was +It was created by yast2-iscsi-server $as_me 2.13.21, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1652,7 +1652,7 @@ # Define the identity of the package. PACKAGE='yast2-iscsi-server' - VERSION='2.13.20' + VERSION='2.13.21' cat >>confdefs.h <<_ACEOF @@ -1863,7 +1863,7 @@ -VERSION="2.13.20" +VERSION="2.13.21" RPMNAME="yast2-iscsi-server" MAINTAINER="Michal Zugec <mzugec@suse.cz>" @@ -2693,7 +2693,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by yast2-iscsi-server $as_me 2.13.20, which was +This file was extended by yast2-iscsi-server $as_me 2.13.21, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2748,7 +2748,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -yast2-iscsi-server config.status 2.13.20 +yast2-iscsi-server config.status 2.13.21 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-iscsi-server-2.13.21/configure.in new/yast2-iscsi-server-2.13.22/configure.in --- old/yast2-iscsi-server-2.13.21/configure.in 2006-05-18 15:29:35.000000000 +0200 +++ new/yast2-iscsi-server-2.13.22/configure.in 2006-05-19 16:20:27.000000000 +0200 @@ -3,7 +3,7 @@ dnl -- This file is generated by y2autoconf 2.13.18 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-iscsi-server, 2.13.20, http://bugs.opensuse.org/, yast2-iscsi-server) +AC_INIT(yast2-iscsi-server, 2.13.21, http://bugs.opensuse.org/, yast2-iscsi-server) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -17,7 +17,7 @@ AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs dnl Important YaST2 variables -VERSION="2.13.20" +VERSION="2.13.21" RPMNAME="yast2-iscsi-server" MAINTAINER="Michal Zugec <mzugec@suse.cz>" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-iscsi-server-2.13.21/src/IscsiServer.ycp new/yast2-iscsi-server-2.13.22/src/IscsiServer.ycp --- old/yast2-iscsi-server-2.13.21/src/IscsiServer.ycp 2006-05-18 14:42:12.000000000 +0200 +++ new/yast2-iscsi-server-2.13.22/src/IscsiServer.ycp 2006-05-19 16:46:50.000000000 +0200 @@ -4,7 +4,7 @@ * Summary: IscsiServer settings, input and output functions * Authors: Michal Zugec <mzugec@suse.cz> * - * $Id: IscsiServer.ycp 31008 2006-05-18 11:12:42Z mzugec $ + * $Id: IscsiServer.ycp 31074 2006-05-19 14:46:02Z mzugec $ * * Representation of the configuration of iscsi-server. * Input and output routines. @@ -78,6 +78,8 @@ return modified; } + + // Settings: Define all variables needed for configuration of iscsi-server // TODO FIXME: Define all the variables necessary to hold // TODO FIXME: the configuration here (with the appropriate @@ -427,7 +429,7 @@ break; } }); - IscsiServerFunctions::addTarget(name, lun); + IscsiServerFunctions::addNewTarget(name, lun); IscsiServerFunctions::setTargetAuth(name, inc, out); }); break; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-iscsi-server-2.13.21/src/IscsiServerFunctions.pm new/yast2-iscsi-server-2.13.22/src/IscsiServerFunctions.pm --- old/yast2-iscsi-server-2.13.21/src/IscsiServerFunctions.pm 2006-05-18 15:22:13.000000000 +0200 +++ new/yast2-iscsi-server-2.13.22/src/IscsiServerFunctions.pm 2006-05-19 16:12:49.000000000 +0200 @@ -19,6 +19,8 @@ # for remember add and deleted targets my %changes = (); +my @new_target = (); + # read data given from ini-agent and put values into %config map BEGIN { $TYPEINFO{parseConfig} = ["function", ["map", "string", "any"], ["map", "string", "any"] ]; } sub parseConfig { @@ -100,41 +102,61 @@ my $target = shift; my @incoming = @{+shift}; my $outgoing = shift; - my $tmp_auth = $config{$target}; + my $tmp_auth = \@new_target; - my @list=(); + my @before_values=(); foreach my $row (@{$tmp_auth}){ - push(@list, $row) if (($$row{'KEY'} ne 'IncomingUser')&&($$row{'KEY'} ne 'OutgoingUser')); + push(@before_values, $row) if (($$row{'KEY'} ne 'IncomingUser')&&($$row{'KEY'} ne 'OutgoingUser')); } - $tmp_auth=\@list; + @{$tmp_auth}=@before_values; - foreach my $row (@incoming){ - push(@$tmp_auth, {'KEY'=>'IncomingUser', 'VALUE'=>$row}); - } + foreach my $row (@incoming){ + push(@$tmp_auth, {'KEY'=>'IncomingUser', 'VALUE'=>$row}); + } push(@$tmp_auth, {'KEY'=>'OutgoingUser', 'VALUE'=>$outgoing}) if ($outgoing =~/[\w]+/); + +# @new_target = @$tmp_auth; } # create new target -BEGIN { $TYPEINFO{addTarget} = ["function", "void", "string", "string" ] ; } -sub addTarget { +BEGIN { $TYPEINFO{addNewTarget} = ["function", "void", "string", "string" ] ; } +sub addNewTarget { my $self = shift; my $target = shift; my $lun = shift; +my @tmp_list = ( {'KEY'=>'Target', 'VALUE'=>$target}, {'KEY'=>'Lun', 'VALUE'=>$lun} ); + if (ref($config{$target})){ - my $tmp_list = $config{$target} ; + my @tmp_list = @{$config{$target}}; my @list=(); - foreach my $row (@{$tmp_list}){ + foreach my $row (@tmp_list){ push(@list, $row) if (($$row{'KEY'} ne 'Target')&&($$row{'KEY'} ne 'Lun')); } - $tmp_list=\@list; + @tmp_list=@list; + @new_target = @tmp_list; + push(@new_target, ( {'KEY'=>'Target', 'VALUE'=>$target}, {'KEY'=>'Lun', 'VALUE'=>$lun} )); + } else { @new_target = ( {'KEY'=>'Target', 'VALUE'=>$target}, {'KEY'=>'Lun', 'VALUE'=>$lun} ); } +} - push(@$tmp_list, {'KEY'=>'Target', 'VALUE'=>$target}, {'KEY'=>'Lun', 'VALUE'=>$lun}); - } else { - push(@{$changes{'add'}}, $target); - $config{$target} = [ {'KEY'=>'Target', 'VALUE'=>$target}, {'KEY'=>'Lun', 'VALUE'=>$lun} ]; - } +BEGIN { $TYPEINFO{saveNewTarget} = ["function", "void", "string" ] ; } +sub saveNewTarget { + my $self = shift; + my $target = shift; + + @{$config{$target}} = @new_target; + @new_target=(); +} + + +BEGIN { $TYPEINFO{editTarget} = ["function", ["list", "any"], "string" ] ; } +sub editTarget { + my $self = shift; + my $target = shift; + + @new_target = @{$config{$target}}; + return $config{$target}; } @@ -294,7 +316,6 @@ # accessor for %changes BEGIN { $TYPEINFO{getChanges} = ["function", ["map", "string", "any"] ]; } sub getChanges { -#TODO - to 'add' and 'del' add all targets but not @connected from getConnected return \%changes; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-iscsi-server-2.13.21/src/widgets.ycp new/yast2-iscsi-server-2.13.22/src/widgets.ycp --- old/yast2-iscsi-server-2.13.21/src/widgets.ycp 2006-05-18 11:22:33.000000000 +0200 +++ new/yast2-iscsi-server-2.13.22/src/widgets.ycp 2006-05-19 16:19:47.000000000 +0200 @@ -104,6 +104,7 @@ switch((symbol)event["ID"]:nil){ case(`add) : // goto AddDialog() (initAddTarget) + ret = `add; break; case(`del) : @@ -176,7 +177,10 @@ // save discovery authentication or authentication for given target void storeGlobal(string option_id, map option_map){ if (size(curr_target)>0){ + IscsiServerFunctions::setTargetAuth( curr_target, getIncomingValues(), getOutgoingValues() ); + IscsiServerFunctions::saveNewTarget(curr_target); + } else{ IscsiServerFunctions::setAuth( getIncomingValues(), getOutgoingValues() ); } @@ -217,7 +221,7 @@ string lun = sformat("%1 Path=%2,Type=fileio",UI::QueryWidget(`id(`lun), `Value), UI::QueryWidget(`id(`path), `Value) ); // add/modify that values y2milestone("Add target %1 with lun %2", target, lun); - IscsiServerFunctions::addTarget(target, lun); + IscsiServerFunctions::addNewTarget(target, lun); curr_target = target; } @@ -325,7 +329,7 @@ // init values for modifying target (read it from stored map) void initModify (string key) ``{ - foreach( map<string, any> row, (list<map<string, any> >) IscsiServerFunctions::getConfig()[curr_target]:[], { + foreach( map<string, any> row, (list<map<string, any> >) IscsiServerFunctions::editTarget( curr_target ), { switch(row["KEY"]:""){ case("Target") : UI::ChangeWidget( `id(`target),`Value, (splitstring(row["VALUE"]:"", ":"))[0]:""); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-iscsi-server-2.13.21/testsuite/tests/readConfig.out new/yast2-iscsi-server-2.13.22/testsuite/tests/readConfig.out --- old/yast2-iscsi-server-2.13.21/testsuite/tests/readConfig.out 2006-04-24 08:00:47.000000000 +0200 +++ new/yast2-iscsi-server-2.13.22/testsuite/tests/readConfig.out 2006-05-19 16:36:56.000000000 +0200 @@ -4,4 +4,4 @@ Return $["auth":[$["KEY":"IncomingUser", "VALUE":"inname1 inpass1"], $["KEY":"IncomingUser", "VALUE":"inname2 inpass2"], $["KEY":"OutgoingUser", "VALUE":"outname outpass"]], "iqn.2001-04.com.example:storage.disk2.sys1.xyz":[$["KEY":"Target", "VALUE":"iqn.2001-04.com.example:storage.disk2.sys1.xyz"], $["KEY":"Lun", "VALUE":"0 Path=/dev/sdc,Type=fileio"]]] Dump $["auth":[$["KEY":"IncomingUser", "VALUE":"inname1 inpass1"], $["KEY":"IncomingUser", "VALUE":"inname2 inpass2"], $["KEY":"OutgoingUser", "VALUE":"outname outpass"]], "iqn.2001-04.com.example:storage.disk2.sys1.xyz":[$["KEY":"Target", "VALUE":"iqn.2001-04.com.example:storage.disk2.sys1.xyz"], $["KEY":"Lun", "VALUE":"0 Path=/dev/sdc,Type=fileio"]]] Return nil -Dump $["auth":[$["KEY":"IncomingUser", "VALUE":"inname1 inpass1"], $["KEY":"IncomingUser", "VALUE":"inname2 inpass2"], $["KEY":"OutgoingUser", "VALUE":"outname outpass"]], "iqn.2001-04.com.example:storage.disk2.sys1.xyz":[$["KEY":"Target", "VALUE":"iqn.2001-04.com.example:storage.disk2.sys1.xyz"], $["KEY":"Lun", "VALUE":"0 Path=/dev/sdc,Type=fileio"]], "iqn.2006-04.suse.cz:123456789":[$["KEY":"Target", "VALUE":"iqn.2006-04.suse.cz:123456789"], $["KEY":"Lun", "VALUE":"2 Path=/tmp/file,Type=fileio"]]] +Dump $["auth":[$["KEY":"IncomingUser", "VALUE":"inname1 inpass1"], $["KEY":"IncomingUser", "VALUE":"inname2 inpass2"], $["KEY":"OutgoingUser", "VALUE":"outname outpass"]], "iqn.2001-04.com.example:storage.disk2.sys1.xyz":[$["KEY":"Target", "VALUE":"iqn.2001-04.com.example:storage.disk2.sys1.xyz"], $["KEY":"Lun", "VALUE":"0 Path=/dev/sdc,Type=fileio"]], "iqn.2006-04.suse.cz:123456789":[$["KEY":"Target", "VALUE":"iqn.2006-04.suse.cz:123456789"], $["KEY":"Lun", "VALUE":"2 Path=/tmp/file,Type=fileio"], $["KEY":"IncomingUser", "VALUE":"one two"], $["KEY":"IncomingUser", "VALUE":"three four"], $["KEY":"OutgoingUser", "VALUE":"five six"]]] diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-iscsi-server-2.13.21/testsuite/tests/readConfig.ycp new/yast2-iscsi-server-2.13.22/testsuite/tests/readConfig.ycp --- old/yast2-iscsi-server-2.13.21/testsuite/tests/readConfig.ycp 2006-04-24 08:00:47.000000000 +0200 +++ new/yast2-iscsi-server-2.13.22/testsuite/tests/readConfig.ycp 2006-05-19 16:36:18.000000000 +0200 @@ -20,6 +20,8 @@ DUMP(IscsiServerFunctions::getConfig()); TEST(``(IscsiServerFunctions::removeItem("iqn.2006-04.suse.cz:308443b2-f0e6-465d-8889-ba290efedd58")), [READ, $[], $[]], nil); DUMP(IscsiServerFunctions::getConfig()); -TEST(``(IscsiServerFunctions::addTarget("iqn.2006-04.suse.cz:123456789", "2 Path=/tmp/file,Type=fileio")), [READ, $[], $[]], nil); +IscsiServerFunctions::addNewTarget("iqn.2006-04.suse.cz:123456789", "2 Path=/tmp/file,Type=fileio"); +IscsiServerFunctions::setTargetAuth("iqn.2006-04.suse.cz:123456789", ["one two", "three four"], "five six"); +TEST(``(IscsiServerFunctions::saveNewTarget("iqn.2006-04.suse.cz:123456789")), [READ, $[], $[]], nil); DUMP(IscsiServerFunctions::getConfig()); } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de