[yast-commit] r57275 - in /branches/tmp/SLE-11-SP1-Stash/iscsi-server: VERSION package/yast2-iscsi-server.changes src/IscsiServer.ycp

Author: mzugec Date: Thu May 21 09:30:51 2009 New Revision: 57275 URL: http://svn.opensuse.org/viewcvs/yast?rev=57275&view=rev Log: handle correctly when tgt is already installed (bnc#501375) Modified: branches/tmp/SLE-11-SP1-Stash/iscsi-server/VERSION branches/tmp/SLE-11-SP1-Stash/iscsi-server/package/yast2-iscsi-server.changes branches/tmp/SLE-11-SP1-Stash/iscsi-server/src/IscsiServer.ycp Modified: branches/tmp/SLE-11-SP1-Stash/iscsi-server/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/SLE-11-SP1-Stash/iscsi-ser... ============================================================================== --- branches/tmp/SLE-11-SP1-Stash/iscsi-server/VERSION (original) +++ branches/tmp/SLE-11-SP1-Stash/iscsi-server/VERSION Thu May 21 09:30:51 2009 @@ -1 +1 @@ -2.17.6 +2.17.7 Modified: branches/tmp/SLE-11-SP1-Stash/iscsi-server/package/yast2-iscsi-server.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/SLE-11-SP1-Stash/iscsi-ser... ============================================================================== --- branches/tmp/SLE-11-SP1-Stash/iscsi-server/package/yast2-iscsi-server.changes (original) +++ branches/tmp/SLE-11-SP1-Stash/iscsi-server/package/yast2-iscsi-server.changes Thu May 21 09:30:51 2009 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu May 21 09:19:02 CEST 2009 - mzugec@suse.cz + +- handle correctly when tgt is already installed (bnc#501375) +- 2.17.7 + +------------------------------------------------------------------- Mon Mar 23 17:51:33 CET 2009 - mzugec@suse.de - correctly work with firewall (bnc#462006) Modified: branches/tmp/SLE-11-SP1-Stash/iscsi-server/src/IscsiServer.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/SLE-11-SP1-Stash/iscsi-ser... ============================================================================== --- branches/tmp/SLE-11-SP1-Stash/iscsi-server/src/IscsiServer.ycp (original) +++ branches/tmp/SLE-11-SP1-Stash/iscsi-server/src/IscsiServer.ycp Thu May 21 09:30:51 2009 @@ -27,6 +27,8 @@ import "IscsiServerFunctions"; import "Mode"; import "NetworkService"; +import "PackageSystem"; +import "Label"; boolean serviceStatus = false; boolean statusOnStart = false; @@ -125,15 +127,21 @@ // test if required package ("iscsitarget") is installed boolean installed_packages(){ - boolean ret = false; - y2milestone("Check if iscsitarget is installed"); - if( !Package::InstallMsg( "iscsitarget", - _("<p>To configure the iSCSI target, the <b>%1</b> package must be installed.</p>") + - _("<p>Install it now?</p>")) ) - { - Popup::Error( Message::CannotContinueWithoutPackagesInstalled() ); - } else ret = true; - return ret; + if (!PackageSystem::PackageInstalled("iscsitarget")){ + y2milestone("Not installed, will install"); + boolean confirm = Popup::AnyQuestionRichText( + "", _("Can't continue without installing iscsitarget package"), 40, 10, + Label::InstallButton(), Label::CancelButton (), `focus_yes + ); + + if (confirm){ + if (PackageSystem::PackageInstalled("tgt")) PackageSystem::DoRemove(["tgt"]); + PackageSystem::DoInstall(["iscsitarget"]); + if (PackageSystem::PackageInstalled("iscsitarget")) return true; + else return false; + } + return false; + } else return true; } // check status of iscsitarget service -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
mzugec@svn.opensuse.org