Author: jdsn Date: Thu Nov 12 20:34:43 2009 New Revision: 59509 URL: http://svn.opensuse.org/viewcvs/yast?rev=59509&view=rev Log: fix stateless registration api Modified: trunk/registration/package/yast2-registration.changes trunk/registration/src/modules/YSR.pm Modified: trunk/registration/package/yast2-registration.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/package/yast2-registration.changes?rev=59509&r1=59508&r2=59509&view=diff ============================================================================== --- trunk/registration/package/yast2-registration.changes (original) +++ trunk/registration/package/yast2-registration.changes Thu Nov 12 20:34:43 2009 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Nov 12 20:32:57 CET 2009 - jdsn@suse.de + +- fix catalog checks in stateless registration API +- fix XML format in stateless registration API + +------------------------------------------------------------------- Thu Nov 5 17:28:43 CET 2009 - jdsn@suse.de - fix XML format for stateless registration API Modified: trunk/registration/src/modules/YSR.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/src/modules/YSR.pm?rev=59509&r1=59508&r2=59509&view=diff ============================================================================== --- trunk/registration/src/modules/YSR.pm (original) +++ trunk/registration/src/modules/YSR.pm Thu Nov 12 20:34:43 2009 @@ -260,8 +260,9 @@ if ( $exitcode == 0 ) { + # successful registration, so we need to save the last ZMD config + $self->saveLastZmdConfig(); $tasklist = $self->getTaskList() || {}; - my $ret = $self->changerepos($tasklist); if ( ref($ret) eq 'HASH' ) @@ -277,6 +278,15 @@ ${$regret}{'repochangeerrors'} = $errcount if $errcount > 0; } + # prepare the tasklist for XML conversion + foreach my $k (keys %{$tasklist}) + { + if (exists ${${$tasklist}{$k}}{'CATALOGS'} ) + { + ${${$tasklist}{$k}}{'CATALOGS'} = { 'catalog' => ${${$tasklist}{$k}}{'CATALOGS'} }; + } + } + ${$regret}{'success'} = 'Successfully ran registration'; ${$regret}{'tasklist'} = XMLout( {'item' => $tasklist}, rootname => 'tasklist', KeyAttr => { item => "+ALIAS" }, NoAttr => 1); } @@ -472,6 +482,7 @@ foreach $catalog (keys %{$todo}) { + $pAny = ${$todo}{$catalog}; if ( not defined $catalog || $catalog eq '' ) { push @log, "A catalog returned by SuseRegister has no or an invalid name."; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org