Hello community,
here is the log from the commit of package yast2-registration
checked in at Mon Nov 10 15:47:00 CET 2008.
--------
--- yast2-registration/yast2-registration.changes 2008-10-29 16:33:00.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-registration/yast2-registration.changes 2008-11-07 19:15:05.875811000 +0100
@@ -1,0 +2,29 @@
+Fri Nov 7 19:14:00 CET 2008 - jdsn@suse.de
+
+- fix reading repo settings (bnc#427698)
+- 2.17.11
+
+-------------------------------------------------------------------
+Thu Nov 6 15:21:49 CET 2008 - jdsn@suse.de
+
+- split off branding packages (bnc#436644)
+- fix error code handling of SuseRegister
+- updated yastbrowser for xulrunner191 (bnc#383660)
+
+-------------------------------------------------------------------
+Wed Nov 5 14:37:32 CET 2008 - ug@suse.de
+
+- desktop file changed
+
+-------------------------------------------------------------------
+Fri Oct 31 10:38:49 CET 2008 - mc@suse.de
+
+- YSR module should return true
+
+-------------------------------------------------------------------
+Thu Oct 30 21:09:12 CET 2008 - jdsn@suse.de
+
+- check for w3m in textmode registration (bnc#440289)
+- reset registration backend before exiting
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-registration-2.17.10.tar.bz2
New:
----
yast2-registration-2.17.11.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-registration.spec ++++++
--- /var/tmp/diff_new_pack.zLz733/_old 2008-11-10 15:46:47.000000000 +0100
+++ /var/tmp/diff_new_pack.zLz733/_new 2008-11-10 15:46:47.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-registration (Version 2.17.10)
+# spec file for package yast2-registration (Version 2.17.11)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,18 +19,19 @@
Name: yast2-registration
-Version: 2.17.10
+Version: 2.17.11
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-registration-2.17.10.tar.bz2
+Source0: yast2-registration-2.17.11.tar.bz2
Prefix: /usr
Requires: yast2 >= 2.17.0
Requires: yast2-packager >= 2.17.0
Requires: suseRegister
Requires: perl-TimeDate limal limal-perl limal-ca-mgm-perl
Requires: yast2-pkg-bindings >= 2.17.20
+Requires: yast2-registration-branding
PreReq: %fillup_prereq
BuildRequires: yast2 >= 2.17.0
BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools yast2-packager yast2-testsuite
@@ -51,7 +52,7 @@
J. Daniel Schmidt
%prep
-%setup -n yast2-registration-2.17.10
+%setup -n yast2-registration-2.17.11
%build
%{prefix}/bin/y2tool y2autoconf
@@ -79,6 +80,42 @@
%clean
rm -rf "$RPM_BUILD_ROOT"
+%package branding-SLE
+License: GPL v2 or later
+Requires: yast2-registration
+Provides: yast2-registration-branding
+Conflicts: otherproviders(yast2-registration-branding)
+Summary: YaST2 - Registration Module
+Group: System/YaST
+
+%description branding-SLE
+The registration module to register products and/or to fetch an update
+source (mirror) automatically.
+
+
+
+Authors:
+--------
+ J. Daniel Schmidt
+
+%package branding-openSUSE
+License: GPL v2 or later
+Requires: yast2-registration
+Provides: yast2-registration-branding
+Conflicts: otherproviders(yast2-registration-branding)
+Summary: YaST2 - Registration Module
+Group: System/YaST
+
+%description branding-openSUSE
+The registration module to register products and/or to fetch an update
+source (mirror) automatically.
+
+
+
+Authors:
+--------
+ J. Daniel Schmidt
+
%pre
/usr/sbin/groupadd -r suse-ncc 2> /dev/null || :
/usr/sbin/useradd -r -s /bin/bash -c "Novell Customer Center User" -d /var/lib/YaST2/suse-ncc-fakehome -g suse-ncc suse-ncc 2> /dev/null || :
@@ -95,7 +132,7 @@
/usr/share/YaST2/modules/*.ybc
%dir /usr/share/YaST2/include/registration
/usr/share/YaST2/include/registration/*.ycp
-%{prefix}/share/applications/YaST2/*.desktop
+%{prefix}/share/applications/YaST2/online_update_configuration.desktop
/usr/share/YaST2/schema/autoyast/rnc/*.rnc
/usr/lib/YaST2/bin/online_update
/usr/share/YaST2/yastbrowser
@@ -105,13 +142,36 @@
#fillup
/var/adm/fillup-templates/sysconfig.suse_register-yast2-registration
/var/adm/fillup-templates/sysconfig.automatic_online_update-yast2-registration
+
+%files branding-SLE
+%defattr(-,root,root)
+%{prefix}/share/applications/YaST2/customer_center.desktop
+
+%files branding-openSUSE
+%defattr(-,root,root)
+%{prefix}/share/applications/YaST2/suse_register.desktop
+
%changelog
+* Fri Nov 07 2008 jdsn@suse.de
+- fix reading repo settings (bnc#427698)
+- 2.17.11
+* Thu Nov 06 2008 jdsn@suse.de
+- split off branding packages (bnc#436644)
+- fix error code handling of SuseRegister
+- updated yastbrowser for xulrunner191 (bnc#383660)
+* Wed Nov 05 2008 ug@suse.de
+- desktop file changed
+* Fri Oct 31 2008 mc@suse.de
+- YSR module should return true
+* Thu Oct 30 2008 jdsn@suse.de
+- check for w3m in textmode registration (bnc#440289)
+- reset registration backend before exiting
* Wed Oct 29 2008 jdsn@suse.de
- remove requires to sles-release
- 2.17.10
* Wed Oct 29 2008 jdsn@suse.de
- consistent naming in autoYaST profile
-* Sat Oct 25 2008 jdsn@suse.de
+* Fri Oct 24 2008 jdsn@suse.de
- checking if registration runs on xen (bnc#418287)
- more verbose logging
- 2.17.9
@@ -147,7 +207,7 @@
- support repository changes in catalogs (bnc#430896)
- added mandatory source refreshes
- 2.17.2
-* Thu Oct 09 2008 jdsn@suse.de
+* Wed Oct 08 2008 jdsn@suse.de
- use new suse_register backend (bnc#430896)
- change registration server in UI
- 2.17.1
++++++ yast2-registration-2.17.10.tar.bz2 -> yast2-registration-2.17.11.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-registration-2.17.10/configure new/yast2-registration-2.17.11/configure
--- old/yast2-registration-2.17.10/configure 2008-10-29 19:43:24.000000000 +0100
+++ new/yast2-registration-2.17.11/configure 2008-11-07 19:36:20.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for yast2-registration 2.17.10.
+# Generated by GNU Autoconf 2.61 for yast2-registration 2.17.11.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -574,8 +574,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-registration'
PACKAGE_TARNAME='yast2-registration'
-PACKAGE_VERSION='2.17.10'
-PACKAGE_STRING='yast2-registration 2.17.10'
+PACKAGE_VERSION='2.17.11'
+PACKAGE_STRING='yast2-registration 2.17.11'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1197,7 +1197,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-registration 2.17.10 to adapt to many kinds of systems.
+\`configure' configures yast2-registration 2.17.11 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1268,7 +1268,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-registration 2.17.10:";;
+ short | recursive ) echo "Configuration of yast2-registration 2.17.11:";;
esac
cat <<\_ACEOF
@@ -1346,7 +1346,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-registration configure 2.17.10
+yast2-registration configure 2.17.11
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1360,7 +1360,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-registration $as_me 2.17.10, which was
+It was created by yast2-registration $as_me 2.17.11, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2181,7 +2181,7 @@
# Define the identity of the package.
PACKAGE='yast2-registration'
- VERSION='2.17.10'
+ VERSION='2.17.11'
cat >>confdefs.h <<_ACEOF
@@ -2409,7 +2409,7 @@
-VERSION="2.17.10"
+VERSION="2.17.11"
RPMNAME="yast2-registration"
MAINTAINER="J. Daniel Schmidt "
@@ -3304,7 +3304,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-registration $as_me 2.17.10, which was
+This file was extended by yast2-registration $as_me 2.17.11, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3347,7 +3347,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-registration config.status 2.17.10
+yast2-registration config.status 2.17.11
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-registration-2.17.10/configure.in new/yast2-registration-2.17.11/configure.in
--- old/yast2-registration-2.17.10/configure.in 2008-10-29 19:43:19.000000000 +0100
+++ new/yast2-registration-2.17.11/configure.in 2008-11-07 19:36:12.000000000 +0100
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.16.7 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-registration, 2.17.10, http://bugs.opensuse.org/, yast2-registration)
+AC_INIT(yast2-registration, 2.17.11, http://bugs.opensuse.org/, yast2-registration)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.17.10"
+VERSION="2.17.11"
RPMNAME="yast2-registration"
MAINTAINER="J. Daniel Schmidt "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-registration-2.17.10/src/clients/inst_suse_register.ycp new/yast2-registration-2.17.11/src/clients/inst_suse_register.ycp
--- old/yast2-registration-2.17.10/src/clients/inst_suse_register.ycp 2008-10-29 16:58:04.000000000 +0100
+++ new/yast2-registration-2.17.11/src/clients/inst_suse_register.ycp 2008-11-04 15:41:46.000000000 +0100
@@ -517,45 +517,41 @@
// create the command string to launch a browser
string bcmd="/bin/false";
boolean cmd_ok = false;
+ string required_package = "";
+ string checkBinary = "";
if ( textmode )
{
- cmd_ok = (integer) SCR::Execute(.target.bash, "test -x /usr/bin/w3m") == 0 ? true:false;
- if ( ! cmd_ok )
- {
- y2error("Textmode installation requires w3m for interactive registration. w3m is missing.");
- }
bcmd = " w3m ";
+ required_package = "w3m";
+ checkBinary = "/usr/bin/w3m";
}
else
{
- // see if xulrunner is already there (bnc#435872)
- cmd_ok = (integer) SCR::Execute(.target.bash, "test -x /usr/bin/xulrunner") == 0 ? true:false;
-
- if ( ! cmd_ok )
- {
- // check for and install mozilla-xulrunner if needed (#175166), modified due to (#304310), modified due to (bnc#435872)
- string required_package = "mozilla-xulrunner190";
- if (!Package::Installed(required_package))
- {
- Package::InstallAllMsg([required_package], nil);
- }
- }
- cmd_ok = (integer) SCR::Execute(.target.bash, "test -x /usr/bin/xulrunner") == 0 ? true:false;
+ bcmd = " MOZ_DISABLE_PANGO=1 /usr/bin/xulrunner /usr/share/YaST2/yastbrowser/application.ini -url ";
+ required_package = "mozilla-xulrunner190";
+ checkBinary = "/usr/bin/xulrunner";
+ }
- if ( ! cmd_ok )
+ cmd_ok = (integer) SCR::Execute(.target.bash, sformat("test -x %1"), checkBinary) == 0 ? true:false;
+ if ( ! cmd_ok )
+ {
+ if (!Package::Installed(required_package))
{
- y2error("Graphical installation requires Mozilla-xulrunner for interactive registration. Mozilla-xulrunner is missing.");
+ Package::InstallAllMsg([required_package], nil);
}
-
- bcmd = " MOZ_DISABLE_PANGO=1 /usr/bin/xulrunner /usr/share/YaST2/yastbrowser/application.ini -url ";
+ cmd_ok = (integer) SCR::Execute(.target.bash, sformat("test -x %1", checkBinary)) == 0 ? true:false;
}
- if (! cmd_ok)
+ if ( ! cmd_ok )
{
- y2error("No browser found for interactive registration.");
+ y2error("No browser found for interactive registration. A needed package was not installed: %1", required_package);
return "nobrowser";
}
+ else
+ {
+ y2milestone("A browser was found to show the interactive registration: %1", required_package);
+ }
// add url to browser command
@@ -1006,9 +1002,10 @@
// show a message when there are no products to register
- if ( SRstatus == 101 )
+ if ( SRstatus == 100 || SRstatus == 101 )
{
Popup::Message(no_product_msg);
+ y2error("No products to be registered. SuseRegister returned with exit code: %1", SRstatus);
loopend = true;
}
@@ -1017,6 +1014,7 @@
if ( SRstatus == 198 )
{
Popup::Message(no_browser_msg);
+ y2error("No browser found to display registration website. SuseRegister returned with exit code: %1", SRstatus);
loopend = true;
}
@@ -1025,13 +1023,15 @@
if ( SRstatus == 113 )
{
Popup::Message(error_target_init_failed);
+ y2error("Initialization of target failed.");
loopend = true;
}
// handle any other error codes
- if ( contains([0, 1, 3, 101, 113, 198, 199], SRstatus) == false )
+ if ( contains([0, 1, 3, 100, 101, 113, 198, 199], SRstatus) == false )
{
+ y2error("An error occurred. SuseRegister exit code (or internal error status) is: %1", SRstatus);
// display error message
error_msg_details = YSR::get_errormsg();
report_error();
@@ -1073,11 +1073,6 @@
if (Mode::normal())
{
- // (bnc#395333)
-// y2milestone ("Current sources: %1", Pkg::SourceGetCurrent (true));
- // #172665
-// Pkg::SourceSaveAll();
-// Pkg::TargetFinish ();
Wizard::CloseDialog();
}
else
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-registration-2.17.10/src/clients/online_update_configuration.ycp new/yast2-registration-2.17.11/src/clients/online_update_configuration.ycp
--- old/yast2-registration-2.17.10/src/clients/online_update_configuration.ycp 2008-09-12 14:56:56.000000000 +0200
+++ new/yast2-registration-2.17.11/src/clients/online_update_configuration.ycp 2008-11-07 19:29:14.000000000 +0100
@@ -20,12 +20,29 @@
import "Mode";
import "SourceManager";
import "PackageCallbacks";
-/* import "FileUtils";
- import "Package"; */
-
+ import "CommandLine";
include "registration/OUCDialogs.ycp";
+ include "registration/texts.ycp";
+
+ // support basic command-line output (bnc#439050)
+ list wfm_args = WFM::Args();
+ y2milestone ("ARGS: %1", wfm_args);
+ if ( (size (wfm_args) > 0) &&
+ (contains (wfm_args, "help") || contains (wfm_args, "longhelp") || contains (wfm_args, "xmlhelp") ) )
+ {
+ string cmdhelp = _("Online Update Configuration Module Help");
+ Mode::SetUI ("commandline");
+ // TRANSLATORS: commandline help
+ CommandLine::Run($["id" : "online_update_configuration",
+ "help" : cmdhelp
+ ]);
+ y2milestone("Online Update Configuration was called with help parameter.");
+ return `auto;
+ }
+ map ui = UI::GetDisplayInfo();
+ boolean textmode = (boolean) ui["TextMode"]:false;
string help = getOUCHelp(`default);
term contents = getOUCDialog(`default);
@@ -44,11 +61,6 @@
OnlineUpdateConfiguration::Read();
-
-
- // FIXME: the display of the current and default URL has to be adapted once we can read the data from the products file
- // this function was missing in libzypp and packagebindings will be available soon, then we can complete this
-
if (false) // for testing only
{
OnlineUpdateConfiguration::currentUpdateRepo = "";
@@ -84,42 +96,90 @@
{
ret = Wizard::UserInput();
- if (ret == `restoreDefault)
- {
- Popup::Message("FIXME: function call to package bindings missing");
-
- // FIXME: after setting the default update source query it again and update the UI
- // replaceUpdateRepoString = someQueryCommand();
-
- UI::ChangeWidget(`id(`currentRepoURL), `Value, replaceUpdateRepoString);
- UI::RecalcLayout();
- }
-
if (ret == `next)
{
OnlineUpdateConfiguration::updateInterval = (symbol) UI::QueryWidget(`id(`updateInterval), `Value );
OnlineUpdateConfiguration::skipInteractivePatches = (boolean) UI::QueryWidget(`id(`skipInteractivePatches), `Value );
OnlineUpdateConfiguration::enableAOU = (boolean) UI::QueryWidget(`id(`automaticOnlineUpdate), `Value );
+ y2milestone("Writing online update configuration settings.");
OnlineUpdateConfiguration::Write();
- break;
+ //break;
+ }
+
+ if ( ret == `restoreDefault )
+ {
+ if ( OnlineUpdateConfiguration::defaultUpdateRepo == nil ||
+ OnlineUpdateConfiguration::defaultUpdateRepo == "" )
+ {
+ y2milestone("No default update repo could be found in the products metadata.");
+
+ if ( OnlineUpdateConfiguration::defaultRegistrationURL == nil ||
+ OnlineUpdateConfiguration::defaultRegistrationURL == "" )
+ {
+ y2error("No registration server set in product metadata. No update server can be setup automatically.");
+ }
+ else
+ {
+ y2milestone("Registration is needed to get an update source.");
+
+ if ( Popup::YesNo( TXT["needToRegister"]:"" + "\n\n" + TXT["runRegistrationNow"]:"" ) )
+ {
+ y2milestone("User wants to run the registration in order to setup the default update repository.");
+ // trigger registration
+ ret = `register;
+ }
+ else
+ {
+ y2milestone("User selected not to run the registration in order to setup the default update repository.");
+ }
+ }
+
+ }
+ else
+ {
+ y2milestone("User selected to set the default update repository: %1", OnlineUpdateConfiguration::defaultUpdateRepo);
+ OnlineUpdateConfiguration::setUpdateRepo(OnlineUpdateConfiguration::defaultUpdateRepo);
+ }
}
if (ret == `repoManager)
{
- SCR::Execute(.background.run_output, "yast2 inst_source");
+ if ( textmode )
+ WFM::call("inst_source");
+ else
+ SCR::Execute(.background.run_output, "yast2 inst_source");
}
if (ret == `smolt)
{
- SCR::Execute(.background.run_output, "yast2 smolt");
+ if ( textmode )
+ WFM::call("system-profile");
+ else
+ SCR::Execute(.background.run_output, "yast2 system-profile");
}
if (ret == `register)
{
- SCR::Execute(.background.run_output, "yast2 inst_suse_register");
+ if ( textmode )
+ WFM::call("inst_suse_register");
+ else
+ SCR::Execute(.background.run_output, "yast2 inst_suse_register");
+ }
+
+
+ // update values in UI
+ // after a registration call refetch the current update repo url
+ if ( ret == `restoreDefault || ret == `register )
+ {
+ y2milestone("Refetching current updateRepoURL.");
+ replaceUpdateRepoString = OnlineUpdateConfiguration::fetchCurrentUpdateRepoURL();
+ y2milestone("Current updateRepoURL is: %1", replaceUpdateRepoString);
+ UI::ChangeWidget(`id(`currentRepoURL), `Value, replaceUpdateRepoString);
+ UI::RecalcLayout();
}
+
} until (ret == `next || ret == `abort || ret == `cacel || ret == `back);
if (! is(ret, symbol)) ret = `next;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-registration-2.17.10/src/config/customer_center.desktop new/yast2-registration-2.17.11/src/config/customer_center.desktop
--- old/yast2-registration-2.17.10/src/config/customer_center.desktop 2008-09-12 08:50:38.000000000 +0200
+++ new/yast2-registration-2.17.11/src/config/customer_center.desktop 2008-11-05 15:13:47.000000000 +0100
@@ -10,6 +10,7 @@
X-SuSE-YaST-AutoInstClonable=true
X-SuSE-YaST-AutoInstRequires=lan,proxy
X-SuSE-YaST-AutoInstSchema=registration.rnc
+X-SuSE-YaST-AutoInstResource=suse_register
Icon=yast-product-registration
Exec=/sbin/yast2 inst_suse_register
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-registration-2.17.10/src/modules/OnlineUpdateConfiguration.ycp new/yast2-registration-2.17.11/src/modules/OnlineUpdateConfiguration.ycp
--- old/yast2-registration-2.17.10/src/modules/OnlineUpdateConfiguration.ycp 2008-09-12 09:37:46.000000000 +0200
+++ new/yast2-registration-2.17.11/src/modules/OnlineUpdateConfiguration.ycp 2008-11-07 19:12:41.000000000 +0100
@@ -11,6 +11,9 @@
module "OnlineUpdateConfiguration";
+import "Package";
+import "URL";
+
textdomain "registration";
@@ -30,12 +33,291 @@
global string currentUpdateRepo = "";
global string defaultUpdateRepo = "";
+global list<string> allUpdateRepos = [];
+global string defaultRegistrationURL = "";
-
+// cache the base product details
+map baseProductDetail = $[];
map Intervals = $[ `daily : "daily",
`weekly : "weekly",
`monthly: "monthly" ];
+/*
+ * fetchBaseProductDetails
+ * get the details of the base product to find its default update Source or registration server
+ * the found base product will be saved in the cache variable baseProductDetail
+ *
+ * @return true if a base product is found, else false
+ */
+boolean fetchBaseProductDetails()
+{
+ y2milestone("Searching base product details.");
+
+ // fetch product details about installed products
+ list