Mailinglist Archive: opensuse-commit (2092 mails)

< Previous Next >
commit yast2-sound
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Wed, 15 Aug 2007 20:41:44 +0200
  • Message-id: <20070815184144.F0AD0678180@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package yast2-sound
checked in at Wed Aug 15 20:41:44 CEST 2007.

--------
--- yast2-sound/yast2-sound.changes     2007-07-31 09:33:57.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-sound/yast2-sound.changes        2007-08-14 16:36:58.616259000 +0200
@@ -1,0 +2,8 @@
+Tue Aug 14 16:24:54 CEST 2007 - lslezak@xxxxxxx
+
+- don't read/write hwcfg files (#290430)
+- updated .rnc schema file (#253614)
+- updated sound card DB
+- 2.15.10
+
+-------------------------------------------------------------------

Old:
----
  yast2-sound-2.15.9.tar.bz2

New:
----
  yast2-sound-2.15.10.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-sound.spec ++++++
--- /var/tmp/diff_new_pack.Ka5495/_old  2007-08-15 20:41:32.000000000 +0200
+++ /var/tmp/diff_new_pack.Ka5495/_new  2007-08-15 20:41:32.000000000 +0200
@@ -1,5 +1,5 @@
 #
-# spec file for package yast2-sound (Version 2.15.9)
+# spec file for package yast2-sound (Version 2.15.10)
 #
 # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
 # This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
 # norootforbuild
 
 Name:           yast2-sound
-Version:        2.15.9
+Version:        2.15.10
 Release:        1
 License:        GPL v2 or later
 Group:          System/YaST
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-Source0:        yast2-sound-2.15.9.tar.bz2
+Source0:        yast2-sound-2.15.10.tar.bz2
 prefix:                /usr
 BuildRequires:  alsa-devel doxygen gcc-c++ perl-XML-Writer update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-testsuite
 Requires:       yast2 alsa
@@ -38,7 +38,7 @@
     Dan Meszaros
 
 %prep
-%setup -n yast2-sound-2.15.9
+%setup -n yast2-sound-2.15.10
 
 %build
 %{prefix}/bin/y2tool y2autoconf
@@ -83,6 +83,11 @@
 %doc %{prefix}/share/doc/packages/yast2-sound
 
 %changelog
+* Tue Aug 14 2007 - lslezak@xxxxxxx
+- don't read/write hwcfg files (#290430)
+- updated .rnc schema file (#253614)
+- updated sound card DB
+- 2.15.10
 * Tue Jul 31 2007 - lslezak@xxxxxxx
 - use 'Apple PowerPC' for all PowerPC models (#295616)
 - updated sound card DB

++++++ yast2-sound-2.15.9.tar.bz2 -> yast2-sound-2.15.10.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.15.9/data/sndcards.ycp new/yast2-sound-2.15.10/data/sndcards.ycp
--- old/yast2-sound-2.15.9/data/sndcards.ycp    2007-07-31 09:26:58.000000000 +0200
+++ new/yast2-sound-2.15.10/data/sndcards.ycp   2007-08-14 15:25:27.000000000 +0200
@@ -1,4 +1,4 @@
-/* this file is automatically generated for kernel version 2.6.22.1-6-default*/
+/* this file is automatically generated for kernel version 2.6.22.1-16-bigsmp*/
 
 {
 textdomain "sound_db";
@@ -543,7 +543,7 @@
       29057 : 0
     ],
     1174 : $[
-      21770 : 41,
+      21770 : 40,
       22015 : 41
     ],
     1427 : $[
@@ -844,8 +844,8 @@
       8704 : 48
     ],
     15892 : $[
-      2340 : 50,
-      2341 : 50,
+      2340 : 49,
+      2341 : 49,
       2353 : 51
     ],
     16389 : $[
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.15.9/sound/config/sound.rnc new/yast2-sound-2.15.10/sound/config/sound.rnc
--- old/yast2-sound-2.15.9/sound/config/sound.rnc       2007-05-18 12:48:55.000000000 +0200
+++ new/yast2-sound-2.15.10/sound/config/sound.rnc      2007-08-14 15:48:38.000000000 +0200
@@ -3,36 +3,55 @@
 namespace config = "http://www.suse.com/1.0/configns";
 
 LOAD_ALSA_SEQ = element LOAD_ALSA_SEQ { text }
-sound =
-  element sound {
-    element configure_detected { BOOLEAN }? &
-    element rc_vars { LOAD_ALSA_SEQ* }? &
-    element autoinstall { BOOLEAN }? &
-    modules_conf? & volume_settings?
-  }
 module_conf =
   element module_conf {
-      element alias      { text }? &
-      element model      { text }? &
-      element module     { text }? &
-      element unique_key { text }? &
-      element options    { Anything }?
+      element alias         { text }? &
+      element model         { text }? &
+      element module        { text }? &
+      element options       { Anything* }? &
+      element unique_key    { text }? &
+      element bus           { text }? &
+      element device_id     { INTEGER }? &
+      element hwcfg         { text }? &
+      element sub_device_id { INTEGER }? &
+      element sub_vendor_id { INTEGER }? &
+      element vendor_id     { INTEGER }?
   }
 modules_conf =
   element modules_conf {
     module_conf*
   }
+new =
+  element new {
+    text
+  }
 
+rc_vars = element rc_vars { LOAD_ALSA_SEQ* }
+snd_enable = element snd_enable { text }
+snd_index = element snd_index { text }
+sound =
+  element sound {
+    configure_detected? & modules_conf? & rc_vars? & volume_settings?
+  }
+state = element state { text }
 unique_key = element unique_key { text }
+unknown-state = element unknown-state { text }
+volume_component_settings =
+  element volume_component_settings {
+    attribute config:type { text }?,
+    text
+  }
+volume_entry =
+  element volume_entry {
+    Anything*
+  }
 volume_settings =
   element volume_settings {
-    LIST,
-    element volume_entry {
-        LIST,
-        element volume_component {
-            element mute   { BOOLEAN }? &
-            element name   { text }? &
-            element volume { INTEGER }?
-        }*
-    }*
+    volume_entry*
   }
+configure_detected =
+  element configure_detected { BOOLEAN }
+enable = element enable { text }
+index = element index { text }
+isapnp = element isapnp { text }
+joystick = element joystick { text }
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.15.9/sound/src/sound.desktop new/yast2-sound-2.15.10/sound/src/sound.desktop
--- old/yast2-sound-2.15.9/sound/src/sound.desktop      2007-05-30 15:21:41.000000000 +0200
+++ new/yast2-sound-2.15.10/sound/src/sound.desktop     2007-08-14 15:50:43.000000000 +0200
@@ -15,6 +15,7 @@
 X-SuSE-YaST-Geometry=
 X-SuSE-YaST-SortKey=
 X-SuSE-YaST-AutoInstClonable=true
+X-SuSE-YaST-AutoInstSchema=sound.rnc
 
 Icon=yast-sound
 Exec=/sbin/yast2 sound
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.15.9/sound/src/Sound.ycp new/yast2-sound-2.15.10/sound/src/Sound.ycp
--- old/yast2-sound-2.15.9/sound/src/Sound.ycp  2007-07-31 09:22:33.000000000 +0200
+++ new/yast2-sound-2.15.10/sound/src/Sound.ycp 2007-08-14 16:32:11.000000000 +0200
@@ -4,7 +4,7 @@
  * Summary:    Sound data
  * Authors:    Ladislav Slezak <lslezak@xxxxxxx>
  *
- * $Id: Sound.ycp 37113 2007-03-26 11:24:56Z lslezak $
+ * $Id: Sound.ycp 40259 2007-08-14 14:32:11Z lslezak $
  */
 
 {
@@ -513,8 +513,8 @@
      * @return void
      */
     global define void ReadModulesConf() ``{
-       modules_conf = read_hwconfig();
-       y2milestone("read_hwconfig: %1", modules_conf);
+       modules_conf = read_save_info();
+       y2milestone("read_save_info: %1", modules_conf);
     }
 
 
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.15.9/sound/src/write_routines.ycp new/yast2-sound-2.15.10/sound/src/write_routines.ycp
--- old/yast2-sound-2.15.9/sound/src/write_routines.ycp 2007-07-31 09:22:33.000000000 +0200
+++ new/yast2-sound-2.15.10/sound/src/write_routines.ycp        2007-08-14 16:32:11.000000000 +0200
@@ -1,6 +1,6 @@
 /**
  *
- * $Id: write_routines.ycp 38317 2007-06-06 13:59:58Z lslezak $
+ * $Id: write_routines.ycp 40259 2007-08-14 14:32:11Z lslezak $
  *
  * File:
  *   write_routines.ycp
@@ -38,68 +38,6 @@
        return comment;
     }
 
-    define string MergeOptions(map<string,string> options) {
-       string ret = "";
-
-       if (options != nil && size(options) > 0)
-       {
-           foreach(string key, string val, options, {
-                   if (key != nil && key != "" && val != nil)
-                   {
-                       if (ret == "")
-                       {
-                           ret = key + "=" + val;
-                       }
-                       else
-                       {
-                           ret = ret + " " + key + "=" + val;
-                       }
-                   }
-               }
-           );
-       }
-
-       return ret;
-    }
-
-    // search hwcfg-static file with required string in comment of MODULE variable
-    define string FindStaticHWConfig(string uniq) {
-       string file = nil;
-
-       // get all static configurations
-       list<string> configs = HWConfig::ConfigFiles();
-       configs = filter(string f, configs, {return regexpmatch(f, "^static-[0-9]*");});
-
-       // search existing config file
-       if (size(configs) > 0)
-       {
-           integer greatest = -1;
-           boolean found = false;
-
-           // search existing config
-           foreach(string f, configs, {
-                   if (!found)
-                   {
-                       // read MODULE comment
-                       string comment = HWConfig::GetComment(f, "MODULE");
-
-                       if (comment != nil && comment != "")
-                       {
-                           // search for sound alias and uniqID
-                           if (regexpmatch(comment, uniq))
-                           {
-                               file = f;
-                               found = true;
-                           }
-                       }
-                   }
-               }
-           );
-       }
-
-       return file;
-    }
-
     define string tounprefixedhexstring(integer i) {
        if (i == nil)
        {
@@ -135,41 +73,12 @@
            SCR::Execute(.target.bash, rm);
        }
 
-       // save hwcfg config file
-       string file = "";
-       if (entry["bus"]:"" != "pci")
-       {
-           y2milestone("The soundcard is not attached to PCI");
-
-           file = "static-sound-" + entry["options","index"]:"0";
-       }
-       else
-       {
-           file = sformat("vpid-%1-%2", tounprefixedhexstring(entry["vendor_id"]:0), tounprefixedhexstring(entry["device_id"]:0));
-
-           if (haskey(entry, "sub_vendor_id") && haskey(entry, "sub_device_id"))
-           {
-               file = file + sformat("-%1-%2", tounprefixedhexstring(entry["sub_vendor_id"]:0), tounprefixedhexstring(entry["sub_device_id"]:0));
-           }
-       }
-
-       y2milestone("using hwcfg file: hwcfg-%1", file);
-
         boolean ret = true;
         if (haskey (entry, "alias"))
         {
-           // set module name
-           ret = ret && HWConfig::SetValue(file, "MODULE", entry["module"]:"");
-           // set automatic start at boot
-           ret = ret && HWConfig::SetValue(file, "STARTMODE", "auto");
-
            // this is a hack for snd-aoa driver, additional modules are needed (#217300)
            if (entry["module"]:"" == "snd-aoa")
            {
-               // write the extra module to hwconfig file
-               ret = ret && HWConfig::SetValue(file, "MODULE_EXTRA", "snd-aoa-i2sbus");
-               ret = ret && HWConfig::SetValue(file, "MODULE_EXTRA2", "snd-aoa-fabric-layout");
-
                // write the extra module (snd-aoa-i2sbus) to /etc/init.d/sound, add "00" suffix to the alias
                path extra_alias = add(.modprobe_sound.alias, (entry["alias"]:"off") + "00");
                ret = ret && SCR::Write(extra_alias, "snd-aoa-i2sbus");
@@ -183,11 +92,7 @@
                ret = ret && SCR::Write(extra_alias2 + "comment", "# Extra driver for sound card:\n" + extra_comment);
            }
 
-           HWConfig::Flush();
-
            string modcomment = createAliasComment(entry["model"]: "", entry["unique_key"]:"");
-           string comment = "# YaST configured sound card " + entry["alias"]:"" + "\n" + modcomment;
-           ret = ret && HWConfig::SetComment(file, "MODULE", comment);
 
             ret = ret && SCR::Write(mod_alias, entry["module"]:"off");
            ret = ret && SCR::Write(mod_alias_comment, modcomment);
@@ -294,27 +199,36 @@
     define boolean RemoveHWConfig() {
        boolean ret = true;
 
-       y2milestone("Sound::removed_info: %1", Sound::removed_info);
+       // get list of all config files
+       list<string> cfiles = HWConfig::ConfigFiles();
+       y2milestone("Found sysconfig/hardware files: %1", cfiles);
+
+       // scan each config file - search for sound card config
+       foreach(string cfile, cfiles, {
+           string com = HWConfig::GetComment(cfile, "MODULE");
 
-       if (Sound::removed_info != nil)
-       {
-           foreach(map info, Sound::removed_info, {
-                   string file = info["hwcfg"]:"";
-
-                   if (file != "")
-                   {
-                       y2milestone("Removing file: %1", file);
-                       ret = ret && HWConfig::RemoveConfig(file);
-                   }
-                   else
-                   {
-                       y2warning("Missing hwcfg entry in: %1", info);
+           if (com != nil)
+           {
+               list<string> coms = splitstring(com, "\n");
+               boolean sound_card_found = false;
+               map entry = $[];
+
+               foreach(string comline, coms, {
+
+                       // this is a hwconfig file crated by Yast
+                       // we can safely remove it
+                       if (regexpmatch(comline, "^# YaST configured sound card snd-card-[0-9]*"))
+                       {
+                           y2milestone("Removing file: %1", cfile);
+                           ret = ret && HWConfig::RemoveConfig(cfile);
+                       }
                    }
-               }
-           );
+               );
+
+               HWConfig::Flush();
+           }
+       });
 
-           HWConfig::Flush();
-       }
        return ret;
     }
 
@@ -342,7 +256,7 @@
        // remove old entries
        removeOldEntries (als);
 
-       // remove deleted sound cards
+       // remove old hwconfig files
        RemoveHWConfig();
 
        if (size(save_info) >0)
@@ -365,9 +279,6 @@
             return $["return": false, "err_msg": err_msg];
         }
 
-       // write the settings
-       HWConfig::Flush();
-
        /* also this is not neccessary now... (?)
        if (size(save_info) > 0 && Sound::use_alsa)
        {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.15.9/VERSION new/yast2-sound-2.15.10/VERSION
--- old/yast2-sound-2.15.9/VERSION      2007-07-31 08:07:46.000000000 +0200
+++ new/yast2-sound-2.15.10/VERSION     2007-08-14 16:24:49.000000000 +0200
@@ -1 +1 @@
-2.15.9
+2.15.10


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread