[yast-commit] r57274 - in /trunk/iscsi-server: VERSION package/yast2-iscsi-server.changes src/IscsiServer.ycp

Author: mzugec Date: Thu May 21 09:29:59 2009 New Revision: 57274 URL: http://svn.opensuse.org/viewcvs/yast?rev=57274&view=rev Log: handle correctly when tgt is already installed (bnc#501375) Modified: trunk/iscsi-server/VERSION trunk/iscsi-server/package/yast2-iscsi-server.changes trunk/iscsi-server/src/IscsiServer.ycp Modified: trunk/iscsi-server/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/iscsi-server/VERSION?rev=57274&r1... ============================================================================== --- trunk/iscsi-server/VERSION (original) +++ trunk/iscsi-server/VERSION Thu May 21 09:29:59 2009 @@ -1 +1 @@ -2.18.2 +2.18.3 Modified: trunk/iscsi-server/package/yast2-iscsi-server.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/iscsi-server/package/yast2-iscsi-... ============================================================================== --- trunk/iscsi-server/package/yast2-iscsi-server.changes (original) +++ trunk/iscsi-server/package/yast2-iscsi-server.changes Thu May 21 09:29:59 2009 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu May 21 09:19:51 CEST 2009 - mzugec@suse.cz + +- handle correctly when tgt is already installed (bnc#501375) +- 2.18.3 + +------------------------------------------------------------------- Mon Mar 9 15:42:14 CET 2009 - mzugec@suse.cz - correctly work with firewall (bnc#462006) Modified: trunk/iscsi-server/src/IscsiServer.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/iscsi-server/src/IscsiServer.ycp?... ============================================================================== --- trunk/iscsi-server/src/IscsiServer.ycp (original) +++ trunk/iscsi-server/src/IscsiServer.ycp Thu May 21 09:29:59 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