Author: lslezak Date: Tue Dec 2 12:49:26 2008 New Revision: 53801 URL: http://svn.opensuse.org/viewcvs/yast?rev=53801&view=rev Log: - fixed package installation in autoyast installation mode (bnc#450416) - 2.17.13 Modified: trunk/sound/VERSION trunk/sound/package/yast2-sound.changes trunk/sound/sound/src/sound_auto.ycp trunk/sound/sound/src/sound_write.ycp Modified: trunk/sound/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/sound/VERSION?rev=53801&r1=53800&r2=53801&view=diff ============================================================================== --- trunk/sound/VERSION (original) +++ trunk/sound/VERSION Tue Dec 2 12:49:26 2008 @@ -1 +1 @@ -2.17.12 +2.17.13 Modified: trunk/sound/package/yast2-sound.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/sound/package/yast2-sound.changes?rev=53801&r1=53800&r2=53801&view=diff ============================================================================== --- trunk/sound/package/yast2-sound.changes (original) +++ trunk/sound/package/yast2-sound.changes Tue Dec 2 12:49:26 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Tue Dec 2 12:48:10 CET 2008 - lslezak@suse.cz + +- fixed package installation in autoyast installation mode + (bnc#450416) +- 2.17.13 + +------------------------------------------------------------------- Tue Nov 25 17:27:35 CET 2008 - lslezak@suse.cz - fixed "Really Abort" popup behavior in the "Add" dialog Modified: trunk/sound/sound/src/sound_auto.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/sound/sound/src/sound_auto.ycp?rev=53801&r1=53800&r2=53801&view=diff ============================================================================== --- trunk/sound/sound/src/sound_auto.ycp (original) +++ trunk/sound/sound/src/sound_auto.ycp Tue Dec 2 12:49:26 2008 @@ -109,6 +109,9 @@ /* Create a summary*/ if(func == "Import") { + // detect the cards on the system, so we could write them + // correctly: + param = UpdateCardsToTargetSystem (param); ret = Sound::Import(param) && PulseAudio::Import(param); } /* Create a summary*/ @@ -139,7 +142,19 @@ } /* Return required package list */ else if (func == "Packages") { - ret = $[]; + list<string> packages_to_install = []; + + list<string> reqmodules = Sound::RequiredKernelModules(); + foreach(string driver, reqmodules, + { + list<string> req_packages = Sound::RequiredPackagesToInstall(driver); + packages_to_install = (list<string>)union(packages_to_install, req_packages); + } + ); + + y2milestone("Collected packages to install: %1", packages_to_install); + + ret = $[ "install" : packages_to_install ]; } /* Return actual state */ else if (func == "Export") { @@ -154,16 +169,12 @@ PulseAudio::Read(); ret = Sound::Read (false); } - /* Write givven settings */ + /* Write given settings */ else if (func == "Write") { import "Progress"; boolean progress_orig = Progress::set(false); map settings = Sound::Export(); Sound::write_only = true; - // detect the cards on the system, so we could write them - // correctly: - settings = UpdateCardsToTargetSystem (settings); - Sound::Import (settings); ret = WFM::CallFunction ("sound_write", [ settings ]); Progress::set(progress_orig); return ret; @@ -174,7 +185,7 @@ ret = false; } - y2debug("ret=%1", ret); + y2milestone("ret=%1", ret); y2milestone("Sound auto finished"); y2milestone("----------------------------------------"); Modified: trunk/sound/sound/src/sound_write.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/sound/sound/src/sound_write.ycp?rev=53801&r1=53800&r2=53801&view=diff ============================================================================== --- trunk/sound/sound/src/sound_write.ycp (original) +++ trunk/sound/sound/src/sound_write.ycp Tue Dec 2 12:49:26 2008 @@ -183,7 +183,7 @@ _("Storing joystick settings..."), ]; - if (install) + if (install && !Mode::autoinst()) { // progress bar item stones = add(stones, _("Install required packages")); @@ -206,27 +206,34 @@ Progress::NextStage(); - // get required sound and joystick kernel modules - list<string> reqmodules = Sound::RequiredKernelModules(); - list<string> reqjoymodules = Joystick::RequiredKernelModules(); + list<string> reqmodules = []; - if (reqmodules == nil) + // in autoyast installation the packages are installed by autoyast + // see sound_auto.ycp - it's called with "Packages" argument + if (!Mode::autoinst()) { - reqmodules = []; - } + // get required sound and joystick kernel modules + reqmodules = Sound::RequiredKernelModules(); + list<string> reqjoymodules = Joystick::RequiredKernelModules(); - if (reqjoymodules == nil) - { - reqjoymodules = []; - } + if (reqmodules == nil) + { + reqmodules = []; + } - // merge lists, remove duplicates - reqmodules = (list<string>) union(reqmodules, reqjoymodules); + if (reqjoymodules == nil) + { + reqjoymodules = []; + } - if (size(reqmodules) > 0) - { - // ensure that all required kernel modules are installed - Package::InstallKernel(reqmodules); + // merge lists, remove duplicates + reqmodules = (list<string>) union(reqmodules, reqjoymodules); + + if (size(reqmodules) > 0) + { + // ensure that all required kernel modules are installed + Package::InstallKernel(reqmodules); + } } // save config to /etc/modprobe.d/sound @@ -301,7 +308,7 @@ // write joystick configuration Joystick::Write (abort_block); - if (install) + if (install && !Mode::autoinst()) { Progress::NextStage(); install_packages(reqmodules); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org