Mailinglist Archive: yast-devel (121 mails)

< Previous Next >
[yast-devel] Re: [yast-commit] r64445 - in /trunk/wagon: package/yast2-wagon.changes src/Makefile.am src/clients/wagon_registration_check.ycp src/config/online_migration-SLE.xml src/config/online_migration-openSUSE.xml
On Fri, Jun 17, 2011 at 11:49:46AM -0000, lslezak@xxxxxxxxxxxxxxxxx wrote:
Author: lslezak
Date: Fri Jun 17 13:49:46 2011
New Revision: 64445

URL: http://svn.opensuse.org/viewcvs/yast?rev=64445&view=rev
Log:
added a new client for checking registration status before starting migration
(fate#309594)


Added: trunk/wagon/src/clients/wagon_registration_check.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/wagon/src/clients/wagon_registration_check.ycp?rev=64445&view=auto
==============================================================================
--- trunk/wagon/src/clients/wagon_registration_check.ycp (added)
+++ trunk/wagon/src/clients/wagon_registration_check.ycp Fri Jun 17 13:49:46
2011

+ define boolean OutdatedStatus(map<string,any> status)

Please document the format of status.
In a previous commit, I found a reference to

https://wiki.innerweb.novell.com/index.php/Registration#Add_Registration_Status_to_zmdconfig
which is not readable publicly.
Additionally, it only documents the XML format and who remembers how
XML::Simple presents it in a map?

It would be unmaintainable to repeat the description everywhere but
I think at least each file should have reference.

+ {
+ // missing data, we cannot tell if it's outdated, suppose not
+ if (!haskey(status, "timestamp") || status["timestamp"]:0 <= 0)
+ {
+ return false;
+ }
+
+ boolean ret = status["timestamp"]:time() + max_age < time();
+ y2milestone("Registration status is outdated: %1", ret);
+
+ return ret;
+ }

... especially if it is then used all over the place:

+ define list<map<string,any> > UnknownProducts(map<string,any> status)
+ define string RegistrationSummary(map<string,any> status)
+ define void SetContent(map<string,any> status)
+ define symbol RegistrationSummaryDialog(map<string,any> status)
+ define boolean Interactive(map<string,any> status)
--
Martin Vidner, YaST developer
http://en.opensuse.org/User:Mvidner

Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
< Previous Next >
This Thread
  • No further messages