Hello community,
here is the log from the commit of package yast2-registration
checked in at Mon Oct 13 23:52:14 CEST 2008.
--------
--- yast2-registration/yast2-registration.changes 2008-10-08 23:40:49.000000000 +0200
+++ /d/STABLE/yast2-registration/yast2-registration.changes 2008-10-13 18:42:55.829374000 +0200
@@ -1,0 +2,7 @@
+Mon Oct 13 18:38:31 CEST 2008 - jdsn@suse.de
+
+- support repository changes in catalogs (bnc#430896)
+- added mandatory source refreshes
+- 2.17.2
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-registration-2.17.1.tar.bz2
New:
----
yast2-registration-2.17.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-registration.spec ++++++
--- /var/tmp/diff_new_pack.Wi9162/_old 2008-10-13 23:49:42.000000000 +0200
+++ /var/tmp/diff_new_pack.Wi9162/_new 2008-10-13 23:49:42.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-registration (Version 2.17.1)
+# spec file for package yast2-registration (Version 2.17.2)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,12 +19,12 @@
Name: yast2-registration
-Version: 2.17.1
+Version: 2.17.2
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-registration-2.17.1.tar.bz2
+Source0: yast2-registration-2.17.2.tar.bz2
Prefix: /usr
Requires: yast2 >= 2.16.6
Requires: suseRegister
@@ -52,7 +52,7 @@
J. Daniel Schmidt
%prep
-%setup -n yast2-registration-2.17.1
+%setup -n yast2-registration-2.17.2
%build
%{prefix}/bin/y2tool y2autoconf
@@ -108,6 +108,10 @@
/var/adm/fillup-templates/sysconfig.suse_register-yast2-registration
/var/adm/fillup-templates/sysconfig.automatic_online_update-yast2-registration
%changelog
+* Mon Oct 13 2008 jdsn@suse.de
+- support repository changes in catalogs (bnc#430896)
+- added mandatory source refreshes
+- 2.17.2
* Thu Oct 09 2008 jdsn@suse.de
- use new suse_register backend (bnc#430896)
- change registration server in UI
++++++ yast2-registration-2.17.1.tar.bz2 -> yast2-registration-2.17.2.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-registration-2.17.1/configure new/yast2-registration-2.17.2/configure
--- old/yast2-registration-2.17.1/configure 2008-10-13 13:01:39.000000000 +0200
+++ new/yast2-registration-2.17.2/configure 2008-10-13 19:02:19.000000000 +0200
@@ -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.1.
+# Generated by GNU Autoconf 2.61 for yast2-registration 2.17.2.
#
# 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.1'
-PACKAGE_STRING='yast2-registration 2.17.1'
+PACKAGE_VERSION='2.17.2'
+PACKAGE_STRING='yast2-registration 2.17.2'
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.1 to adapt to many kinds of systems.
+\`configure' configures yast2-registration 2.17.2 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.1:";;
+ short | recursive ) echo "Configuration of yast2-registration 2.17.2:";;
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.1
+yast2-registration configure 2.17.2
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.1, which was
+It was created by yast2-registration $as_me 2.17.2, 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.1'
+ VERSION='2.17.2'
cat >>confdefs.h <<_ACEOF
@@ -2409,7 +2409,7 @@
-VERSION="2.17.1"
+VERSION="2.17.2"
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.1, which was
+This file was extended by yast2-registration $as_me 2.17.2, 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.1
+yast2-registration config.status 2.17.2
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.1/configure.in new/yast2-registration-2.17.2/configure.in
--- old/yast2-registration-2.17.1/configure.in 2008-10-13 13:01:35.000000000 +0200
+++ new/yast2-registration-2.17.2/configure.in 2008-10-13 19:02:14.000000000 +0200
@@ -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.1, http://bugs.opensuse.org/, yast2-registration)
+AC_INIT(yast2-registration, 2.17.2, 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.1"
+VERSION="2.17.2"
RPMNAME="yast2-registration"
MAINTAINER="J. Daniel Schmidt "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-registration-2.17.1/src/clients/inst_suse_register.ycp new/yast2-registration-2.17.2/src/clients/inst_suse_register.ycp
--- old/yast2-registration-2.17.1/src/clients/inst_suse_register.ycp 2008-10-11 02:12:18.000000000 +0200
+++ new/yast2-registration-2.17.2/src/clients/inst_suse_register.ycp 2008-10-13 18:30:39.000000000 +0200
@@ -141,6 +141,8 @@
string nccc_success_msg = _("Your configuration was successful.");
string nccc_success_server_added = _("An update server has been added to your configuration.");
string nccc_error_no_server_added = _("No update server could be added to your configuration.");
+ string nccc_no_source_changes0 = _("No software repository needed to be changed.");
+ string nccc_no_source_changes = _("Software repositories did not need to be changed.");
/* caption for details view */
string success_detail_label =_("New Update Server");
@@ -884,6 +886,13 @@
// (#261239) show success popup only on success else error message
if (repoSummary != nil && size(repoSummary) != 0)
{
+ // on successful registration and only if there were changes, we need to refresh all sources
+ list<integer> currentSources = Pkg::SourceGetCurrent( true );
+ foreach (integer srcID, currentSources, {
+ y2milestone("Refreshing source with ID: %1", srcID);
+ Pkg::SourceForceRefreshNow(srcID);
+ });
+
UI::OpenDialog( nccc_success );
repeat
{
@@ -905,7 +914,8 @@
}
else
{
- Popup::Error(nccc_error_no_server_added);
+ //Popup::Error(nccc_error_no_server_added);
+ Popup::Notify(nccc_no_source_changes);
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-registration-2.17.1/src/modules/Register.ycp new/yast2-registration-2.17.2/src/modules/Register.ycp
--- old/yast2-registration-2.17.1/src/modules/Register.ycp 2008-10-11 02:11:34.000000000 +0200
+++ new/yast2-registration-2.17.2/src/modules/Register.ycp 2008-10-13 18:59:43.000000000 +0200
@@ -793,6 +793,8 @@
{
read_config();
iamroot = amIroot();
+
+ // FIXME: need to test for xen-hypervisor status and install xen-packages
}
@@ -830,6 +832,107 @@
}
+
+/*
+ * checkCatalogs
+ *
+ * takes a sub-"taskList"-map (catalogs-map) from SuseRegister and updates listed repositories
+ * @return a list with a small summary (added/deleted/enabled/disabled repos)
+ */
+global list<string> checkCatalogs(map taskList, string service)
+{
+ list<string> cSummary = [];
+ map catalogToEnable = $[];
+ map catalogToDisable = $[];
+
+ foreach (string catalog, any pAny, taskList, {
+ if ( ! is(pAny, map) )
+ {
+ y2error("A catalog returned by SuseRegister did not contain any details: %1", catalog);
+ }
+ else if ( catalog == nil || catalog == "" )
+ {
+ y2error("A catalog returned by SuseRegister has no or an invalid name.");
+ }
+ else
+ {
+ map catDetail = (map) pAny;
+
+ if ( catDetail["ALIAS"]:"" == nil || catDetail["ALIAS"]:"" == "" )
+ {
+ y2error("A catalog returned by SuseRegister has no or an invalid alias name.");
+ }
+ else
+ {
+ if ( catDetail["TASK"]:"" == nil || catDetail["TASK"]:"" == "" )
+ {
+ y2error("A catalog returned by SuseRegister has an invalid task: %1", catalog);
+ }
+ else if ( catDetail["TASK"]:"" == "le" || catDetail["TASK"]:"" == "le" )
+ {
+ y2milestone("According to SuseRegister a catalog does not need to be changed: %1 (%2)", catalog, service);
+ }
+ else if ( catDetail["TASK"]:"" == "a" )
+ {
+ y2milestone("According to SuseRegister a catalog has to be enabled: %1 (%2)", catalog, service);
+ catalogToEnable[service] = add(catalogToEnable[service]:[], catalog);
+ cSummary = add(cSummary, sformat(_("Enabled catalog: %1 (%2)"), catalog, service) );
+ }
+ else if ( catDetail["TASK"]:"" == "d" )
+ {
+ y2milestone("According to SuseRegister a service has to be disabled: %1 (%2)", catalog, service);
+ catalogToDisable[service] = add(catalogToDisable[service]:[], catalog);
+ cSummary = add(cSummary, sformat(_("Disabled catalog: %1 (%2)"), catalog, service) );
+ }
+ else
+ {
+ y2error("A catalog returned by SuseRegister has an unsupported task: %1 (%2)", catalog, service);
+ }
+ }
+ }
+ });
+
+
+ foreach (string fService, list<string> fCatalogs, catalogToDisable, {
+ string toDisableString = "\"" + mergestring(fCatalogs, "\" \"") + "\"";
+ integer retval = (integer) SCR::Execute(.target.bash, sformat(" [ -f /etc/zypp/services.d/%1.service ] && cat >> /etc/zypp/services.d/%2.service <> /etc/zypp/services.d/%1.service <>>>> FIXME check catalogs!!!!!!!!
- // --> just iterate over catalogs
- // TODO
-
+ any catalogsMap = ((map) pAny)["CATALOGS"]:$[];
+ if ( is( catalogsMap , map) && catalogsMap != $[] )
+ {
+ y2milestone("A service returned by SuseRegister has catalogs that will be checked now.");
+ list<string> cSummary = checkCatalogs( (map) catalogsMap, pService );
+ summary = (list<string>) merge(summary, cSummary);
+ }
+ else
+ {
+ y2error("A service returned by SuseRegister did not contain any catalogs.");
+ }
}
else if ( ((map) pAny)["TASK"]:"" == "a" )
{
@@ -968,11 +1078,15 @@
{
y2milestone("Successfully added a new service: %1", pService);
y2milestone("Now checking the catalogs of the service: %1", pService);
- summary = add(summary, sformat(_("Added Service: %1"), pService ));
+ summary = add(summary, sformat(_("Added Service: %1"), pService ));
-// ------------------->>>>> FIXME check catalogs!!!!!!!!
- // need to save service to the system first -- is this be done with Pkg::SourceSaveAll() ?? service != source ??
+// ------------------->>>>> FIXME
+ // need to save service to the system first??
+ // documentation of Pkg::ServiceRefresh says : "Refresh the service, the service must already be saved on the system!"
+ // is this done with Pkg::SourceSaveAll() ??
+ // service != source ??
+/*
if ( Pkg::SourceSaveAll() )
{
y2milestone("Successfully saved all sources.");
@@ -981,10 +1095,11 @@
{
y2error("Could not save all sources.");
}
+*/
- // then need to call Pkg::ServiceRefresh()
-/*
- if ( Pkg::ServiceRefresh(pService) )
+ // then need to call Pkg::ServiceRefresh()
+ //if ( Pkg::ServiceRefresh(pService) )
+ if (true)
{
y2milestone("Successfully refreshed service: %1", pService);
}
@@ -992,9 +1107,19 @@
{
y2error("Could not refresh service: %1", pService);
}
-*/
- // then iterate over catalogs
- // TODO
+
+ // then iterate over catalogs
+ any catalogsMap = ((map) pAny)["CATALOGS"]:$[];
+ if ( is( catalogsMap , map) && catalogsMap != $[] )
+ {
+ y2milestone("A new service returned by SuseRegister has catalogs that will be checked now.");
+ list<string> cSummary = checkCatalogs( (map) catalogsMap, pService );
+ summary = (list<string>) merge(summary, cSummary);
+ }
+ else
+ {
+ y2error("A new service returned by SuseRegister did not contain any catalogs.");
+ }
}
else
@@ -1011,7 +1136,7 @@
if ( Pkg::ServiceDelete(pService) )
{
y2milestone("Successfully deleted a service: %1", pService);
- summary = add(summary, sformat(_("Deleted Service: %1"), pService ));
+ summary = add(summary, sformat(_("Deleted Service: %1"), pService ));
}
else
{
@@ -1042,13 +1167,13 @@
*/
global integer suseRegister(symbol parameter)
{
- // FIXME -- THERE __MUST__ BE A SOURCE REFREH BEFORE INITIALIZING SUSEREGISTER
-
+ list<integer> allCurrentSources = [];
map contextData = $[
"debug" : 0,
"nooptional" : (submit_optional ? 0:1),
"nohwdata" : (submit_hwdata ? 0:1),
"forceregistration" : (force_registration ? 1:0),
+ "norefresh" : 1,
"yastcall" : 1,
"logfile" : "/root/.suse_register.log"
];
@@ -1069,6 +1194,16 @@
if (! isInitializedSR || contextData != contextDataSR )
{
+ if ( ! isInitializedSR )
+ {
+ // refresh all sources/services _once_ before interacting with SuseRegister
+ allCurrentSources = Pkg::SourceStartCache(true);
+ foreach ( integer srcID, allCurrentSources, {
+ y2milestone("Refreshing source with ID: %1", srcID);
+ Pkg::SourceForceRefreshNow(srcID);
+ });
+ }
+
// initialize SuseRegister
contextDataSR = contextData;
y2milestone("Initializing SuseRegister with this context data: %1", contextDataSR);
@@ -1090,10 +1225,8 @@
}
}
-
// ----==== handle modes for suseRegister ====----
-
// special mode for list-params
// only makes sure registration is initialized
if (parameter == `listparams)
@@ -1142,9 +1275,19 @@
if ( parameter == `autoyast )
{
- string foo="bar";
- // TODO
- // call the function to sync the sources from here or from the Write function
+ y2milestone("SuseRegister was called in autoYaST mode. The overall registration satus is: %1", initialSRstatus);
+ if ( initialSRstatus == 1 )
+ {
+ y2error("Manual interaction is required for proper registration which is not possible during autoYaST. Please register manually.");
+ }
+ y2milestone("All sources will be refreshed now.");
+
+ // refresh all sources/services
+ allCurrentSources = Pkg::SourceStartCache(true);
+ foreach ( integer srcID, allCurrentSources, {
+ y2milestone("Refreshing source with ID: %1", srcID);
+ Pkg::SourceForceRefreshNow(srcID);
+ });
}
y2milestone("SuseRegister status: %1", initialSRstatus);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-registration-2.17.1/VERSION new/yast2-registration-2.17.2/VERSION
--- old/yast2-registration-2.17.1/VERSION 2008-10-08 23:39:05.000000000 +0200
+++ new/yast2-registration-2.17.2/VERSION 2008-10-13 18:38:27.000000000 +0200
@@ -1 +1 @@
-2.17.1
+2.17.2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org