Author: lslezak
Date: Thu Aug 23 10:09:13 2007
New Revision: 40422
URL: http://svn.opensuse.org/viewcvs/yast?rev=40422&view=rev
Log:
- don't read/write hwcfg files, remove the old files from
previous versions (#303713)
- fixed build (FindStaticHWConfig() has been removed from
yast2-sound)
- 2.15.7
Modified:
trunk/tv/VERSION
trunk/tv/package/yast2-tv.changes
trunk/tv/src/Tv.ycp
Modified: trunk/tv/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/tv/VERSION?rev=40422&r1=40421&r2=40422&view=diff
==============================================================================
--- trunk/tv/VERSION (original)
+++ trunk/tv/VERSION Thu Aug 23 10:09:13 2007
@@ -1 +1 @@
-2.15.6
+2.15.7
Modified: trunk/tv/package/yast2-tv.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/tv/package/yast2-tv.changes?rev=40422&r1=40421&r2=40422&view=diff
==============================================================================
--- trunk/tv/package/yast2-tv.changes (original)
+++ trunk/tv/package/yast2-tv.changes Thu Aug 23 10:09:13 2007
@@ -1,4 +1,13 @@
-------------------------------------------------------------------
+Thu Aug 23 09:14:16 CEST 2007 - lslezak@suse.cz
+
+- don't read/write hwcfg files, remove the old files from
+ previous versions (#303713)
+- fixed build (FindStaticHWConfig() has been removed from
+ yast2-sound)
+- 2.15.7
+
+-------------------------------------------------------------------
Wed Jun 6 10:30:42 CEST 2007 - lslezak@suse.cz
- support for ivtv based TV cards (#130098)
Modified: trunk/tv/src/Tv.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/tv/src/Tv.ycp?rev=40422&r1=40421&r2=40422&view=diff
==============================================================================
--- trunk/tv/src/Tv.ycp (original)
+++ trunk/tv/src/Tv.ycp Thu Aug 23 10:09:13 2007
@@ -28,6 +28,7 @@
import "Package";
import "Sound";
import "WizardHW";
+ import "HWConfig";
textdomain "tv";
@@ -1604,6 +1605,54 @@
return file;
}
+
+ /**
+ * Removes all hwcfg files created by this module (they are not needed anymore)
+ */
+ define boolean RemoveHWConfigTV() {
+ boolean ret = true;
+
+ // get list of all config files
+ list<string> cfiles = HWConfig::ConfigFiles();
+ y2milestone("Found sysconfig/hardware files: %1", cfiles);
+
+ if (size(cfiles) > 0)
+ {
+ boolean changed = false;
+
+ // scan each config file - search for sound card config
+ foreach(string cfile, cfiles, {
+ string com = HWConfig::GetComment(cfile, "MODULE");
+
+ if (com != nil)
+ {
+ list<string> coms = splitstring(com, "\n");
+
+ foreach(string comline, coms, {
+ // this is a hwconfig file crated by Yast
+ // we can safely remove it
+ if (regexpmatch(comline, "^# YaST configured TV card"))
+ {
+ y2milestone("Removing file: %1", cfile);
+ ret = HWConfig::RemoveConfig(cfile) && ret;
+ changed = true;
+ }
+ }
+ );
+ }
+ });
+
+ if (changed)
+ {
+ // apply the changes
+ HWConfig::Flush();
+ }
+ }
+
+ return ret;
+ }
+
+
/**
* Write the TV settings to the SCR.
* @return boolean Was the reading successful?
@@ -1696,32 +1745,11 @@
);
}
}
-
- // remove hwcfg file
- string uniq = card["unique_key"]:"";
- string bus = busmap[uniq]:"";
-
- if (bus != nil && bus != "")
- {
- string file = "bus-" + bus;
- y2milestone("Removing hwcfg file: %1", file);
- // remove the hwcfg file
- HWConfig::RemoveConfig(file);
- }
- else
- {
- // search for static hwcfg file
- string staticconf = FindStaticHWConfig(uniq);
- if (staticconf != nil && staticconf != "")
- {
- // there is a static config file, remove it
- y2milestone("Removing hwcfg file: %1", staticconf);
- // remove the hwcfg file
- HWConfig::RemoveConfig(staticconf);
- }
- }
});
+ // remove hwcfg files (not needed anymore)
+ RemoveHWConfigTV();
+
boolean result = true;
// save the status (configured/unconfigured)
@@ -1735,9 +1763,8 @@
// no_of_the_card ----^-------^-------^
map modules_parameters = $[];
- // remember all created hwconfig files
- // $["sysconfig_name" : "card_name"]
- map