Mailinglist Archive: yast-commit (518 mails)

< Previous Next >
[yast-commit] r56613 - in /branches/tmp/SLE-11-SP1-Stash/tv: ./ package/yast2-tv.changes src/Tv.ycp
  • From: lslezak@xxxxxxxxxxxxxxxx
  • Date: Fri, 03 Apr 2009 10:48:36 -0000
  • Message-id: <E1Lpgwu-0002qu-Rl@xxxxxxxxxxxxxxxx>
Author: lslezak
Date: Fri Apr 3 12:48:36 2009
New Revision: 56613

URL: http://svn.opensuse.org/viewcvs/yast?rev=56613&view=rev
Log:
- Do not try installing unavailable packages (TV applications)
(bnc #480179)

Modified:
branches/tmp/SLE-11-SP1-Stash/tv/ (props changed)
branches/tmp/SLE-11-SP1-Stash/tv/package/yast2-tv.changes
branches/tmp/SLE-11-SP1-Stash/tv/src/Tv.ycp

Modified: branches/tmp/SLE-11-SP1-Stash/tv/package/yast2-tv.changes
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/SLE-11-SP1-Stash/tv/package/yast2-tv.changes?rev=56613&r1=56612&r2=56613&view=diff
==============================================================================
--- branches/tmp/SLE-11-SP1-Stash/tv/package/yast2-tv.changes (original)
+++ branches/tmp/SLE-11-SP1-Stash/tv/package/yast2-tv.changes Fri Apr 3
12:48:36 2009
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Fri Apr 3 10:02:21 CEST 2009 - lslezak@xxxxxxx
+
+- Do not try installing unavailable packages (TV applications)
+ (bnc #480179)
+
+-------------------------------------------------------------------
Mon Dec 15 15:57:10 CET 2008 - lslezak@xxxxxxx

- reload the driver to activate the changed module options

Modified: branches/tmp/SLE-11-SP1-Stash/tv/src/Tv.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/SLE-11-SP1-Stash/tv/src/Tv.ycp?rev=56613&r1=56612&r2=56613&view=diff
==============================================================================
--- branches/tmp/SLE-11-SP1-Stash/tv/src/Tv.ycp (original)
+++ branches/tmp/SLE-11-SP1-Stash/tv/src/Tv.ycp Fri Apr 3 12:48:36 2009
@@ -297,7 +297,7 @@
* @param apps list of applications to install
* @param text text to show in dialog
*/
- define void InstallApplication (list apps, string text) ``{
+ define void InstallApplication (list<string> apps, string text) ``{

UI::OpenDialog (`opt(`decorated), `VBox(
`HSpacing(50),
@@ -321,13 +321,7 @@
UI::CloseDialog();
if (ret == `ok)
{
- list<string> to_install = [];
- // check if packages are avialable...
- foreach (string app, (list<string>) apps, ``{
- if (Package::Available (app))
- to_install = add (to_install, app);
- });
- Package::InstallAll (to_install);
+ Package::InstallAll (apps);
}
}

@@ -3590,35 +3584,48 @@

y2milestone("Detected TV card: %1, Radio card: %2", tv, radio);

- if (Package::Installed ("gnome-panel"))
- tv_app = "motv";
- else if (Package::Installed("kdelibs3") ||
Package::Installed("kdelibs4"))
- tv_app = "kdetv";
-
- boolean tv_app_installed = Package::Installed (tv_app);
- boolean radio_app_installed = Package::Installed ("kradio");
- list<string> apps = [ tv_app ];
+ list<string> apps = [ ];
+ boolean kde = Package::Installed("kdelibs3") ||
Package::Installed("kdelibs4");

- if (!Package::Installed("alevt"))
+ if (tv)
{
- apps = add(apps, "alevt");
+ if (Package::Installed ("gnome-panel"))
+ tv_app = "motv";
+ else if (kde)
+ {
+ tv_app = "kdetv";
+ }
+
+ if (!Package::Installed(tv_app) && Package::Available(tv_app)
== true)
+ {
+ apps = add(apps, tv_app);
+ }
+
+ if (!Package::Installed("alevt") && Package::Available("alevt")
== true)
+ {
+ apps = add(apps, "alevt");
+ }
+
+ if (!Package::Installed("nxtvepg") &&
Package::Available("nxtvepg") == true)
+ {
+ apps = add(apps, "nxtvepg");
+ }
+
+ y2milestone("TV packages to install: %1", apps);
}

- if (!Package::Installed("nxtvepg"))
+ if (radio && kde && !Package::Installed("kradio") &&
Package::Available("kradio") == true)
{
- apps = add(apps, "nxtvepg");
+ y2milestone("Adding kradio to the package list");
+ apps = add(apps, "kradio");
}

- y2milestone("TV application: %1, installed: %2", tv_app,
tv_app_installed);
- y2milestone("Radio applications installed: %1",
radio_app_installed);
- y2milestone("Applications to install: %1", apps);
+ y2milestone("Packages to install: %1", apps);

- // do not propose kradio application if we have not KDE
- if (radio && tv && !tv_app_installed && !radio_app_installed &&
- tv_app == "kdetv")
+ // installing radio and TV applications
+ if (contains(apps, "kradio") && size(apps) > 1)
{
// Popup text (required application are %1):
- apps = add (apps, "kradio");
InstallApplication (apps, sformat(_("<p>To enable you to watch
TV and listen to radio on your computer,<br>
these packages should be installed:<br>
<b>%1</b><br>
@@ -3626,7 +3633,8 @@
</p>
"), mergestring (apps, ", ")));
}
- else if (tv && !tv_app_installed)
+ // installing only TV applications
+ else if (!contains(apps, "kradio") && size(apps) > 0)
{
// Popup text (required application are %1):
InstallApplication (apps, sformat(_("<p>To enable you to watch
TV on your computer,<br>
@@ -3636,7 +3644,8 @@
</p>
"), mergestring (apps, ", ")));
}
- else if (radio && !radio_app_installed && tv_app == "kdetv")
+ // installing only radio application
+ else if (apps == ["kradio"])
{
// Popup text (required application is %1):
InstallApplication (["kradio"], sformat (_("<p>To listen to
radio on your computer, you can use the <b>%1</b> application.

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

< Previous Next >
This Thread
  • No further messages