Hello community,
here is the log from the commit of package yast2-sound
checked in at Fri Apr 25 15:28:35 CEST 2008.
--------
--- yast2-sound/yast2-sound.changes 2008-04-14 12:56:12.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-sound/yast2-sound.changes 2008-04-25 13:18:34.269474000 +0200
@@ -1,0 +2,7 @@
+Fri Apr 25 08:54:59 CEST 2008 - lslezak@suse.cz
+
+- do not write 'index' option, write 'slots' option of 'snd' driver
+ to define the order of the configured soundcards (bnc#381695)
+- 2.16.9
+
+-------------------------------------------------------------------
Old:
----
yast2-sound-2.16.8.tar.bz2
New:
----
yast2-sound-2.16.9.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-sound.spec ++++++
--- /var/tmp/diff_new_pack.kS5261/_old 2008-04-25 15:28:20.000000000 +0200
+++ /var/tmp/diff_new_pack.kS5261/_new 2008-04-25 15:28:20.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-sound (Version 2.16.8)
+# spec file for package yast2-sound (Version 2.16.9)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,12 +12,12 @@
Name: yast2-sound
-Version: 2.16.8
+Version: 2.16.9
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-sound-2.16.8.tar.bz2
+Source0: yast2-sound-2.16.9.tar.bz2
Prefix: /usr
BuildRequires: alsa-devel doxygen gcc-c++ perl-XML-Writer update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-testsuite
# GetInstArgs::automatic_configuration
@@ -41,7 +41,7 @@
Dan Meszaros
%prep
-%setup -n yast2-sound-2.16.8
+%setup -n yast2-sound-2.16.9
%build
%{prefix}/bin/y2tool y2autoconf
@@ -86,6 +86,10 @@
/usr/share/YaST2/scrconf/*.scr
%doc %{prefix}/share/doc/packages/yast2-sound
%changelog
+* Fri Apr 25 2008 lslezak@suse.cz
+- do not write 'index' option, write 'slots' option of 'snd' driver
+ to define the order of the configured soundcards (bnc#381695)
+- 2.16.9
* Mon Apr 14 2008 lslezak@suse.cz
- updated the sound card database, added "snd-oxygen" driver to
the database
++++++ yast2-sound-2.16.8.tar.bz2 -> yast2-sound-2.16.9.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.16.8/configure new/yast2-sound-2.16.9/configure
--- old/yast2-sound-2.16.8/configure 2008-04-14 12:54:57.000000000 +0200
+++ new/yast2-sound-2.16.9/configure 2008-04-25 13:16:42.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for yast2-sound 2.16.8.
+# Generated by GNU Autoconf 2.61 for yast2-sound 2.16.9.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -728,8 +728,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-sound'
PACKAGE_TARNAME='yast2-sound'
-PACKAGE_VERSION='2.16.8'
-PACKAGE_STRING='yast2-sound 2.16.8'
+PACKAGE_VERSION='2.16.9'
+PACKAGE_STRING='yast2-sound 2.16.9'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1438,7 +1438,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-sound 2.16.8 to adapt to many kinds of systems.
+\`configure' configures yast2-sound 2.16.9 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1509,7 +1509,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-sound 2.16.8:";;
+ short | recursive ) echo "Configuration of yast2-sound 2.16.9:";;
esac
cat <<\_ACEOF
@@ -1618,7 +1618,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-sound configure 2.16.8
+yast2-sound configure 2.16.9
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1632,7 +1632,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-sound $as_me 2.16.8, which was
+It was created by yast2-sound $as_me 2.16.9, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2453,7 +2453,7 @@
# Define the identity of the package.
PACKAGE='yast2-sound'
- VERSION='2.16.8'
+ VERSION='2.16.9'
cat >>confdefs.h <<_ACEOF
@@ -2681,7 +2681,7 @@
-VERSION="2.16.8"
+VERSION="2.16.9"
RPMNAME="yast2-sound"
MAINTAINER="Ladislav Slezak "
@@ -21273,7 +21273,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-sound $as_me 2.16.8, which was
+This file was extended by yast2-sound $as_me 2.16.9, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21326,7 +21326,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-sound config.status 2.16.8
+yast2-sound config.status 2.16.9
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.16.8/configure.in new/yast2-sound-2.16.9/configure.in
--- old/yast2-sound-2.16.8/configure.in 2008-04-14 12:54:47.000000000 +0200
+++ new/yast2-sound-2.16.9/configure.in 2008-04-25 13:16:31.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.16.8 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-sound, 2.16.8, http://bugs.opensuse.org/, yast2-sound)
+AC_INIT(yast2-sound, 2.16.9, http://bugs.opensuse.org/, yast2-sound)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.16.8"
+VERSION="2.16.9"
RPMNAME="yast2-sound"
MAINTAINER="Ladislav Slezak "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.16.8/data/alsa_packages.ycp new/yast2-sound-2.16.9/data/alsa_packages.ycp
--- old/yast2-sound-2.16.8/data/alsa_packages.ycp 2007-10-12 10:14:19.000000000 +0200
+++ new/yast2-sound-2.16.9/data/alsa_packages.ycp 2008-04-18 09:47:48.000000000 +0200
@@ -3,6 +3,11 @@
// This is a mapping for required packages
// some devices need a firmware or a special tool to work properly
+/***************************************************
+* NOTE: DO NOT FORGET TO EDIT extra-packages file
+* to ensure the packages are on the medium!!
+***************************************************/
+
{
return
$[
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.16.8/sound/src/read_routines.ycp new/yast2-sound-2.16.9/sound/src/read_routines.ycp
--- old/yast2-sound-2.16.8/sound/src/read_routines.ycp 2007-10-12 11:39:17.000000000 +0200
+++ new/yast2-sound-2.16.9/sound/src/read_routines.ycp 2008-04-25 13:13:15.000000000 +0200
@@ -11,7 +11,7 @@
* Authors:
* Dan Meszaros
*
- * $Id: read_routines.ycp 38317 2007-06-06 13:59:58Z lslezak $
+ * $Id: read_routines.ycp 47064 2008-04-25 11:13:14Z lslezak $
*
*/
@@ -19,6 +19,7 @@
import "Sound";
import "HWConfig";
import "Confirm";
+ import "String";
include "sound/routines.ycp";// for is_snd_alias()
@@ -80,6 +81,64 @@
return result;
}
+ // sort module aliases according to snd slots option
+ list<string> sort_aliases(path config_path, path alias_path, list<string> aliases)
+ {
+ // read 'snd' options
+ map snd_opts = (map)SCR::Read(add(config_path, "snd"));
+ y2milestone("snd optionss: %1", snd_opts);
+
+ list<string> slots_option = splitstring(snd_opts["slots"]:"", ",");
+ slots_option = maplist(string slotopt, slots_option,
+ {
+ return String::CutBlanks(slotopt);
+ }
+ );
+
+ // alias -> driver mapping
+ map alias_mapping = $[];
+
+ // read aliases
+ foreach(string a, aliases,
+ {
+ y2milestone("Reading alias %1", a);
+ string modname = (string)SCR::Read(add(alias_path, a));
+ alias_mapping = add(alias_mapping, a, modname);
+ }
+ );
+
+ // driver -> [ aliases ]
+ map driver_mapping = $[];
+
+ // create a reverse mapping
+ foreach(string alias, string driver, alias_mapping,
+ {
+ list<string> a_list = driver_mapping[driver]:[];
+ a_list = add(a_list, alias);
+
+ driver_mapping[driver] = a_list;
+ }
+ );
+
+ y2milestone("Driver mapping: %1", driver_mapping);
+
+ list<string> sorted_aliases = [];
+
+ // sort aliases
+ foreach(string slot, slots_option,
+ {
+ list<string> aliases = driver_mapping[slot]:[];
+
+ sorted_aliases = add(sorted_aliases, aliases[0]:"");
+
+ aliases = remove(aliases, 0);
+ driver_mapping[slot] = aliases;
+ }
+ );
+
+ return sorted_aliases;
+ }
+
/**
* reads already saved info from given file
@@ -126,9 +185,15 @@
det_cards = (list<map>)SCR::Read(.probe.sound);
}
- y2debug("Detected cards: %1", det_cards);
+ y2milestone("Detected cards: %1", det_cards);
+
+ // sort the aliases according to the slots option
+ aliases = sort_aliases(mod_options, mod_alias, aliases);
+
+ y2milestone("Sorted aliases acording to slots: %1", aliases);
foreach (string a, aliases, ``{
+ y2milestone("Reading alias %1", a);
position = position + 1;
string modname = (string) SCR::Read (add (mod_alias, a));
@@ -166,6 +231,9 @@
model = read_card_name_from_alsa (position);
}
+ // add index option
+ options["index"] = tostring(position);
+
map entry = $[
"alias" : a,
"module" : modname,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.16.8/sound/src/routines.ycp new/yast2-sound-2.16.9/sound/src/routines.ycp
--- old/yast2-sound-2.16.8/sound/src/routines.ycp 2008-04-09 10:00:37.000000000 +0200
+++ new/yast2-sound-2.16.9/sound/src/routines.ycp 2008-04-25 13:13:15.000000000 +0200
@@ -12,7 +12,7 @@
* Dan Vesely
* Dan Meszaros
*
- * $Id: routines.ycp 46266 2008-04-09 08:00:37Z lslezak $
+ * $Id: routines.ycp 47064 2008-04-25 11:13:14Z lslezak $
*
*/
@@ -258,15 +258,11 @@
entry = add(entry, "options", opts);
return entry;
}
- // check existence of 'common' parameters: 'enable' and 'index'
+ // check existence of 'common' parameters: 'index'
string modname = entry["module"]:"";
foreach (string key, string value, (map) SCR::Read (
topath (sformat(".modinfo.kernel.drivers.sound.%1", modname))), ``{
- if (key == "enable")
- {
- opts [key] = "1";
- }
if (key == "index")
{
opts [key] = sformat ("%1",card_id);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.16.8/sound/src/Sound.ycp new/yast2-sound-2.16.9/sound/src/Sound.ycp
--- old/yast2-sound-2.16.8/sound/src/Sound.ycp 2008-01-08 16:02:21.000000000 +0100
+++ new/yast2-sound-2.16.9/sound/src/Sound.ycp 2008-04-25 13:13:15.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Sound data
* Authors: Ladislav Slezak
*
- * $Id: Sound.ycp 43324 2008-01-08 15:02:20Z lslezak $
+ * $Id: Sound.ycp 47064 2008-04-25 11:13:14Z lslezak $
*/
{
@@ -630,11 +630,6 @@
map sound_db =$[];
if (db_cards == nil || db_cards == $[])
{
- if (use_ui)
- {
- string message = _("Loading the sound card database...");
- UI::OpenDialog(`opt(`decorated), `Label(message));
- }
textdomain "sound_db";
y2debug("Reading card database");
sound_db = (map)eval(SCR::Read (.target.yast2, "sndcards.ycp"));
@@ -647,10 +642,6 @@
db_vendors = sound_db ["vendors"]:$[];
textdomain "sound";
- if (use_ui)
- {
- UI::CloseDialog();
- }
}
}
@@ -1115,8 +1106,8 @@
y2debug("only_default: %1", only_default);
- // don't add the default options, but always add 'index' and 'enable'
- if (!only_default || opname == "index" || opname == "enable")
+ // don't add the default options
+ if (!only_default || opname == "index")
{
res = add (res, opname, value);
}
@@ -1137,6 +1128,10 @@
list mods = toset (maplist (map e, modules_conf,``(e["module"]:"off")));
maplist (string modname, (list<string>) mods, ``{
map opts = CollectOptions(modname);
+
+ // ignore "index" options
+ opts = remove(opts, "index");
+
string optstr = "";
maplist(string k, string v, (map) opts, ``{
optstr = optstr+ sformat(" %1=%2", k, v);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.16.8/sound/src/write_routines.ycp new/yast2-sound-2.16.9/sound/src/write_routines.ycp
--- old/yast2-sound-2.16.8/sound/src/write_routines.ycp 2007-08-14 16:32:11.000000000 +0200
+++ new/yast2-sound-2.16.9/sound/src/write_routines.ycp 2008-04-25 13:13:15.000000000 +0200
@@ -1,6 +1,6 @@
/**
*
- * $Id: write_routines.ycp 40259 2007-08-14 14:32:11Z lslezak $
+ * $Id: write_routines.ycp 47064 2008-04-25 11:13:14Z lslezak $
*
* File:
* write_routines.ycp
@@ -100,6 +100,42 @@
return ret;
}
+ // write 'option snd slots=' to the config
+ void WriteSlotsOption(map slots)
+ {
+ // get the indices
+ list<integer> keys = [];
+
+ foreach(integer key, string val, slots,
+ {
+ keys = add(keys, key);
+ }
+ );
+
+ keys = sort(keys);
+
+ y2milestone("Sorted keys: %1", keys);
+
+ list<string> drivers = [];
+
+ foreach(integer k, keys,
+ {
+ string drv = slots[k]:"";
+
+ if (drv != "")
+ {
+ drivers = add(drivers, drv);
+ }
+ }
+ );
+
+ string slot_option = mergestring(drivers, ",");
+ y2milestone("Writing slots option: %1", slot_option);
+
+ // write 'snd' options
+ SCR::Write( add(.modprobe_sound.options, "snd"), $[ "slots" : slot_option ]);
+ }
+
/**
* saves modules options. this function has to collect parameters that use
* different cards that use single module and create a coma separated list of values
@@ -138,10 +174,41 @@
}
);
+ map slots = $[];
+
foreach(string modname, mods, ``{
map res = Sound::CollectOptions(modname);
+
+ // remove "index" option, do not write it
+ string index = res["index"]:"";
+ res = remove(res, "index");
+
+ // remove old "enable" option if it's present
+ res = remove(res, "enable");
+
+ list<string> indices = splitstring(index, ",");
+
+ foreach(string idx, indices,
+ {
+ integer i = tointeger(idx);
+
+ if (i != nil && i >= 0)
+ {
+ y2debug("adding %1 : %2", i, modname);
+ slots = add(slots, i, modname);
+ }
+ }
+ );
+
+ // at first remove the current options (writing empty options leaves the old options untouched)
+ SCR::Write( add (mod_options, modname ), nil);
+
SCR::Write( add (mod_options, modname ), res);
});
+
+ y2milestone("Collected slots: %1", slots);
+
+ WriteSlotsOption(slots);
}
/**
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.16.8/VERSION new/yast2-sound-2.16.9/VERSION
--- old/yast2-sound-2.16.8/VERSION 2008-04-14 12:47:23.000000000 +0200
+++ new/yast2-sound-2.16.9/VERSION 2008-04-25 13:09:47.000000000 +0200
@@ -1 +1 @@
-2.16.8
+2.16.9
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org