commit yast2-bootloader for openSUSE:Factory
Hello community, here is the log from the commit of package yast2-bootloader for openSUSE:Factory checked in at Mon Jul 27 22:22:29 CEST 2009. -------- --- yast2-bootloader/yast2-bootloader.changes 2009-07-24 17:06:34.000000000 +0200 +++ yast2-bootloader/yast2-bootloader.changes 2009-07-27 16:53:01.000000000 +0200 @@ -1,0 +2,6 @@ +Mon Jul 27 15:48:32 CEST 2009 - juhliarik@suse.cz + +- added support for enable/disable acoustinc signals (fate#305403) +- 2.18.11 + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yast2-bootloader-2.18.10.tar.bz2 New: ---- yast2-bootloader-2.18.11.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-bootloader.spec ++++++ --- /var/tmp/diff_new_pack.sSWINF/_old 2009-07-27 22:21:08.000000000 +0200 +++ /var/tmp/diff_new_pack.sSWINF/_new 2009-07-27 22:21:08.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package yast2-bootloader (Version 2.18.10) +# spec file for package yast2-bootloader (Version 2.18.11) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,10 +19,10 @@ Name: yast2-bootloader -Version: 2.18.10 +Version: 2.18.11 Release: 1 BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-bootloader-2.18.10.tar.bz2 +Source0: yast2-bootloader-2.18.11.tar.bz2 Prefix: /usr Group: System/YaST License: GPL v2 or later @@ -61,7 +61,7 @@ This package contains the YaST2 component for bootloader configuration. %prep -%setup -n yast2-bootloader-2.18.10 +%setup -n yast2-bootloader-2.18.11 %build %{prefix}/bin/y2tool y2autoconf ++++++ yast2-bootloader-2.18.10.tar.bz2 -> yast2-bootloader-2.18.11.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.18.10/VERSION new/yast2-bootloader-2.18.11/VERSION --- old/yast2-bootloader-2.18.10/VERSION 2009-07-24 14:55:00.000000000 +0200 +++ new/yast2-bootloader-2.18.11/VERSION 2009-07-27 15:49:29.000000000 +0200 @@ -1 +1 @@ -2.18.10 +2.18.11 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.18.10/src/grub/helps.ycp new/yast2-bootloader-2.18.11/src/grub/helps.ycp --- old/yast2-bootloader-2.18.10/src/grub/helps.ycp 2009-06-23 10:46:19.000000000 +0200 +++ new/yast2-bootloader-2.18.11/src/grub/helps.ycp 2009-07-27 15:38:08.000000000 +0200 @@ -78,6 +78,8 @@ _("<p>Selecting <b>Hide Menu on Boot</b> will hide the boot menu.</p>"), "gfxmenu" : _("<p><b>Graphical Menu File</b> defines the file to use for the graphical boot menu.</p>"), + "enable_acoustic_signals" : + _("<p><b>Enable Acoustic Signals</b> turn on/off acoustic signals.</p>"), "password" : _("<p><b>Protect Boot Loader with Password</b><br> Define the password that will be required to access the boot menu. YaST will only accept the password if you repeat diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.18.10/src/grub/options.ycp new/yast2-bootloader-2.18.11/src/grub/options.ycp --- old/yast2-bootloader-2.18.10/src/grub/options.ycp 2009-07-20 11:47:28.000000000 +0200 +++ new/yast2-bootloader-2.18.11/src/grub/options.ycp 2009-07-27 15:36:25.000000000 +0200 @@ -20,6 +20,7 @@ import "Label"; import "BootStorage"; +import "GfxMenu"; import "System::Bootloader_API"; include "bootloader/routines/common_options.ycp"; @@ -31,6 +32,10 @@ boolean value = BootCommon::globals["trusted_grub"]:"false" != "true"; UI::ChangeWidget(`id(`gfxinput),`Enabled, value); UI::ChangeWidget(`id(`gfxinput),`Value,BootCommon::globals[widget]:""); + if (GfxMenu::enable_sound_signals) + UI::ChangeWidget(`id(`enable_acoustic_signals),`Value, true); + else + UI::ChangeWidget(`id(`enable_acoustic_signals),`Value, false); } void StoreGfx(string widget, map event){ @@ -40,6 +45,8 @@ } else { BootCommon::global_options[widget] = result; } + + GfxMenu::enable_sound_signals = (boolean) UI::QueryWidget(`id(`enable_acoustic_signals),`Value); } symbol HandleGfx(string widget, map event){ @@ -56,18 +63,21 @@ map<string,any> GfxWidget(){ return $[ "widget" : `custom, - "custom_widget" : `HBox(`Left(`InputField(`id(`gfxinput),`opt(`hstretch), - grub_descriptions["gfxmenu"]:"gfxmenu")), - `VBox( - `Left(`Label("")), - `Left(`PushButton(`id(`browsegfx),`opt(`notify), Label::BrowseButton())) - ) - ), + "custom_widget" : + `VBox( + `Left(`CheckBox(`id(`enable_acoustic_signals), _("Enable Acoustic &Signals"))), + `HBox(`Left(`InputField(`id(`gfxinput),`opt(`hstretch), grub_descriptions["gfxmenu"]:"gfxmenu")), + `VBox( + `Left(`Label("")), + `Left(`PushButton(`id(`browsegfx),`opt(`notify), Label::BrowseButton())) + ) + ) + ), "init" : InitGfx, "store" : StoreGfx, "handle" : HandleGfx, "handle_events" : [`browsegfx], - "help" : grub_help_messages["gfxmenu"]:"" + "help" : grub_help_messages["gfxmenu"]:"" + grub_help_messages["enable_acoustic_signals"]:"" ]; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.18.10/src/modules/BootCommon.ycp new/yast2-bootloader-2.18.11/src/modules/BootCommon.ycp --- old/yast2-bootloader-2.18.10/src/modules/BootCommon.ycp 2009-07-24 15:21:35.000000000 +0200 +++ new/yast2-bootloader-2.18.11/src/modules/BootCommon.ycp 2009-07-24 17:05:52.000000000 +0200 @@ -15,7 +15,7 @@ * Joachim Plack <jplack@suse.de> * Olaf Dabrunz <od@suse.de> * - * $Id: BootCommon.ycp 57267 2009-05-20 12:35:05Z juhliarik $ + * $Id: BootCommon.ycp 58153 2009-07-24 15:05:51Z juhliarik $ * */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.18.10/src/modules/BootGRUB.ycp new/yast2-bootloader-2.18.11/src/modules/BootGRUB.ycp --- old/yast2-bootloader-2.18.10/src/modules/BootGRUB.ycp 2009-07-22 13:39:48.000000000 +0200 +++ new/yast2-bootloader-2.18.11/src/modules/BootGRUB.ycp 2009-07-27 15:16:37.000000000 +0200 @@ -504,8 +504,10 @@ { BootStorage::ProposeDeviceMap (); } - - //importMetaData(); + // FATE#305403: Bootloader beep configuration + // read status of acoustic signals + if (Mode::normal()) + GfxMenu::ReadStatusAcousticSignal(); return ret; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.18.10/src/modules/Bootloader.ycp new/yast2-bootloader-2.18.11/src/modules/Bootloader.ycp --- old/yast2-bootloader-2.18.10/src/modules/Bootloader.ycp 2009-07-24 15:25:27.000000000 +0200 +++ new/yast2-bootloader-2.18.11/src/modules/Bootloader.ycp 2009-07-24 17:05:52.000000000 +0200 @@ -12,7 +12,7 @@ * Jiri Srain <jsrain@suse.cz> * Olaf Dabrunz <od@suse.de> * - * $Id: Bootloader.ycp 56960 2009-04-24 09:42:22Z juhliarik $ + * $Id: Bootloader.ycp 58153 2009-07-24 15:05:51Z juhliarik $ * */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.18.10/src/modules/GfxMenu.ycp new/yast2-bootloader-2.18.11/src/modules/GfxMenu.ycp --- old/yast2-bootloader-2.18.10/src/modules/GfxMenu.ycp 2009-06-26 11:18:15.000000000 +0200 +++ new/yast2-bootloader-2.18.11/src/modules/GfxMenu.ycp 2009-07-27 15:29:32.000000000 +0200 @@ -23,6 +23,11 @@ import "Mode"; + /** FATE#305403: Bootloader beep configuration + * enable/disable sounds signal during boot + */ + global boolean enable_sound_signals = false; + /** * Replace every match of given regular expression in a string with a * replacement string @@ -284,6 +289,60 @@ return ret; } +/** FATE#305403: Bootloader beep configuration + * Read status of acoustic signals + * set global variable enable_sound_signals + * + */ + +global void ReadStatusAcousticSignal () +{ + integer ret = -1; // off + + string command = "gfxboot --show-config | grep beep="; + map out = (map)SCR::Execute (.target.bash_output, command); + + y2milestone("Comand: %1 return: %2",command, out); + if (out["exit"]:-1 == 0) + { + string result = out["stdout"]:""; + list <string> l_result = splitstring(result, "\n"); + if (l_result[1]:"" == "beep=1") + ret = 1; + else + ret = 0; + + } else { + y2error("Calling command: %1 failed", command); + } + if (ret == 1) + enable_sound_signals = true; + else + enable_sound_signals = false; + + y2milestone("Status of acoustic signals is (on==true/off==false): %1", enable_sound_signals); +} + + +/** FATE#305403: Bootloader beep configuration + * Write settings for acoustic signals + * + * @param boolean true -> enable acoustic signals or disable + */ +void WriteAcousticSignal(boolean enable) +{ + string command = "gfxboot --change-config boot::beep=0"; + if (enable) + { + y2milestone("Enable acoustic signals for boot menu"); + command = "gfxboot --change-config boot::beep=1"; + } else { + y2milestone("Disable acoustic signals for boot menu"); + } + map ret = (map)SCR::Execute (.target.bash_output, command); + y2milestone ("Result of command: %1 result: %2",command, ret); +} + /** * Update graphical bootloader to contain translations for section labels in @@ -296,6 +355,8 @@ global define boolean UpdateGfxMenuContents (string loader) { y2milestone ("Updating GFX boot menu"); + // FATE#305403: Bootloader beep configuration + WriteAcousticSignal(enable_sound_signals); // if the boot menu does not exist, return without updating it if (SCR::Read (.target.size, "/boot/message") == -1) return true; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.18.10/src/routines/misc.ycp new/yast2-bootloader-2.18.11/src/routines/misc.ycp --- old/yast2-bootloader-2.18.10/src/routines/misc.ycp 2009-07-24 15:25:17.000000000 +0200 +++ new/yast2-bootloader-2.18.11/src/routines/misc.ycp 2009-07-24 17:05:52.000000000 +0200 @@ -12,7 +12,7 @@ * Jiri Srain <jsrain@suse.cz> * Olaf Dabrunz <od@suse.de> * - * $Id: misc.ycp 57010 2009-04-28 14:39:07Z juhliarik $ + * $Id: misc.ycp 58153 2009-07-24 15:05:51Z juhliarik $ * * WARNING: * To be included to BootCommon.ycp only, requires function @@ -1733,6 +1733,7 @@ }); new_append = mergestring(list_new_append, " "); } + add_luks_to_initrd = false; return new_append; } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de