Author: locilka
Date: Thu May 15 16:24:04 2008
New Revision: 47587
URL: http://svn.opensuse.org/viewcvs/yast?rev=47587&view=rev
Log:
- Using functions for adding repositories exported by the
yast2-packager to unify the offered types of repositories
(bnc #368207).
- Updated RPM dependencies.
- 2.16.5
Modified:
trunk/add-on/VERSION
trunk/add-on/package/yast2-add-on.changes
trunk/add-on/src/add-on-workflow.ycp
trunk/add-on/yast2-add-on.spec.in
Modified: trunk/add-on/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on/VERSION?rev=47587&r1=47586&r2=47587&view=diff
==============================================================================
--- trunk/add-on/VERSION (original)
+++ trunk/add-on/VERSION Thu May 15 16:24:04 2008
@@ -1 +1 @@
-2.16.4
+2.16.5
Modified: trunk/add-on/package/yast2-add-on.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on/package/yast2-add-on.changes?rev=47587&r1=47586&r2=47587&view=diff
==============================================================================
--- trunk/add-on/package/yast2-add-on.changes (original)
+++ trunk/add-on/package/yast2-add-on.changes Thu May 15 16:24:04 2008
@@ -1,4 +1,13 @@
-------------------------------------------------------------------
+Thu May 15 16:20:48 CEST 2008 - locilka@suse.cz
+
+- Using functions for adding repositories exported by the
+ yast2-packager to unify the offered types of repositories
+ (bnc #368207).
+- Updated RPM dependencies.
+- 2.16.5
+
+-------------------------------------------------------------------
Wed May 14 11:15:45 CEST 2008 - ug@suse.de
- ask for add-on source when ask_on_error is set
Modified: trunk/add-on/src/add-on-workflow.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on/src/add-on-workflow.ycp?rev=47587&r1=47586&r2=47587&view=diff
==============================================================================
--- trunk/add-on/src/add-on-workflow.ycp (original)
+++ trunk/add-on/src/add-on-workflow.ycp Thu May 15 16:24:04 2008
@@ -35,6 +35,7 @@
import "PackageCallbacks";
include "packager/inst_source_dialogs.ycp";
+include "packager/repositories_include.ycp";
include "add-on/misc.ycp";
boolean going_back_in_workflow = GetInstArgs::going_back();
@@ -87,97 +88,6 @@
}
/**
- * Creates dialog content for MediaSelect
- */
-void CreateMediaSelectDialog () {
- term contents = `HBox (`HStretch (), `VBox (
- `RadioButtonGroup (`id (`type), `VBox (
- `VStretch (),
- // radio button
- `Left (`RadioButton(`id(`slp), `opt(`notify), _("&Scan Using SLP..."))),
- // radio button
- `Left (`RadioButton(`id(`ftp), `opt(`notify), _("&FTP..."))),
- // radio button
- `Left (`RadioButton(`id(`http), `opt(`notify), _("&HTTP..."))),
- // radio button
- `Left (`RadioButton(`id(`https), `opt(`notify), _("HTT&PS..."))),
- // radio button
- `Left (`RadioButton(`id(`samba), `opt(`notify), _("&SMB/CIFS"))),
- // radio button
- `Left (`RadioButton(`id(`nfs), `opt(`notify), _("&NFS..."))),
- // radio button
- `Left (`RadioButton(`id(`cd), `opt(`notify), _("&CD..."))),
- // radio button
- `Left (`RadioButton(`id(`dvd), `opt(`notify), _("&DVD..."))),
- // radio button
- `Left (`RadioButton(`id(`local_dir), `opt(`notify), _("&Local Directory..."))),
- // radio button
- `Left (`RadioButton (`id (`specify_url), `opt(`notify), _("Specify &URL..."))),
- `VStretch ()
- ))), `HStretch ()
- );
- if (! IsAnyNetworkAvailable()) {
- y2milestone ("Network is not available, skipping all Network-related options...");
-
- contents = `HBox (`HStretch (), `VBox (
- `RadioButtonGroup (`id (`type), `VBox (
- `VStretch (),
- // radio button
- `Left (`RadioButton(`id(`cd), `opt(`notify), _("&CD..."))),
- // radio button
- `Left (`RadioButton(`id(`dvd), `opt(`notify), _("&DVD..."))),
- // radio button
- `Left (`RadioButton(`id(`local_dir), `opt(`notify), _("&Local Directory..."))),
- // radio button
- `Left (`RadioButton (`id (`specify_url), `opt(`notify), _("Specify &URL..."))),
- `VStretch ()
- ))), `HStretch ()
- );
- } else {
- y2milestone("Network is available, allowing Network-related options...");
- }
-
- // dialog caption
- string title = _("Add-On Product Media");
- // help
- string help_text = _("<p><big><b>Software Repository</b></big><br>
-Add-on products can be installed from CD, over a
-network, or from the hard disk.</p>
-");
-
- // help, continued
- help_text = help_text + _("<p>
-To install add-on product from <b>CD</b>,
-have the product CD set or the DVD available.</p>");
-
- // help, continued
- help_text = help_text + _("<p>
-The product CDs can be copied to the hard disk.
-Insert the path where the first
-CD is located, for example, /data1/<b>CD1</b>.
-Only the base path is required if all CDs are copied
-into one directory.</p>
-");
-
- // help, continued
- help_text = help_text + _("<p>
-Network installation requires a working network connection.
-Specify the directory where the packages from
-the first CD are located, such as /data1/CD1.</p>
-");
-
- Wizard::SetContents (title, contents, help_text, Stage::initial(), true);
- Wizard::RestoreBackButton();
- Wizard::DisableBackButton();
- Wizard::RestoreAbortButton();
- Wizard::SetAbortButton (`cancel, Label::CancelButton());
-
- // disable the button unless some option is selected
- // bugzilla #305850
- Wizard::DisableNextButton();
-}
-
-/**
* Returns begining string for source type
*
* @param symbol source_type
@@ -203,146 +113,30 @@
* @return symbol for wizard sequencer
*/
symbol MediaSelect () {
- // FIXME: this function is ugly
- // rewrite especially handling `back (see #216910)
- y2milestone ("Running media select dialog");
- CreateMediaSelectDialog();
-
- // all supported types
- // bugzilla #305850
- list rb_rets = [`slp, `ftp, `http, `https, `samba, `nfs, `cd, `dvd, `local_dir, `specify_url];
-
- symbol ret = nil;
- string url = "";
- while (ret == nil) {
- ret = (symbol) UI::UserInput ();
-
- if (ret == `back) {
- // bugzilla #216910
- // `back means - return to the previous dialog
- // in Mode::normal, there is no previous dialog
- if (Mode::normal()) {
- ret = nil;
- continue;
- } else {
- break;
- }
- } else if (ret == `abort || ret == `cancel) {
- ret = `abort;
-
- // Just return back (abort adding new Add-On) in installation
- if (Mode::installation()) {
- break;
- // Ask in other cases
- } else {
- // yes-no popup
- if (Popup::YesNo (_("Really abort add-on product installation?")))
- break;
- }
-
- ret = nil;
- continue;
- // one radio button selected
- } else if (ret != nil && contains (rb_rets, ret)) {
- // bugzilla #305850
- Wizard::EnableNextButton();
- ret = nil;
- // next loop
- continue;
- } else if (ret == `next) {
- y2milestone ("Media type selected...");
- } else {
- y2error ("Unknown ret: %1", ret);
- continue;
- }
-
- createResult = nil;
- symbol input = (symbol)UI::QueryWidget (`id (`type), `CurrentButton);
- y2milestone ("Current: %1", input);
-
- if ( input == `slp )
- {
- string required_package = "yast2-slp";
- boolean installed_before = PackageSystem::Installed (required_package);
-
- // in stage initial, packages can't be installed
- // bugzilla #327742
- if (Stage::initial()) {
- y2milestone ("Stage initial...");
- } else if (! installed_before) {
- // Tries to Check and Install packages
- if (
- ! PackageSystem::CheckAndInstallPackagesInteractive ([required_package]) ||
- ! PackageSystem::Installed (required_package)
- ) {
- Report::Error (sformat (
- // popup error message, %1 is the package name
- _("Cannot search for SLP installation repositories
-without having %1 package installed"),
- required_package
- ));
- y2warning ("Not searching for SLP sources");
- ret = nil;
- continue;
- // New .slp agent has been added
- } else {
- SCR::RegisterNewAgents();
- }
- }
+ map