Author: lslezak Date: Thu Dec 2 16:04:59 2010 New Revision: 62926
URL: http://svn.opensuse.org/viewcvs/yast?rev=62926&view=rev Log: - pass the selected CD/DVD device to the package manager in case of multiple devices in the system (bnc#652134)
Modified: branches/SuSE-SLE-10-SP4-Branch/installation/package/yast2-installation.changes branches/SuSE-SLE-10-SP4-Branch/installation/src/include/add-on-workflow.ycp branches/SuSE-SLE-10-SP4-Branch/installation/yast2-installation.spec.in branches/SuSE-SLE-10-SP4-Branch/packager/VERSION branches/SuSE-SLE-10-SP4-Branch/packager/package/yast2-packager.changes branches/SuSE-SLE-10-SP4-Branch/packager/src/modules/SourceDialogs.ycp branches/SuSE-SLE-10-SP4-Branch/packager/src/modules/SourceManager.ycp branches/SuSE-SLE-10-SP4-Branch/product-creator/VERSION branches/SuSE-SLE-10-SP4-Branch/product-creator/package/yast2-product-creator.changes branches/SuSE-SLE-10-SP4-Branch/product-creator/src/SourceDialogsLite.ycp branches/SuSE-SLE-10-SP4-Branch/product-creator/yast2-product-creator.spec.in
Modified: branches/SuSE-SLE-10-SP4-Branch/installation/package/yast2-installation.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP4-Branch/install... ============================================================================== --- branches/SuSE-SLE-10-SP4-Branch/installation/package/yast2-installation.changes (original) +++ branches/SuSE-SLE-10-SP4-Branch/installation/package/yast2-installation.changes Thu Dec 2 16:04:59 2010 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Dec 2 14:00:21 UTC 2010 - lslezak@suse.cz + +- pass the selected CD/DVD device to the package manager in case + of multiple devices in the system (bnc#652134) +- 2.13.219 + +------------------------------------------------------------------- Wed Mar 24 07:40:55 UTC 2010 - lslezak@suse.cz
- inst_suseconfig.ycp - do not reset UI product name
Modified: branches/SuSE-SLE-10-SP4-Branch/installation/src/include/add-on-workflow.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP4-Branch/install... ============================================================================== --- branches/SuSE-SLE-10-SP4-Branch/installation/src/include/add-on-workflow.ycp (original) +++ branches/SuSE-SLE-10-SP4-Branch/installation/src/include/add-on-workflow.ycp Thu Dec 2 16:04:59 2010 @@ -272,10 +272,16 @@ ? _("Insert the add-on product CD") : _("Insert the add-on product DVD");
- // bugzilla #237264 - boolean ask_for_media = SourceManager::AskForCD (msg); - y2milestone ("SourceManager::AskForCD returned: %1", ask_for_media); - if (ask_for_media == true) { + map<string,any> ui_result = SourceManager::AskForCD (msg); + y2milestone ("SourceManager::AskForCD returned: %1", ui_result); + if (ui_result["continue"]:false) { + string cd_device = ui_result["device"]:""; + if (cd_device != nil && cd_device != "") + { + y2milestone("Selected CD/DVD device: %1", cd_device); + url = url + "?devices=" + URL::EscapeString(cd_device, URL::transform_map_query); + } + createResult = SourceManager::createSource( url); } else { createResult = nil;
Modified: branches/SuSE-SLE-10-SP4-Branch/installation/yast2-installation.spec.in URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP4-Branch/install... ============================================================================== --- branches/SuSE-SLE-10-SP4-Branch/installation/yast2-installation.spec.in (original) +++ branches/SuSE-SLE-10-SP4-Branch/installation/yast2-installation.spec.in Thu Dec 2 16:04:59 2010 @@ -8,8 +8,8 @@ Requires: yast2-update Requires: yast2-storage yast2-mouse yast2-bootloader
-# SourceManager::InstallationSourceOnPartition 2.13.159, bugzilla #208222 -Requires: yast2-packager >= 2.13.159 +# SourceManager::AskForCD (bnc#652134) +Requires: yast2-packager >= 2.13.194 # extra sources in ResolvableProperties() Requires: yast2-pkg-bindings >= 2.13.101 # ProductControl::Run returning `abort (FATE #300422)
Modified: branches/SuSE-SLE-10-SP4-Branch/packager/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP4-Branch/package... ============================================================================== --- branches/SuSE-SLE-10-SP4-Branch/packager/VERSION (original) +++ branches/SuSE-SLE-10-SP4-Branch/packager/VERSION Thu Dec 2 16:04:59 2010 @@ -1 +1 @@ -2.13.193 +2.13.194
Modified: branches/SuSE-SLE-10-SP4-Branch/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP4-Branch/package... ============================================================================== --- branches/SuSE-SLE-10-SP4-Branch/packager/package/yast2-packager.changes (original) +++ branches/SuSE-SLE-10-SP4-Branch/packager/package/yast2-packager.changes Thu Dec 2 16:04:59 2010 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Dec 2 13:59:08 UTC 2010 - lslezak@suse.cz + +- pass the selected CD/DVD device to the package manager in case + of multiple devices in the system (bnc#652134) +- 2.13.194 + +------------------------------------------------------------------- Thu Nov 25 10:18:19 CET 2010 - jsrain@suse.cz
- fixed detection of virtio devices (bnc#649755)
Modified: branches/SuSE-SLE-10-SP4-Branch/packager/src/modules/SourceDialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP4-Branch/package... ============================================================================== --- branches/SuSE-SLE-10-SP4-Branch/packager/src/modules/SourceDialogs.ycp (original) +++ branches/SuSE-SLE-10-SP4-Branch/packager/src/modules/SourceDialogs.ycp Thu Dec 2 16:04:59 2010 @@ -57,6 +57,10 @@ _url = url; }
+// CD/DVD device name to use (e.g. /dev/sr1) in case of multiple +// devices in the system. Empty string means use the default. +string cd_device_name = ""; + /** * Return URL after the run of the dialog * @return string the URL @@ -891,8 +895,21 @@ string msg = selected == `cd ? _("Insert the add-on product CD") : _("Insert the add-on product DVD"); - if (! SourceManager::AskForCD (msg)) + + // reset the device name + cd_device_name = ""; + + // ask for a medium + map<string,any> ui_result = SourceManager::AskForCD (msg); + if (! ui_result["continue"]:false) return false; + + string cd_device = ui_result["device"]:""; + if (cd_device != nil && cd_device != "") + { + y2milestone("Selected CD/DVD device: %1", cd_device); + cd_device_name = cd_device; + } } return true; } @@ -918,8 +935,15 @@ else if ( selected == `https ) _url = "https://"; else if ( selected == `samba ) _url = "smb://"; else if ( selected == `nfs ) _url = "nfs://"; - else if ( selected == `cd ) _url = "cd:///"; - else if ( selected == `dvd ) _url = "dvd:///"; + else if ( selected == `cd || selected == `dvd) + { + _url = (selected == `cd) ? "cd:///" : "dvd:///"; + if (cd_device_name != "") + { + _url = _url + "?devices=" + URL::EscapeString(cd_device_name, URL::transform_map_query); + } + } + else if ( selected == `local_dir ) _url = "dir://"; else if ( selected == `pkg ) _url = "pkg://"; // hack for local PlainDir source else if ( selected == `slp ) _url = "slp://";
Modified: branches/SuSE-SLE-10-SP4-Branch/packager/src/modules/SourceManager.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP4-Branch/package... ============================================================================== --- branches/SuSE-SLE-10-SP4-Branch/packager/src/modules/SourceManager.ycp (original) +++ branches/SuSE-SLE-10-SP4-Branch/packager/src/modules/SourceManager.ycp Thu Dec 2 16:04:59 2010 @@ -1381,13 +1381,13 @@ /** * */ -global boolean AskForCD (string message) { +global map<string,any> AskForCD (string message) { list<map<string,any> > cdroms = (list<map<string,any> >) SCR::Read (.probe.cdrom); boolean multiple_drives = size (cdroms) > 1; term drives_sel = `Empty (); - list<string> devices = maplist (map<string,any> d, cdroms, { - return d["dev_name"]:""; + list<term> devices = maplist (map<string,any> d, cdroms, { + return `item(`id(d["dev_name"]:""), d["model"]:"" + " (" + (d["dev_name"]:"") + ")" ); }); if (multiple_drives) { @@ -1411,7 +1411,7 @@ ), `HSpacing (1)); UI::OpenDialog (contents); if (multiple_drives) - UI::ChangeWidget (`id (`drives), `CurrentItem, devices[0]:""); + UI::ChangeWidget (`id (`drives), `CurrentItem, cdroms[0,"dev_name"]:""); UI::SetFocus (`id (`cont)); symbol ret = nil; while (true) @@ -1431,13 +1431,22 @@ else { SCR::Execute (.target.bash, sformat ("/bin/eject %1", - devices[0]:"")); + cdroms[0,"dev_name"]:"")); } } ret = nil; } + + map<string,any> result = $[ "continue" : (ret == `cont) ]; + + if (multiple_drives) + { + result = add(result, "device", (string)UI::QueryWidget (`id (`drives), `Value)); + } + UI::CloseDialog (); - return ret == `cont; + + return result; }
/**
Modified: branches/SuSE-SLE-10-SP4-Branch/product-creator/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP4-Branch/product... ============================================================================== --- branches/SuSE-SLE-10-SP4-Branch/product-creator/VERSION (original) +++ branches/SuSE-SLE-10-SP4-Branch/product-creator/VERSION Thu Dec 2 16:04:59 2010 @@ -1 +1 @@ -2.13.32 +2.13.33
Modified: branches/SuSE-SLE-10-SP4-Branch/product-creator/package/yast2-product-creator.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP4-Branch/product... ============================================================================== --- branches/SuSE-SLE-10-SP4-Branch/product-creator/package/yast2-product-creator.changes (original) +++ branches/SuSE-SLE-10-SP4-Branch/product-creator/package/yast2-product-creator.changes Thu Dec 2 16:04:59 2010 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Dec 2 14:01:55 UTC 2010 - lslezak@suse.cz + +- adapted to changed signature of SourceManager::AskForCD() + function (bnc#652134) +- 2.13.33 + +------------------------------------------------------------------- Thu Apr 3 14:30:16 CEST 2008 - jsuchome@suse.cz
- write the full URL into config.xml for https sources (bnc#376666)
Modified: branches/SuSE-SLE-10-SP4-Branch/product-creator/src/SourceDialogsLite.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP4-Branch/product... ============================================================================== --- branches/SuSE-SLE-10-SP4-Branch/product-creator/src/SourceDialogsLite.ycp (original) +++ branches/SuSE-SLE-10-SP4-Branch/product-creator/src/SourceDialogsLite.ycp Thu Dec 2 16:04:59 2010 @@ -805,7 +805,7 @@ string msg = selected == `cd ? _("Insert the add-on product CD") : _("Insert the add-on product DVD"); - if (! SourceManager::AskForCD (msg)) + if (! SourceManager::AskForCD(msg)["continue"]:false) return false; } return true;
Modified: branches/SuSE-SLE-10-SP4-Branch/product-creator/yast2-product-creator.spec.in URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP4-Branch/product... ============================================================================== --- branches/SuSE-SLE-10-SP4-Branch/product-creator/yast2-product-creator.spec.in (original) +++ branches/SuSE-SLE-10-SP4-Branch/product-creator/yast2-product-creator.spec.in Thu Dec 2 16:04:59 2010 @@ -5,7 +5,10 @@
PreReq: %fillup_prereq
-Requires: yast2-packager autoyast2-installation yast2-security +Requires: autoyast2-installation yast2-security + +# SourceManager::AskForCD (bnc#652134) +Requires: yast2-packager >= 2.13.194
# GPG.ycp and GPGWidgets.ycp Requires: yast2 >= 2.13.90
yast-commit@lists.opensuse.org