Hello community,
here is the log from the commit of package yast2-online-update
checked in at Thu Mar 1 21:36:31 CET 2007.
--------
--- yast2-online-update/yast2-online-update.changes 2007-02-20 14:39:06.000000000 +0100
+++ /mounts/work_src_done/NOARCH/yast2-online-update/yast2-online-update.changes 2007-03-01 14:54:39.500104000 +0100
@@ -1,0 +2,7 @@
+Thu Mar 1 14:07:15 CET 2007 - jsuchome@suse.cz
+
+- added basic command line support (#249306)
+- removed obsoleted variables and files
+- 2.15.7
+
+-------------------------------------------------------------------
Old:
----
yast2-online-update-2.15.6.tar.bz2
New:
----
yast2-online-update-2.15.7.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-online-update.spec ++++++
--- /var/tmp/diff_new_pack.nP6015/_old 2007-03-01 21:36:13.000000000 +0100
+++ /var/tmp/diff_new_pack.nP6015/_new 2007-03-01 21:36:13.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-online-update (Version 2.15.6)
+# spec file for package yast2-online-update (Version 2.15.7)
#
# 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-online-update
-Version: 2.15.6
+Version: 2.15.7
Release: 1
License: GNU General Public License (GPL)
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-online-update-2.15.6.tar.bz2
+Source0: yast2-online-update-2.15.7.tar.bz2
prefix: /usr
BuildRequires: gcc-c++ libxcrypt-devel perl-XML-Writer pkg-config update-desktop-files yast2-bootloader yast2-devtools yast2-packager
PreReq: grep sed
@@ -48,7 +48,7 @@
gs@suse.de
%prep
-%setup -n yast2-online-update-2.15.6
+%setup -n yast2-online-update-2.15.7
%build
%{prefix}/bin/y2tool y2autoconf
@@ -106,6 +106,7 @@
/usr/share/YaST2/schema/autoyast/rnc/online_update.rnc
/usr/share/YaST2/scrconf/*.scr
/usr/share/YaST2/clients/online*.ycp
+/usr/share/YaST2/clients/cd_update.ycp
/usr/share/YaST2/clients/inst_you.ycp
/usr/share/YaST2/modules/OnlineUpdate*.ycp
/usr/share/YaST2/modules/OnlineUpdate*.ybc
@@ -142,6 +143,10 @@
%ghost %{prefix}/share/applications/YaST2/cd_update.desktop
%changelog
+* Thu Mar 01 2007 - jsuchome@suse.cz
+- added basic command line support (#249306)
+- removed obsoleted variables and files
+- 2.15.7
* Tue Feb 20 2007 - jsuchome@suse.cz
- do not change Finish button label (#246497)
- 2.15.6
++++++ yast2-online-update-2.15.6.tar.bz2 -> yast2-online-update-2.15.7.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-online-update-2.15.6/src/cd_update.desktop new/yast2-online-update-2.15.7/src/cd_update.desktop
--- old/yast2-online-update-2.15.6/src/cd_update.desktop 2005-09-08 10:33:24.000000000 +0200
+++ new/yast2-online-update-2.15.7/src/cd_update.desktop 2007-03-01 14:09:15.000000000 +0100
@@ -17,7 +17,7 @@
X-SuSE-YaST-AutoInstResource=
Icon=yast-cd_update
-Exec=/sbin/yast2 online_update .cd_default
+Exec=/sbin/yast2 online_update cd_update
Name=Patch CD Update
GenericName=Install patches from CD to correct and improve your existing installation
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-online-update-2.15.6/src/cd_update.ycp new/yast2-online-update-2.15.7/src/cd_update.ycp
--- old/yast2-online-update-2.15.6/src/cd_update.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-online-update-2.15.7/src/cd_update.ycp 2007-03-01 13:48:19.000000000 +0100
@@ -0,0 +1,6 @@
+/**
+ * Summary: Client for calling CD update
+ */
+{
+ return WFM::CallFunction ("online_update", prepend (WFM::Args (), "cd_update"));
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-online-update-2.15.6/src/Makefile.am new/yast2-online-update-2.15.7/src/Makefile.am
--- old/yast2-online-update-2.15.6/src/Makefile.am 2007-02-16 14:59:18.000000000 +0100
+++ new/yast2-online-update-2.15.7/src/Makefile.am 2007-03-01 11:41:52.000000000 +0100
@@ -4,12 +4,12 @@
rncdir = $(schemadir)/autoyast/rnc
client_DATA = \
- online_update_start.ycp \
online_update_auto.ycp \
online_update_select.ycp \
online_update_install.ycp \
online_update.ycp \
online_update_setup.ycp \
+ cd_update.ycp \
inst_you.ycp
module_DATA = \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-online-update-2.15.6/src/Makefile.in new/yast2-online-update-2.15.7/src/Makefile.in
--- old/yast2-online-update-2.15.6/src/Makefile.in 2007-02-16 16:02:26.000000000 +0100
+++ new/yast2-online-update-2.15.7/src/Makefile.in 2007-03-01 13:25:22.000000000 +0100
@@ -219,12 +219,12 @@
#
rncdir = $(schemadir)/autoyast/rnc
client_DATA = \
- online_update_start.ycp \
online_update_auto.ycp \
online_update_select.ycp \
online_update_install.ycp \
online_update.ycp \
online_update_setup.ycp \
+ cd_update.ycp \
inst_you.ycp
module_DATA = \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-online-update-2.15.6/src/online_update_install.ycp new/yast2-online-update-2.15.7/src/online_update_install.ycp
--- old/yast2-online-update-2.15.6/src/online_update_install.ycp 2007-02-19 15:10:49.000000000 +0100
+++ new/yast2-online-update-2.15.7/src/online_update_install.ycp 2007-02-20 14:39:25.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: YOU installation page
* Authors: Cornelius Schumacher
*
- * $Id: online_update_install.ycp 35532 2007-01-19 13:05:59Z jsuchome $
+ * $Id: online_update_install.ycp 36312 2007-02-20 13:39:23Z jsuchome $
*
* This is a client for installation.
* It displays the dialog with a progress of the actual installation and
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-online-update-2.15.6/src/online_update_start.ycp new/yast2-online-update-2.15.7/src/online_update_start.ycp
--- old/yast2-online-update-2.15.6/src/online_update_start.ycp 2006-10-31 09:15:50.000000000 +0100
+++ new/yast2-online-update-2.15.7/src/online_update_start.ycp 1970-01-01 01:00:00.000000000 +0100
@@ -1,534 +0,0 @@
-/**
- * Package: Online update
- * Summary: Start update, display last update info, choose mode (auto|manual)
- * Authors: Gabriele Strattner
- * Stefan Schubert
- * Cornelius Schumacher
- */
-
-{
-
- textdomain "online-update";
-
- import "Label";
- import "Mode";
- import "OnlineUpdate";
- import "Popup";
- import "Wizard";
- import "AutoOnlineUpdate";
- import "OnlineUpdateDialogs";
-
- include "packager/inst_source_dialogs.ycp";
-
- map server = $[ "url": "" ];
-
- // Request username/password from user
- define map DisplayLoginPopup( string username, string password,
- string headline, string message ) ``{
- map ret_map = $[];
-
- string usernameLabel = _("&Username:");
-
- UI::OpenDialog(
- `opt(`decorated),
- `HBox(
- `HSpacing(1),
- `VBox(
- `Left(`Heading( headline )),
- `VSpacing(0.2),
- `Label( message ),
- `Frame (_("Authentication Data"),
- `VBox (
- `HBox (
- `HSpacing (0.5),
- `TextEntry ( `id(`username), usernameLabel, username ),
- `HSpacing (0.5)
- ),
- `HBox (
- `HSpacing (0.5),
- `Password ( `id(`password), _("&Password:"), password ),
- `HSpacing (0.5)
- ))),
- `VSpacing(0.2),
- `CheckBox(`id(`keep), _("&Keep Authentication Data"), false ),
- `VSpacing(0.2),
- `PushButton(`id(`clear), _("&Clear Inputs")),
- `VSpacing(0.2),
- `HBox(`PushButton(`id(`login), `opt(`default), _("&Login") ),
- `PushButton(`id(`abort), Label::CancelButton() )
- ),
- `VSpacing(0.2)
-
- ),
- `HSpacing(1)
- )
- );
-
- UI::SetFocus( `id(`username) );
-
- any ret = `nil;
-
- do {
- ret = UI::UserInput();
-
- if ( ret == `login )
- {
- ret_map = add(ret_map, "username", UI::QueryWidget(`id(`username), `Value));
- ret_map = add(ret_map, "password", UI::QueryWidget(`id(`password), `Value));
- ret_map = add(ret_map, "persistent", UI::QueryWidget(`id(`keep), `Value));
- ret_map = add(ret_map, "login", true );
- }
- else if ( ret == `clear )
- {
- UI::ChangeWidget( `id(`username), `Value, "" );
- UI::ChangeWidget( `id(`password), `Value, "" );
- }
- else
- {
- ret_map = add(ret_map, "login", false);
- }
- } while ( ret == `clear );
-
- UI::CloseDialog();
-
- return ret_map;
- };
-
- /* set YOU server and fetch patches
- * server: server map as returned by YouGetServers
- * auth: authentication map (fields "username","password","persistent")
- */
-
- define string GetPatches(map server, map usermap) ``{
-
- UI::OpenDialog( `opt( `decorated ),
- `VBox(
- `VSpacing( 0.2 ),
- `ProgressBar( `id( `progress ), _("Retrieving information about new updates...") ),
- `VSpacing( 0.2 ),
- `PushButton( `id( `abort ), Label::AbortButton() ),
- `VSpacing( 0.2 )
- )
- );
-
- Pkg::YouSetServer( server );
-
- string url = server["url"]:"";
- map parsed_url = URL::Parse (url);
- string protocol = parsed_url["scheme"]:"";
- boolean auth_set = size(usermap["username"]:"") > 0;
- if (auth_set) {
- y2debug("Authentication passed in.");
- Pkg::YouSetUserPassword(usermap["username"]:"", usermap["password"]:"", false);
- }
- if ( (! auth_set) && (protocol == "ftp" || protocol == "http" || protocol == "smb") )
- {
- string username = parsed_url["user"]:"";
- string password = parsed_url["pass"]:"";
- auth_set = size (username) > 0;
- if (auth_set)
- {
- usermap = $[
- "username" : username,
- "password" : password,
- ];
- };
- }
- if (! auth_set)
- {
- usermap = Pkg::YouGetUserPassword();
- }
-
- y2error ("Server: %1", server);
-
- string err = Pkg::YouGetDirectory();
-
- y2error ("err: %1", err);
-
- if ( err == "login" ) {
- string username = usermap[ "username" ]:"";
- string password = usermap[ "password" ]:"";
- string headline = _("Authorization");
- string msg_string = _("Enter the registration data.");
-
- map registration_map = DisplayLoginPopup( username, password,
- headline, msg_string );
-
- if ( registration_map[ "login" ]: false ) {
- Pkg::YouSetUserPassword( registration_map[ "username" ]:"",
- registration_map[ "password" ]:"",
- registration_map[ "persistent" ]:false );
- err = "";
- } else {
- err = "abort";
- }
- }
-
- if ( err == "" ) {
- err = Pkg::YouRetrievePatchInfo( OnlineUpdate::reload,
- OnlineUpdate::signature_check );
- }
-
- UI::CloseDialog();
-
- return err;
-
- };
-
-
- /////////////////////////////////////////////////////////////////////////////////////
- // MAIN:
- /////////////////////////////////////////////////////////////////////////////////////
-
-
- boolean cd_update = OnlineUpdate::cd_update;
-
- list you_server_list = [ $[ "url": "", "name": _("User-Defined Location") ] ];
-
- string you_url = OnlineUpdate::you_url;
-
- map auth = $[]; /* keeps authentication data for most recent custom server */
-
- y2milestone( "you_url: %1", you_url );
-
- map statusmap = Pkg::YouStatus();
- y2debug("status map: %1", statusmap );
-
- string mirrorListServer = statusmap["mirrorurl"]:"www.suse.de";
-
- string initMessage = "";
- if ( cd_update ) {
- initMessage = _("Initializing for CD update...");
- you_url = "cd:///";
- } else {
- initMessage = sformat( _("Getting a list of mirror servers...")/*, mirrorListServer*/ );
- }
- UI::OpenDialog(`opt(`decorated ),`Label( initMessage ));
-
- if ( size( you_url ) != 0 ) {
- server[ "url" ] = you_url;
- you_server_list = add( you_server_list, server );
- } else {
- symbol result = `retry;
- do {
- string err = Pkg::YouGetServers( you_server_list );
- if ( size( err ) == 0 ) {
- result = `ok;
- } else {
- y2error( "Get Servers: %1", err );
- if ( err == "get" ) {
- string text = _("Cannot fetch remote server list. Only user-defined patch
-sources will be available.
-
-Possible solution:
-Check network connection.
-");
- result = OnlineUpdateDialogs::IgnoreWarningPopup( text,
- sformat( _("URL: %1"), mirrorListServer ) + "\n" +
- Pkg::LastErrorDetails() );
- } else if ( err == "read" ) {
- result = OnlineUpdateDialogs::IgnorePopup( _("Unable to read server list from disk."),
- Pkg::LastErrorDetails() );
- } else if ( err == "write" ) {
- result = OnlineUpdateDialogs::IgnorePopup( _("Could not write server list to disk."),
- Pkg::LastErrorDetails() );
- } else {
- result = OnlineUpdateDialogs::IgnorePopup( _("Error getting servers."),
- Pkg::LastErrorDetails() );
- }
- if ( result == `abort )
- {
- UI::CloseDialog();
- return result;
- }
- }
- } while ( result == `retry );
- }
-
- UI::CloseDialog();
-
- string status_product = statusmap["product"]:"unknown";
- string status_version = statusmap["version"]:"unknown";
- string status_basearch = statusmap["basearch"]:"unknown";
- integer status_lastupdate = statusmap["lastupdate"]:-1;
-
- string lastupdateLabel = "";
-
- if ( status_lastupdate == -1 ) {
- lastupdateLabel = _("There was no update executed up to now.");
- } else if ( status_lastupdate == 0 ) {
- lastupdateLabel = _("Last successful update was performed less than one day ago.");
- } else {
- lastupdateLabel = _("Last successful update was performed %1 day ago.",
- "Last successful update was performed %1 days ago.",
- status_lastupdate );
- }
-
- list servers = [];
- integer i = 0;
- while ( i < size( you_server_list ) ) {
- map server = you_server_list[ i ]:$[];
- string name = server[ "name" ]:"";
- string url = server[ "url" ]:"";
- string text = "";
- if ( size( name ) == 0 ) text = url;
- else text = name;
- servers = add( servers, `item( `id( i ), text ) );
- i = i + 1;
- }
-
- boolean manualSelection = true;
- if ( OnlineUpdate::you_auto ||
- SCR::Read( .sysconfig.onlineupdate.YOU_MANUAL_SELECTION ) == "no") {
- manualSelection = false;
- }
-
- // layout main dialog
-
- term contents =
- `VBox(
- `VSpacing( 0.3 ),
- `HBox(
- `HWeight(1, `Empty()),
- `HWeight(10,
- `Frame ( _("System &Information"),
- `VBox(
- `VSpacing(0.3),
- `HBox(`HSpacing(0.8),
- `Left( `Label( sformat( lastupdateLabel , status_lastupdate ) ) )
- ),
- `VSpacing(0.5),
- `HBox(`HSpacing(0.8),
- `Left( `Label( sformat( _("Product: %1"), status_product ) ) ),
- `HSpacing(0.8)
- ),
- `HBox(`HSpacing(0.8),
- `Left( `Label( sformat( _("Version: %1"), status_version ) ) )
- ),
-// `HBox(`HSpacing(0.8),
-// `Left( `Label( sformat( _("Base Architecture: %1"), status_basearch ) ) )
-// ),
- `VSpacing(0.3)
- )
- )
- ),
- `HWeight(1, `Empty())
- ),
- `VSpacing(1.0),
- `HBox(
- `HWeight(1, `Empty()),
- `HWeight(10,
- `Frame (_("Update Configuration"),
- `VBox(
- `VSpacing(0.3),
- `VSquash(
- `HBox(
- `HSpacing(0.8),
- `HWeight(1,`Left(`ComboBox(`id(`server), `opt(`notify), _("&Installation source"), servers ))),
- `HSpacing(1.2)
- )),
- `HBox(
- `HSpacing(0.8),
- `TextEntry( `id(`url), `opt(`notify), _("Location"), "" ),
- `HSpacing(1.2)
- ),
- `HBox(
- `HSpacing(0.8),
- `PushButton( `id(`newserver), _("New Server...") ),
- `PushButton( `id(`editserver), _("Edit Server...") ),
- `HStretch()
- ),
- `VSpacing(0.3),
- `HBox(`HSpacing(0.8),
- `Left(`CheckBox(`id(`manual),
- _("&Manually Select Patches"), manualSelection ) )
- ),
- `HBox(`HSpacing(0.8),
- `Left(`CheckBox(`id(`reload),
- _("&Reload All Patches from Server"), false ) )
- ),
- `VSpacing( 0.5 ),
- `HBox(
- `PushButton( `id( `automatic ),
- _("&Configure Fully Automatic Update...") )
- ),
- `VSpacing( 0.3 )
- )
- )
- ),
- `HWeight(1, `Empty())
- ),
- `VSpacing( 0.5 )
- );
-
- string help_text = "";
-
- // helptext dialog online update start screen
- string help_part1 = _("<p>YaST Online Update (YOU) is the easy way to get all recommended
-patches and security fixes from a SuSE update server.
-</p>
-");
-
- string help_part2 = _("<p>
-If <b>Manually Select Patches</b> is checked, all available patches will be shown
-from which to select the patches to install.<br>
-If <b>Reload All Patches from Server</b> is checked, all patches will be fetched
-from the server even when they already are locally available from a previous
-download.
-</p>
-");
-
- string help_part3 = _("<p>After clicking <b>New Server</b>, select a local
-installation source instead of an FTP or HTTP server or select
-another FTP or HTTP server. Click <b>Edit Server</b> to edit the location of the
-selected server.</p>
-");
-
- string help_part4 = _("<p>Clicking <b>Configure Fully Automatic Update</b>
-opens a dialog in which to configure YOU to check for updates once a day
-and automatically download and install updates when new ones are available
-without the need of user interaction.</p>
-");
-
- help_text = help_part1 + help_part2 + help_part3 + help_part4;
-
- Wizard::SetContents( _("Welcome to YaST Online Update"), contents, help_text,
- false, true );
-
- Wizard::SetNextButton(`next, Label::NextButton() );
- Wizard::DisableBackButton();
- Wizard::EnableAbortButton();
-
- UI::ChangeWidget( `id(`server), `Value, 1 );
-
- server = you_server_list[ 1 ]:$[];
- UI::ChangeWidget( `id(`url), `Value, server[ "url" ]:"" );
-
-
- // Loop for User Input ....
-
- symbol ret = `next;
-
- repeat {
-
- ret = (symbol)UI::UserInput();
-
- if ( ret == `cancel ) ret = `abort;
-
- OnlineUpdate::you_auto = !(boolean)UI::QueryWidget( `id( `manual ),
- `Value );
- OnlineUpdate::reload = (boolean)UI::QueryWidget( `id( `reload ), `Value );
-
- // which server is selected from combo box installation source ?
- integer serverId = (integer)UI::QueryWidget(`id(`server), `Value );
-
- server = you_server_list[ serverId ]:$[];
-
- if ( ret == `server ) {
- UI::ChangeWidget( `id(`url), `Value, server[ "url" ]:"" );
- } else if ( ret == `url ) {
- if ( serverId != 0 ) {
- UI::ChangeWidget( `id(`server), `Value, 0 );
- }
- } else if ( ret == `newserver || ret == `editserver ) {
- string url = "";
- if ( ret == `editserver ) {
- map parsed_url = URL::Parse( (string)UI::QueryWidget( `id(`url), `Value ) );
- parsed_url["user"] = auth["username"]:"";
- parsed_url["pass"] = auth["password"]:"";
- url = URL::Build(parsed_url);
- }
-
- url = editUrl2( url, true );
- if ( size( url ) > 0 ) {
- /* We need to remove user/password from url (#96204)
- instead, save it to auth */
- map parsed_url = URL::Parse (url);
- auth["username"] = parsed_url["user"]:"";
- auth["password"] = parsed_url["pass"]:"";
- parsed_url["user"]="";
- parsed_url["pass"]="";
- url = URL::Build(parsed_url);
- UI::ChangeWidget( `id(`url), `Value, url );
- UI::ChangeWidget( `id(`server), `Value, 0 );
- auth["url"] = url;
- }
- } else if ( ret == `automatic ) {
- OnlineUpdateDialogs::SetupAutomatic();
- } else if ( ret == `abort && OnlineUpdateDialogs::ConfirmAbortUpdate(`painless) ) {
- return `abort;
- } else if (ret == `next) {
- if ( serverId == 0 ) {
- string url = (string)UI::QueryWidget( `id( `url ), `Value );
- if (substring (url, size (url) - 1, 1) != "/")
- url = url + "/";
- server[ "url" ] = url;
- server[ "type" ] = "custom";
- you_server_list[ 0 ] = server;
- }
- string err="";
- // Pkg::SetServer( server ) is called in GetPatches()
- if ( server["url"]:"" == auth["url"]:"" ) {
- y2debug("Using authentication from auth");
- err = GetPatches(server, auth);
- }
- else {
- /* auth is for a different server, don't use it. */
- y2debug("Authentication from different server");
- err = GetPatches(server, $[]);
- }
-
- if ( size( err ) != 0 ) {
- y2error( "GetPatches err: %1", err );
-
- ret = `this;
-
- if ( err != "abort" ) {
- string msg = "";
- string details = Pkg::LastErrorDetails();
- if ( err == "login" ) {
- msg = _("Login failed. Check that you have provided
-the correct user name and password.
-");
- } else if ( err == "media" ) {
- if ( cd_update ) {
- msg = _("Initialization failed. Check that
-you have inserted the correct CD.
-");
- details = Pkg::LastError() + "\n" + details;
- } else {
- msg = _("Initialization failed. Try again.
-If failure continues, choose
-another SuSE FTP/HTTP server.
-");
- details = Pkg::LastError() + "\n" + details;
- }
- } else if ( err == "sig" ) {
- msg = _("Signature check for patch info files failed.
-Cannot load patch information.
-");
- ret = `this;
-
- UI::ChangeWidget( `id( `reload ), `Value, true );
- } else if ( err == "url" ) {
- msg = _("URL is invalid.");
- } else {
- msg = _("Patch information retrieval failed.");
- details = err + "\n" + details;
- }
-
- OnlineUpdateDialogs::ErrorPopup( msg, details );
- }
- } else {
- Pkg::YouSelectPatches();
- }
- } else {
- y2debug( "RET: %1", ret );
- }
-
- } until (ret == `back || ret == `next || ret == `again);
-
- y2debug("Return START: %1", ret );
-
- return ret;
-}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-online-update-2.15.6/src/online_update.ycp new/yast2-online-update-2.15.7/src/online_update.ycp
--- old/yast2-online-update-2.15.6/src/online_update.ycp 2006-11-08 16:09:35.000000000 +0100
+++ new/yast2-online-update-2.15.7/src/online_update.ycp 2007-03-01 14:10:01.000000000 +0100
@@ -9,6 +9,7 @@
textdomain "online-update";
+ import "CommandLine";
import "Confirm";
import "Directory";
import "FileUtils";
@@ -22,36 +23,13 @@
import "Wizard";
import "GetInstArgs";
- integer arg_n = 0;
- integer arg_max = size( WFM::Args() );
-
- while (arg_n < arg_max ) {
- any arg = WFM::Args( arg_n );
-
- // start the 'Patch CD Update': add CD as installation source
- if ( arg == .cd_default || arg == ".cd_default" )
- {
- OnlineUpdate::cd_update = true;
- }
- else if ( arg == .auto.get || arg == ".auto.get" )
- {
- OnlineUpdate::you_auto_get = true;
- OnlineUpdate::you_auto = true;
- }
- arg_n = arg_n + 1;
- }
+ // return value is integer
+ integer retval = 1;
- // only download the patches - OBSOLETE
- if ( OnlineUpdate::you_auto ) {
- y2warning ("This usage of online_update.ycp is OBSOLETE, use rug instead");
- string command = "rug up -t patch";
- if ( OnlineUpdate::you_auto_get ) {
- command = command + " -d";
- }
- y2milestone ("command: %1", command );
- integer result = (integer)SCR::Execute( .target.bash, command );
- return result;
- }
+/**
+ * Main sequence for Online Update
+ */
+define symbol OnlineUpdateSequence () {
Wizard::CreateDialog();
Wizard::SetDesktopIcon("online_update");
@@ -81,7 +59,7 @@
if (! Confirm::MustBeRoot () || ! PackageLock::Check ())
{
Wizard::CloseDialog ();
- return 1;
+ return `cancel;
}
Progress::NextStage();
@@ -124,7 +102,7 @@
result = WFM::CallFunction( module_name, module_args );
- if ( result == `nil ) return 1;
+ if ( result == `nil ) return `cancel;
if (result == `again )
continue;
@@ -153,6 +131,7 @@
Pkg::SourceFinishAll ();
}
+ retval = 0;
if (OnlineUpdate::restart_yast)
{
if (FileUtils::Exists (Directory::vardir + "/selected_patches.ycp"))
@@ -160,7 +139,56 @@
Popup::Message (OnlineUpdate::restart_message);
}
OnlineUpdate::restart_yast = false;
- return -42; // restart menu.ycp even if there are no other patches selected
+ retval = -42;// restart menu.ycp even if there are no other patches selected
+ }
+ return `next;
+}
+
+ /**
+ * command line handler for CD update (=> add CD as installation source)
+ */
+ define boolean CDUpdateHandler (map options ) {
+ OnlineUpdate::cd_update = true;
+ OnlineUpdateSequence ();
+ return true;
+ }
+
+ // the command line description map
+ map cmdline = $[
+ "id" : "online_update",
+ // translators: command line help text
+ "help" : _("Online Update module"),
+ "guihandler" : OnlineUpdateSequence,
+ "actions" : $[
+ "cd_update" :$[
+ "handler" : CDUpdateHandler,
+ // translators: command line help text for pam action
+ "help" : _("Start Patch CD Update")
+ ],
+ ],
+ "mappings" : $[
+ "cd_update" : []
+ ]
+ ];
+
+ // first check for obsoleted arguments
+ integer arg_n = 0;
+ while (arg_n < size (WFM::Args())) {
+ any arg = WFM::Args( arg_n );
+ if ( arg == .cd_default || arg == ".cd_default" )
+ {
+ y2warning (".cd_default parameter is OBSOLETE, use cd_update instead.");
+ OnlineUpdate::cd_update = true;
+ }
+ else if ( arg == .auto.get || arg == ".auto.get" )
+ {
+ y2warning (".auto.get parameter for online_update is OBSOLETE, use zypper or rug instead.");
+ }
+ arg_n = arg_n + 1;
}
- return 0;
+ if (OnlineUpdate::cd_update) // obsolete .cd_default argument was used
+ OnlineUpdateSequence ();
+ else
+ CommandLine::Run (cmdline);
+ return retval;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-online-update-2.15.6/src/OnlineUpdate.ycp new/yast2-online-update-2.15.7/src/OnlineUpdate.ycp
--- old/yast2-online-update-2.15.6/src/OnlineUpdate.ycp 2006-08-22 15:48:49.000000000 +0200
+++ new/yast2-online-update-2.15.7/src/OnlineUpdate.ycp 2007-03-01 14:07:07.000000000 +0100
@@ -18,31 +18,6 @@
// no. of temporary source
global integer cd_source = -1;
-/**
- * flag: YOU automatic get mode?
- */
-global boolean you_auto_get = false;
-
-/**
- * flag: Automatic Update
- */
-global boolean you_auto = false;
-
-/**
- * Url where patches are looked for.
- */
-global string you_url = "";
-
-/**
- * should signatures be checked? FIXME obsolete
- */
-global boolean signature_check = true;
-
-/**
- Force reload of all patches?
-*/
-global boolean reload = true;
-
// if yast should be restarted after installation of patches
global boolean restart_yast = false;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-online-update-2.15.6/VERSION new/yast2-online-update-2.15.7/VERSION
--- old/yast2-online-update-2.15.6/VERSION 2007-02-20 14:22:07.000000000 +0100
+++ new/yast2-online-update-2.15.7/VERSION 2007-03-01 14:08:51.000000000 +0100
@@ -1 +1 @@
-2.15.6
+2.15.7
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org