Hello community, here is the log from the commit of package yast2-sound for openSUSE:Factory checked in at 2013-11-13 14:01:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-sound (Old) and /work/SRC/openSUSE:Factory/.yast2-sound.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-sound" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-sound/yast2-sound.changes 2013-10-23 19:26:55.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-sound.new/yast2-sound.changes 2013-11-13 14:01:56.000000000 +0100 @@ -1,0 +2,14 @@ +Fri Nov 8 15:14:20 CET 2013 - [email protected] + +- Using unified API for handling Kernel modules to be loaded + on boot (bnc#838185) +- 3.1.2 + +------------------------------------------------------------------- +Wed Nov 6 14:35:50 UTC 2013 - [email protected] + +- display only 3 columns in the volume dialog to make the window + narrower (bnc#848706) +- 3.1.1 + +------------------------------------------------------------------- Old: ---- yast2-sound-3.1.0.tar.bz2 New: ---- yast2-sound-3.1.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-sound.spec ++++++ --- /var/tmp/diff_new_pack.fD5ZJ0/_old 2013-11-13 14:01:56.000000000 +0100 +++ /var/tmp/diff_new_pack.fD5ZJ0/_new 2013-11-13 14:01:56.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-sound -Version: 3.1.0 +Version: 3.1.2 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -36,10 +36,9 @@ BuildRequires: yast2-devtools >= 3.0.6 BuildRequires: yast2-testsuite -# GetInstArgs::automatic_configuration -# Wizard::SetDesktopTitleAndIcon +# Fixed handling of Kernel modules loaded on boot Requires: alsa -Requires: yast2 >= 2.21.22 +Requires: yast2 >= 3.1.3 Provides: yast2-agent-audio Provides: yast2-agent-audio-devel ++++++ yast2-sound-3.1.0.tar.bz2 -> yast2-sound-3.1.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-sound-3.1.0/CONTRIBUTING.md new/yast2-sound-3.1.2/CONTRIBUTING.md --- old/yast2-sound-3.1.0/CONTRIBUTING.md 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-sound-3.1.2/CONTRIBUTING.md 2013-11-08 16:30:47.000000000 +0100 @@ -0,0 +1,87 @@ +YaST Contribution Guidelines +============================ + +YaST is an open source project and as such it welcomes all kinds of +contributions. If you decide to contribute, please follow these guidelines to +ensure the process is effective and pleasant both for you and YaST maintainers. + +There are two main forms of contribution: reporting bugs and performing code +changes. + +Bug Reports +----------- + +If you find a problem, please report it either using +[Bugzilla](https://bugzilla.novell.com/enter_bug.cgi?format=guided&product=openSUSE+Factory&component=YaST2) +or [GitHub issues](../../issues). (For Bugzilla, use the [simplified +registration](https://secure-www.novell.com/selfreg/jsp/createSimpleAccount.jsp) +if you don't have an account yet.) + +If you find a problem, please report it either using +[Bugzilla](https://bugzilla.novell.com/) or GitHub issues. We can't guarantee +that every bug will be fixed, but we'll try. + +When creating a bug report, please follow our [bug reporting +guidelines](http://en.opensuse.org/openSUSE:Report_a_YaST_bug). + +Code Changes +------------ + +We welcome all kinds of code contributions, from simple bug fixes to significant +refactorings and implementation of new features. However, before making any +non-trivial contribution, get in touch with us first — this can prevent wasted +effort on both sides. Also, have a look at our [development +documentation](http://en.opensuse.org/openSUSE:YaST_development). + +To send us your code change, use GitHub pull requests. The workflow is as +follows: + + 1. Fork the project. + + 2. Create a topic branch based on `master`. + + 3. Implement your change, including tests (if possible). Make sure you adhere + to the [Ruby style + guide](https://github.com/SUSE/style-guides/blob/master/Ruby.md). + + 4. Make sure your change didn't break anything by building the RPM package + (`rake osc:build`). The build process includes running the full testsuite. + + 5. Publish the branch and create a pull request. + + 6. YaST developers will review your change and possibly point out issues. + Adapt the code under their guidance until they are all resolved. + + 7. Finally, the pull request will get merged or rejected. + +See also [GitHub's guide on +contributing](https://help.github.com/articles/fork-a-repo). + +If you want to do multiple unrelated changes, use separate branches and pull +requests. + +Do not change the `VERSION` and `*.changes` files as this could lead to +conflicts. + +### Commits + +Each commit in the pull request should do only one thing, which is clearly +described by its commit message. Especially avoid mixing formatting changes and +functional changes into one commit. When writing commit messages, adhere to +[widely used +conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). + +If your commit is related to a bug in Buzgilla or an issue on GitHub, make sure +you mention it in the commit message for cross-reference. Use format like +bnc#775814 or gh#yast/yast-foo#42. See also [GitHub +autolinking](https://help.github.com/articles/github-flavored-markdown#references) +and [openSUSE abbreviation +reference](http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines#Current_set_of_abbreviations). + +Additional Information +---------------------- + +If you have any question, feel free to ask at the [development mailing +list](http://lists.opensuse.org/yast-devel/) or at the +[#yast](http://webchat.freenode.net/?channels=%23yast) IRC channel on freenode. +We'll do our best to provide a timely and accurate answer. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-sound-3.1.0/VERSION new/yast2-sound-3.1.2/VERSION --- old/yast2-sound-3.1.0/VERSION 2013-10-21 11:30:10.000000000 +0200 +++ new/yast2-sound-3.1.2/VERSION 2013-11-08 16:30:47.000000000 +0100 @@ -1 +1 @@ -3.1.0 +3.1.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-sound-3.1.0/package/yast2-sound.changes new/yast2-sound-3.1.2/package/yast2-sound.changes --- old/yast2-sound-3.1.0/package/yast2-sound.changes 2013-10-21 11:30:10.000000000 +0200 +++ new/yast2-sound-3.1.2/package/yast2-sound.changes 2013-11-08 16:30:47.000000000 +0100 @@ -1,4 +1,18 @@ ------------------------------------------------------------------- +Fri Nov 8 15:14:20 CET 2013 - [email protected] + +- Using unified API for handling Kernel modules to be loaded + on boot (bnc#838185) +- 3.1.2 + +------------------------------------------------------------------- +Wed Nov 6 14:35:50 UTC 2013 - [email protected] + +- display only 3 columns in the volume dialog to make the window + narrower (bnc#848706) +- 3.1.1 + +------------------------------------------------------------------- Thu Oct 17 14:17:11 UTC 2013 - [email protected] - do not crash during sound card removal (bnc#845928) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-sound-3.1.0/package/yast2-sound.spec new/yast2-sound-3.1.2/package/yast2-sound.spec --- old/yast2-sound-3.1.0/package/yast2-sound.spec 2013-10-21 11:30:10.000000000 +0200 +++ new/yast2-sound-3.1.2/package/yast2-sound.spec 2013-11-08 16:30:47.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-sound -Version: 3.1.0 +Version: 3.1.2 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -28,9 +28,8 @@ BuildRequires: alsa-devel gcc-c++ doxygen perl-XML-Writer update-desktop-files yast2 yast2-core-devel yast2-testsuite kernel-default ruby libtool BuildRequires: yast2-devtools >= 3.0.6 -# GetInstArgs::automatic_configuration -# Wizard::SetDesktopTitleAndIcon -Requires: yast2 >= 2.21.22 +# Fixed handling of Kernel modules loaded on boot +Requires: yast2 >= 3.1.3 Requires: alsa Provides: yast2-config-sound yast2-agent-audio yast2-agent-audio-devel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-sound-3.1.0/src/include/sound/mixer.rb new/yast2-sound-3.1.2/src/include/sound/mixer.rb --- old/yast2-sound-3.1.0/src/include/sound/mixer.rb 2013-10-21 11:30:10.000000000 +0200 +++ new/yast2-sound-3.1.2/src/include/sound/mixer.rb 2013-11-08 16:30:47.000000000 +0100 @@ -187,7 +187,7 @@ widget = VBox() spec = UI.HasSpecialWidget(:Slider) nchan = Ops.subtract(Builtins.size(channels), 2) # don't count in 'Master' and 'PCM' - ncols = 4 + ncols = 3 # how many channels per column chansPerCol = Builtins.tointeger( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-sound-3.1.0/src/include/sound/write_routines.rb new/yast2-sound-3.1.2/src/include/sound/write_routines.rb --- old/yast2-sound-3.1.0/src/include/sound/write_routines.rb 2013-10-21 11:30:10.000000000 +0200 +++ new/yast2-sound-3.1.2/src/include/sound/write_routines.rb 2013-11-08 16:30:47.000000000 +0100 @@ -127,47 +127,10 @@ ret = ret && SCR.Write(mod_alias_comment, modcomment) # load the module automatically on boot - if Ops.get_string(entry, "bus", "") != "pci" && - Ops.get_string(entry, "bus", "") != "usb" && - module_name != "" + if entry["bus"] != "pci" && entry["bus"] != "usb" && !module_name.empty? Builtins.y2milestone("The soundcard is not attached to PCI or USB") - - on_boot_sysconfig = Convert.to_string( - SCR.Read(path(".sysconfig.kernel.MODULES_LOADED_ON_BOOT")) - ) - Builtins.y2milestone( - "/etc/sysconfig/kernel:MODULES_LOADED_ON_BOOT: %1", - on_boot_sysconfig - ) - - on_boot_modules = Builtins.splitstring(on_boot_sysconfig, " ") - on_boot_modules = Builtins.filter(on_boot_modules) do |mod| - mod != nil && mod != "" - end - Builtins.y2milestone("Load modules: %1", on_boot_modules) - - # add the module to sysconfig if it is missing - if !Builtins.contains(on_boot_modules, module_name) - Builtins.y2milestone( - "Adding %1 to MODULES_LOADED_ON_BOOT", - module_name - ) - if on_boot_sysconfig != "" - on_boot_sysconfig = Ops.add(on_boot_sysconfig, " ") - end - - on_boot_sysconfig = Ops.add(on_boot_sysconfig, module_name) - Builtins.y2milestone( - "New MODULES_LOADED_ON_BOOT value: %1", - on_boot_sysconfig - ) - - ret = ret && - SCR.Write( - path(".sysconfig.kernel.MODULES_LOADED_ON_BOOT"), - on_boot_sysconfig - ) - end + Kernel.AddModuleToLoad(module_name) + ret = Kernel.SaveModulesToLoad end end ret @@ -215,63 +178,15 @@ nil end - def RemovedUnusuedModulesFromSysconfig - # remove unused modules from MODULES_LOADED_ON_BOOT - on_boot_sysconfig = Convert.to_string( - SCR.Read(path(".sysconfig.kernel.MODULES_LOADED_ON_BOOT")) - ) - Builtins.y2milestone( - "/etc/sysconfig/kernel:MODULES_LOADED_ON_BOOT: %1", - on_boot_sysconfig - ) - - on_boot_modules = Builtins.splitstring(on_boot_sysconfig, " ") - on_boot_modules = Builtins.filter(on_boot_modules) do |mod| - mod != nil && mod != "" - end - Builtins.y2debug("Module list: %1", on_boot_modules) - - removed_modules = Builtins.toset(Builtins.maplist(Sound.removed_info) do |card| - Ops.get_string(card, "module", "") - end) - removed_modules = Builtins.filter(removed_modules) do |mod| - mod != nil && mod != "" + # Removes Kernel modules formerly loaded for sound cards that are being + # removed now + def RemovedUnusuedKernelModules + # TODO: Needs deeper refactoring as knowledge of the data structure should + # not be needed. + Sound.removed_info.reject{ |r| r.fetch("module", "").empty? }.each do |r| + Kernel.RemoveModuleToLoad(r["module"]) end - - modified = false - Builtins.foreach(removed_modules) do |removed_module| - # remove the module from sysconfig if it is there - if Builtins.contains(on_boot_modules, removed_module) - Builtins.y2milestone( - "Removing %1 from MODULES_LOADED_ON_BOOT", - removed_module - ) - - # remove the module - on_boot_modules = Builtins.filter(on_boot_modules) do |mod| - mod != removed_module - end - modified = true - end - end - - - # write the change - if modified - on_boot_sysconfig = Builtins.mergestring(on_boot_modules, " ") - Builtins.y2milestone( - "New MODULES_LOADED_ON_BOOT value: %1", - on_boot_sysconfig - ) - SCR.Write( - path(".sysconfig.kernel.MODULES_LOADED_ON_BOOT"), - on_boot_sysconfig - ) - else - Builtins.y2milestone("Nothing removed from MODULES_LOADED_ON_BOOT") - end - - nil + Kernel.SaveModulesToLoad end # saves modules options. this function has to collect parameters that use @@ -313,7 +228,7 @@ # must be called before SaveOneModulesEntry() # to write the module back if it is used by another configured card!! - RemovedUnusuedModulesFromSysconfig() + RemovedUnusuedKernelModules() Builtins.foreach(configured_options) do |op| if !Builtins.contains(mods, op) -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
