Hello community,
here is the log from the commit of package yast2-iscsi-server
checked in at Fri May 19 02:11:41 CEST 2006.
--------
--- yast2-iscsi-server/yast2-iscsi-server.changes 2006-05-17 17:53:43.000000000 +0200
+++ yast2-iscsi-server/yast2-iscsi-server.changes 2006-05-18 15:34:44.000000000 +0200
@@ -1,0 +2,10 @@
+Thu May 18 15:31:47 CEST 2006 - mzugec@suse.cz
+
+- fixed #176724 - duplicates configuration entry
+
+-------------------------------------------------------------------
+Thu May 18 13:10:49 CEST 2006 - mzugec@suse.cz
+
+- fixed #148968 - do not restart unchanged targets
+
+-------------------------------------------------------------------
Old:
----
yast2-iscsi-server-2.13.19.tar.bz2
New:
----
yast2-iscsi-server-2.13.21.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-iscsi-server.spec ++++++
--- /var/tmp/diff_new_pack.XsbtWw/_old 2006-05-19 02:11:03.000000000 +0200
+++ /var/tmp/diff_new_pack.XsbtWw/_new 2006-05-19 02:11:03.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-iscsi-server (Version 2.13.19)
+# spec file for package yast2-iscsi-server (Version 2.13.21)
#
# 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.19
+Version: 2.13.21
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-iscsi-server-2.13.19.tar.bz2
+Source0: yast2-iscsi-server-2.13.21.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.19
+%setup -n yast2-iscsi-server-2.13.21
%build
%{prefix}/bin/y2tool y2autoconf
@@ -64,6 +64,10 @@
%doc %{prefix}/share/doc/packages/yast2-iscsi-server
%changelog -n yast2-iscsi-server
+* Thu May 18 2006 - mzugec@suse.cz
+- fixed #176724 - duplicates configuration entry
+* Thu May 18 2006 - mzugec@suse.cz
+- fixed #148968 - do not restart unchanged targets
* Wed May 17 2006 - mzugec@suse.cz
- fixed #176186 - service status after YaST2 exit
* Tue May 09 2006 - mzugec@suse.cz
++++++ yast2-iscsi-server-2.13.19.tar.bz2 -> yast2-iscsi-server-2.13.21.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-iscsi-server-2.13.19/VERSION new/yast2-iscsi-server-2.13.21/VERSION
--- old/yast2-iscsi-server-2.13.19/VERSION 2006-05-17 17:48:30.000000000 +0200
+++ new/yast2-iscsi-server-2.13.21/VERSION 2006-05-18 15:31:42.000000000 +0200
@@ -1 +1 @@
-2.13.19
+2.13.21
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-iscsi-server-2.13.19/configure new/yast2-iscsi-server-2.13.21/configure
--- old/yast2-iscsi-server-2.13.19/configure 2006-05-17 17:42:46.000000000 +0200
+++ new/yast2-iscsi-server-2.13.21/configure 2006-05-18 15:29:41.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.18.
+# Generated by GNU Autoconf 2.59 for yast2-iscsi-server 2.13.20.
#
# 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.18'
-PACKAGE_STRING='yast2-iscsi-server 2.13.18'
+PACKAGE_VERSION='2.13.20'
+PACKAGE_STRING='yast2-iscsi-server 2.13.20'
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.18 to adapt to many kinds of systems.
+\`configure' configures yast2-iscsi-server 2.13.20 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.18:";;
+ short | recursive ) echo "Configuration of yast2-iscsi-server 2.13.20:";;
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.18
+yast2-iscsi-server configure 2.13.20
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.18, which was
+It was created by yast2-iscsi-server $as_me 2.13.20, 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.18'
+ VERSION='2.13.20'
cat >>confdefs.h <<_ACEOF
@@ -1863,7 +1863,7 @@
-VERSION="2.13.18"
+VERSION="2.13.20"
RPMNAME="yast2-iscsi-server"
MAINTAINER="Michal Zugec "
@@ -2693,7 +2693,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by yast2-iscsi-server $as_me 2.13.18, which was
+This file was extended by yast2-iscsi-server $as_me 2.13.20, 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.18
+yast2-iscsi-server config.status 2.13.20
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.19/configure.in new/yast2-iscsi-server-2.13.21/configure.in
--- old/yast2-iscsi-server-2.13.19/configure.in 2006-05-17 17:42:40.000000000 +0200
+++ new/yast2-iscsi-server-2.13.21/configure.in 2006-05-18 15:29:35.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.18, http://bugs.opensuse.org/, yast2-iscsi-server)
+AC_INIT(yast2-iscsi-server, 2.13.20, 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.18"
+VERSION="2.13.20"
RPMNAME="yast2-iscsi-server"
MAINTAINER="Michal Zugec "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-iscsi-server-2.13.19/src/IscsiServer.ycp new/yast2-iscsi-server-2.13.21/src/IscsiServer.ycp
--- old/yast2-iscsi-server-2.13.19/src/IscsiServer.ycp 2006-05-17 17:52:30.000000000 +0200
+++ new/yast2-iscsi-server-2.13.21/src/IscsiServer.ycp 2006-05-18 14:42:12.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: IscsiServer settings, input and output functions
* Authors: Michal Zugec
*
- * $Id: IscsiServer.ycp 30984 2006-05-17 15:51:56Z mzugec $
+ * $Id: IscsiServer.ycp 31008 2006-05-18 11:12:42Z mzugec $
*
* Representation of the configuration of iscsi-server.
* Input and output routines.
@@ -178,6 +178,7 @@
map changes = IscsiServerFunctions::getChanges();
list<string> connected = IscsiServerFunctions::getConnected();
// plus add there all targets except with active sessions (it means delete and create as new each target)
+/*
foreach(string key,any value, IscsiServerFunctions::getTargets(), {
if ((!contains(connected, key))&&(!contains(changes["add"]:[], key))&&(!contains(changes["del"]:[], key))){
changes["del"] = add (changes["del"]:[], key);
@@ -185,17 +186,19 @@
y2milestone("modified key %1", key);
}
});
-
+*/
// delete targets
foreach(string row, changes["del"]:[], {
- y2milestone("row to delete %1", row);
- string target=((map)SCR::Execute(.target.bash_output,
+ if (!contains(connected, row)){
+ y2milestone("row to delete %1", row);
+ string target=((map)SCR::Execute(.target.bash_output,
// get TID number for target
"cat /proc/net/iet/volume|grep $TARGET", $["TARGET":row]))["stdout"]:"" ;
- string to_delete = splitstring( splitstring(target, " ")[0]:"", ":")[1]:"";
- y2milestone("to delete %1", to_delete);
- // delete record with that TID
- SCR::Execute(.target.bash_output, "ietadm --op delete --tid=$TID", $["TID":to_delete]);
+ string to_delete = splitstring( splitstring(target, " ")[0]:"", ":")[1]:"";
+ y2milestone("to delete %1", to_delete);
+ // delete record with that TID
+ SCR::Execute(.target.bash_output, "ietadm --op delete --tid=$TID", $["TID":to_delete]);
+ } else y2error("Cannot remove target %1 - already connected", row);
});
// add a new target
@@ -231,6 +234,7 @@
SCR::Execute(.target.bash_output, command, $[]);
y2milestone("lun %1,%2", lun_num, lun_path);
});
+
}
return true;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-iscsi-server-2.13.19/src/IscsiServerFunctions.pm new/yast2-iscsi-server-2.13.21/src/IscsiServerFunctions.pm
--- old/yast2-iscsi-server-2.13.19/src/IscsiServerFunctions.pm 2006-04-11 17:42:01.000000000 +0200
+++ new/yast2-iscsi-server-2.13.21/src/IscsiServerFunctions.pm 2006-05-18 15:22:13.000000000 +0200
@@ -102,6 +102,12 @@
my $outgoing = shift;
my $tmp_auth = $config{$target};
+ my @list=();
+ foreach my $row (@{$tmp_auth}){
+ push(@list, $row) if (($$row{'KEY'} ne 'IncomingUser')&&($$row{'KEY'} ne 'OutgoingUser'));
+ }
+ $tmp_auth=\@list;
+
foreach my $row (@incoming){
push(@$tmp_auth, {'KEY'=>'IncomingUser', 'VALUE'=>$row});
}
@@ -117,8 +123,15 @@
if (ref($config{$target})){
my $tmp_list = $config{$target} ;
+ my @list=();
+ foreach my $row (@{$tmp_list}){
+ push(@list, $row) if (($$row{'KEY'} ne 'Target')&&($$row{'KEY'} ne 'Lun'));
+ }
+ $tmp_list=\@list;
+
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} ];
}
@@ -218,7 +231,7 @@
foreach my $key (keys %new_config){
if (! defined $config{$key}){
delete($new_config{$key});
- push(@{$changes{'del'}}, $key);
+# push(@{$changes{'del'}}, $key);
}
}
@@ -226,7 +239,7 @@
if (! defined $new_config{$key}){
# add new items
addTo(\%new_config, $key);
- push(@{$changes{'add'}}, $key) if ($key ne 'auth');
+# push(@{$changes{'add'}}, $key) if ($key ne 'auth');
} else {
# for modifying store comments
my %comments = ();
@@ -285,5 +298,46 @@
return \%changes;
}
+
+# set modified for %changes
+BEGIN { $TYPEINFO{setModifChanges} = ["function", "integer", "string" ]; }
+sub setModifChanges {
+ my $self = shift;
+ my $target = shift;
+ my $ret = 0;
+
+ foreach my $section (("del", "add")){
+ foreach my $row (@{$changes{$section}}){
+ $ret=1 if ($row eq $target);
+ }}
+
+ if ($ret==0){
+ push(@{$changes{"del"}}, $target);
+ push(@{$changes{"add"}}, $target);
+ }
+
+ return \$ret;
+}
+
+
+# set deleted for %changes
+BEGIN { $TYPEINFO{setDelChanges} = ["function", "integer", "string" ]; }
+sub setDelChanges {
+ my $self = shift;
+ my $target = shift;
+ my $ret = 0;
+
+ foreach my $section (("del", "add")){
+ my @list=();
+ foreach my $row (@{$changes{$section}}){
+ push(@list, $row) if ($row ne $target);
+ }
+ $changes{$section}=\@list;
+ }
+ push(@{$changes{"del"}}, $target);
+
+ return \$ret;
+}
+
1;
# EOF
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-iscsi-server-2.13.19/src/widgets.ycp new/yast2-iscsi-server-2.13.21/src/widgets.ycp
--- old/yast2-iscsi-server-2.13.19/src/widgets.ycp 2006-04-24 11:08:57.000000000 +0200
+++ new/yast2-iscsi-server-2.13.21/src/widgets.ycp 2006-05-18 11:22:33.000000000 +0200
@@ -110,6 +110,8 @@
// add a new item
if (Popup::ContinueCancel(_("Really delete this item?"))){
integer del=tointeger( UI::QueryWidget(`id(`server), `CurrentItem) );
+ string target = ((term)UI::QueryWidget(`id(`server), `Item(del)))[1]:"";
+ IscsiServerFunctions::setDelChanges( target );
IscsiServerFunctions::removeItem( ((term)UI::QueryWidget(`id(`server), `Item(del)))[1]:"" );
initTable("");
}
@@ -118,6 +120,8 @@
// edit new item
integer edit=tointeger( UI::QueryWidget(`id(`server), `CurrentItem) );
curr_target = ((term)UI::QueryWidget(`id(`server), `Item(edit)))[1]:"";
+ if (IscsiServerFunctions::setModifChanges( curr_target ) == 0) y2milestone("modified %1", curr_target);
+ else y2error("%1 already modified", curr_target);
// goto EditDialog() (initModify)
ret = `edit;
break;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...