Author: lslezak
Date: Wed Jul 20 14:05:51 2011
New Revision: 64919
URL: http://svn.opensuse.org/viewcvs/yast?rev=64919&view=rev
Log:
backport from SP2 branch:
- added new core/full migration selection dialog (fate#311994)
- if the system is managed by SUSE Manager display a message
and exit (fate#311994)
- added a new client for selecting DUP repositories (fate#311994)
- added a new client for checking registration status before
starting migration (fate#309594)
- implemented download in advance mode support (fate#308951)
- 2.17.17.1
Added:
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_dup_repositories.ycp
- copied unchanged from r64915, branches/SuSE-Code-11-SP2-Branch/wagon/src/clients/wagon_dup_repositories.ycp
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_registration_check.ycp
- copied unchanged from r64915, branches/SuSE-Code-11-SP2-Branch/wagon/src/clients/wagon_registration_check.ycp
branches/SuSE-Code-11-SP1-Branch/wagon/src/include/wagon_helpers.ycp
- copied unchanged from r64915, branches/SuSE-Code-11-SP2-Branch/wagon/src/include/wagon_helpers.ycp
branches/SuSE-Code-11-SP1-Branch/wagon/src/modules/RegistrationStatus.pm
- copied unchanged from r64915, branches/SuSE-Code-11-SP2-Branch/wagon/src/modules/RegistrationStatus.pm
branches/SuSE-Code-11-SP1-Branch/wagon/testsuite/tests/FindMountPoint.err
- copied unchanged from r64915, branches/SuSE-Code-11-SP2-Branch/wagon/testsuite/tests/FindMountPoint.err
branches/SuSE-Code-11-SP1-Branch/wagon/testsuite/tests/FindMountPoint.out
- copied unchanged from r64915, branches/SuSE-Code-11-SP2-Branch/wagon/testsuite/tests/FindMountPoint.out
branches/SuSE-Code-11-SP1-Branch/wagon/testsuite/tests/FindMountPoint.ycp
- copied unchanged from r64915, branches/SuSE-Code-11-SP2-Branch/wagon/testsuite/tests/FindMountPoint.ycp
Modified:
branches/SuSE-Code-11-SP1-Branch/wagon/ (props changed)
branches/SuSE-Code-11-SP1-Branch/wagon/VERSION
branches/SuSE-Code-11-SP1-Branch/wagon/package/yast2-wagon.changes
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_registration_handler.ycp
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_repositories_handler.ycp
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_update_proposal.ycp
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/welcome_in_wagon.ycp
branches/SuSE-Code-11-SP1-Branch/wagon/src/config/online_migration.xml
branches/SuSE-Code-11-SP1-Branch/wagon/src/modules/Makefile.am
branches/SuSE-Code-11-SP1-Branch/wagon/src/modules/Wagon.ycp
branches/SuSE-Code-11-SP1-Branch/wagon/yast2-wagon.spec.in
Modified: branches/SuSE-Code-11-SP1-Branch/wagon/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon/VERSION?rev=64919&r1=64918&r2=64919&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/VERSION (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/VERSION Wed Jul 20 14:05:51 2011
@@ -1 +1 @@
-2.17.18
+2.17.17.1
Modified: branches/SuSE-Code-11-SP1-Branch/wagon/package/yast2-wagon.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon/package/yast2-wagon.changes?rev=64919&r1=64918&r2=64919&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/package/yast2-wagon.changes (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/package/yast2-wagon.changes Wed Jul 20 14:05:51 2011
@@ -1,8 +1,20 @@
-------------------------------------------------------------------
+Wed Jul 20 11:45:47 UTC 2011 - lslezak@suse.cz
+
+- added new core/full migration selection dialog (fate#311994)
+- if the system is managed by SUSE Manager display a message
+ and exit (fate#311994)
+- added a new client for selecting DUP repositories (fate#311994)
+- added a new client for checking registration status before
+ starting migration (fate#309594)
+- implemented download in advance mode support (fate#308951)
+- do not allow to continue without package lock (BNC #616982)
+- 2.17.17.1
+
+-------------------------------------------------------------------
Mon Jan 3 15:32:13 CET 2011 - locilka@suse.cz
- Do not allow to continue without package lock (BNC #616982)
-- 2.17.18
-------------------------------------------------------------------
Mon Mar 15 13:28:41 CET 2010 - locilka@suse.cz
Modified: branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_registration_handler.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_registration_handler.ycp?rev=64919&r1=64918&r2=64919&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_registration_handler.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_registration_handler.ycp Wed Jul 20 14:05:51 2011
@@ -57,6 +57,16 @@
return sort (ret);
}
+ list<string> AddedRepos(list<string> prev, list<string> curr)
+ {
+ list<string> ret = [];
+
+ // added repos = all current which were not in the previous state
+ ret = filter(string curr_repo, curr, {return !contains(prev, curr_repo);});
+
+ return ret;
+ }
+
// all repository aliases
list <string> all_repos = GetCurrentlyEnabledReposByAlias();
y2milestone ("Currently registered repositories: %1", all_repos);
@@ -91,7 +101,13 @@
list <string> current_repos = GetCurrentlyEnabledReposByAlias();
if (all_repos != current_repos) {
Wagon::repos_already_registered = true;
+
+ // remember the added repositories
+ list<string> added = AddedRepos(all_repos, current_repos);
+ Wagon::SetRegistrationRepos(added);
+
y2milestone ("List of repositories has changed: %1", current_repos);
+ y2milestone("Added repositories: %1", added);
break;
}
Modified: branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_repositories_handler.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_repositories_handler.ycp?rev=64919&r1=64918&r2=64919&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_repositories_handler.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_repositories_handler.ycp Wed Jul 20 14:05:51 2011
@@ -41,7 +41,7 @@
// Mode::SetMode ("normal");
y2milestone ("Running repositories...");
ret = (symbol) WFM::call ("repositories");
- y2milestone ("Script inst_suse_register returned: %1", ret);
+ y2milestone ("Script repositories returned: %1", ret);
// Mode::SetMode ("update");
if (ret == `cancel || ret == `abort) {
Modified: branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_update_proposal.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_update_proposal.ycp?rev=64919&r1=64918&r2=64919&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_update_proposal.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_update_proposal.ycp Wed Jul 20 14:05:51 2011
@@ -20,6 +20,7 @@
import "Wagon";
import "Report";
+ import "PackageInstallation";
string func = (string) WFM::Args(0);
map param = (map) WFM::Args(1);
@@ -40,11 +41,23 @@
}
Wagon::ProposeDUP();
+ Wagon::ProposeDownloadMode();
ret = Wagon::ProposalSummary();
} else if (func == "AskUser") {
- Report::Message (_("There is nothing to set."));
+ string chosen_id = param["chosen_id"]:"";
+
+ // toggle the download mode status
+ if (chosen_id == Wagon::GetDownloadModeLink())
+ {
+ PackageInstallation::SetDownloadInAdvance(!PackageInstallation::DownloadInAdvance());
+ }
+ else
+ {
+ Report::Message (_("There is nothing to set."));
+ }
+
ret = $[ "workflow_sequence" : `next ];
} else if (func == "Description") {
Modified: branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/welcome_in_wagon.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/welcome_in_wagon.ycp?rev=64919&r1=64918&r2=64919&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/welcome_in_wagon.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/welcome_in_wagon.ycp Wed Jul 20 14:05:51 2011
@@ -21,6 +21,7 @@
import "Popup";
import "Wagon";
import "Report";
+ import "FileUtils";
textdomain "wagon";
@@ -41,6 +42,18 @@
GetInstArgs::enable_back(), GetInstArgs::enable_next());
Wizard::EnableAbortButton ();
+ // file /etc/sysconfig/rhn/systemid means the system is managed by SUSE Manager
+ if (FileUtils::Exists("/etc/sysconfig/rhn/systemid"))
+ {
+ y2milestone("File /etc/sysconfig/rhn/systemid found, aborting wagon");
+
+ // warning message, system managed by SUSE Manager cannot be migrated by wagon
+ // display this message and exit
+ Popup::Message(_("This system is managed by SUSE Manager,\nYaST wagon module cannot migrate systems managed by SUSE Manager.\n\nPress OK to exit."));
+
+ return (any)`back;
+ }
+
any ret = nil;
while (true) {
Modified: branches/SuSE-Code-11-SP1-Branch/wagon/src/config/online_migration.xml
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon/src/config/online_migration.xml?rev=64919&r1=64918&r2=64919&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/src/config/online_migration.xml (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/src/config/online_migration.xml Wed Jul 20 14:05:51 2011
@@ -28,10 +28,13 @@
<name>running_by_applet</name>
<modules config:type="list">
<module>welcome</module>
+ <module>registration_check</module>
<module>update_online_mechanism</module>
<module>install_migration_products</module>
<module>suse_register_workflow</module>
+ <module>wagon_dup_repositories</module>
<module>wagon_modify_repositories</module>
+
<module>prepare_progress</module>
<module>point_of_no_return</module>
<module>wagon_kickoff</module>
@@ -55,14 +58,17 @@
<name>manual</name>
<modules config:type="list">
<module>welcome</module>
+ <module>registration_check</module>
<module>update_online_mechanism</module>
<module>install_migration_products</module>
<!-- Workflow is tuned after this module -->
<module>update_url_dialog</module>
<module>suse_register_workflow</module>
<module>wagon_manual_url_repositories</module>
+ <module>wagon_dup_repositories</module>
<module>wagon_modify_repositories</module>
<module>wagon_check_repositories</module>
+
<module>prepare_progress</module>
<module>point_of_no_return</module>
<module>wagon_kickoff</module>
@@ -84,8 +90,11 @@
<name>PatchCD</name>
<modules config:type="list">
<module>welcome</module>
+ <module>registration_check</module>
<module>wagon_custom_url</module>
<module>wagon_selfupdate_from_url</module>
+ <module>wagon_dup_repositories</module>
+
<module>prepare_progress</module>
<module>point_of_no_return</module>
<module>wagon_kickoff</module>
@@ -162,6 +171,12 @@
no
</module>
+ <module>
+ <label>Registration Check</label>
+ <name>registration_check</name>
+ <execute>wagon_registration_check</execute>
+ </module>
+
<!-- Update itself -->
<module>
<label>Renew Update Stack</label>
@@ -244,6 +259,12 @@
</module>
<module>
+ <label>Migration Configuration</label>
+ <name>wagon_dup_repositories</name>
+ <execute>wagon_dup_repositories</execute>
+ </module>
+
+ <module>
<heading>yes</heading>
<label>Migration</label>
</module>
Modified: branches/SuSE-Code-11-SP1-Branch/wagon/src/modules/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon/src/modules/Makefile.am?rev=64919&r1=64918&r2=64919&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/src/modules/Makefile.am (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/src/modules/Makefile.am Wed Jul 20 14:05:51 2011
@@ -2,8 +2,16 @@
# Makefile.am for wagon/src/modules
#
-module_DATA = $(wildcard *.ycp)
+module_DATA = Wagon.ycp RegistrationStatus.pm
EXTRA_DIST = $(module_DATA)
+YCPCFLAGS = -I .
+
+ycpchook = wagon
+
+wagon:
+ ln -s ../include wagon
+
+
include $(top_srcdir)/Makefile.am.common
Modified: branches/SuSE-Code-11-SP1-Branch/wagon/src/modules/Wagon.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon/src/modules/Wagon.ycp?rev=64919&r1=64918&r2=64919&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/src/modules/Wagon.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/src/modules/Wagon.ycp Wed Jul 20 14:05:51 2011
@@ -31,6 +31,11 @@
import "Update";
import "FileUtils";
import "String";
+ import "Packages";
+ import "PackageInstallation";
+ import "RegistrationStatus";
+
+ include "wagon/wagon_helpers.ycp";
boolean running_by_applet = false;
@@ -75,6 +80,13 @@
return update_workflow_type;
}
+ const string download_mode_link = "wagon-download_in_advance";
+
+ global define string GetDownloadModeLink()
+ {
+ return download_mode_link;
+ }
+
string migration_method = nil;
global string migration_method_file = sformat ("%1/wagon_migration_method", Directory::vardir);
@@ -98,6 +110,35 @@
return migration_method;
}
+ // do the distribution upgrade from selected repositories
+ list<integer> dup_repos = [];
+
+ global list<integer> DupRepos()
+ {
+ return dup_repos;
+ }
+
+ global void SetDupRepos(list<integer> repos)
+ {
+ dup_repos = repos;
+ }
+
+ // list of repositories (aliases) added by suse_register
+ list<string> new_registration_repos = [];
+
+ // returns list of repositories (aliases) added by suse_register
+ global list<string> RegistrationRepos()
+ {
+ return new_registration_repos;
+ }
+
+ // set list of repositories (aliases) added by suse_register
+ global void SetRegistrationRepos(list<string> repos)
+ {
+ y2milestone("Repositories added by registration: %1", new_registration_repos);
+ new_registration_repos = repos;
+ }
+
void ResetWorkflowSteps () {
ProductControl::UnDisableAllModulesAndProposals (Mode::mode(), Stage::stage());
}
@@ -369,16 +410,100 @@
return true;
}
- map update_conf = GetUpdateConf();
+ // reset upgrade repo config
+ y2milestone("Resetting upgrade repos config");
+ list<integer> repos = Pkg::GetUpgradeRepos();
+ foreach(integer repo, repos, {Pkg::RemoveUpgradeRepo(repo);});
+
+ // all repositories selected for upgrade?
+ if (sort(Pkg::SourceGetCurrent(true)) == sort(dup_repos))
+ {
+ // reset solver flags (needed when switching from full DUP to partial DUP
+ Pkg::SetSolverFlags($["reset" : true]);
+
+ // do full distribution upgrade
+ map update_conf = GetUpdateConf();
+ map update_sum = Pkg::PkgUpdateAll (update_conf);
+ y2milestone ("Update configuration: %1, update summary: %2", update_conf, update_sum);
+ }
+ else
+ {
+ // do partial DUP
+ // add upgrade repositories
+ y2milestone("Adding upgrade repos: %1", dup_repos);
+ foreach(integer repo, dup_repos, {Pkg::AddUpgradeRepo(repo);});
+
+ // be compatible with "zypper dup --from"
+ Pkg::SetSolverFlags($["ignoreAlreadyRecommended" : true]);
+ }
- map update_sum = Pkg::PkgUpdateAll (update_conf);
- y2milestone ("Update configuration: %1, update summary: %2", update_conf, update_sum);
+ Pkg::PkgSolve(true);
already_proposed = true;
return true;
}
+ map CheckDownloadSpace()
+ {
+ // display a warning if estimated free size after migration is below 100MB
+ integer min_free_space = 100 << 20;
+
+ map du = Pkg::TargetGetDU();
+ list<string> mounts = maplist(string dir, list info, du, {return dir;});
+
+ map zconfig = Pkg::ZConfig();
+ string pkg_path = zconfig["repo_packages_path"]:"";
+
+ string packages_mount = FindMountPoint(pkg_path, mounts);
+ y2milestone("Packages will we downloaded to %1 (mountpoint %2)", pkg_path, packages_mount);
+
+ // download size in bytes
+ integer download_size = Packages::CountSizeToBeDownloaded();
+ y2milestone("Size of packages to download: %1MB", download_size >> 20);
+
+ // du contains maps: $[ "dir" : [ total, used, pkgusage, readonly ], .... ]
+ integer after_install = du[packages_mount, 2]:0;
+ integer total = du[packages_mount, 0]:0;
+ y2milestone("Size after installation: %1MB (of %2MB)", after_install >> 20, total >> 20);
+
+ symbol result = `ok;
+ string message = "";
+
+ if (after_install + download_size < total)
+ {
+ result = `error;
+ message = sformat(_("There is not enough free space to migrate the system using download in advance mode. Partition %1 needs at least %2MB more free disk space. (The needed size is estimated, it is recommended to add slightly more free space.) Add more disk space or disable download in advance mode."),
+ packages_mount, (after_install + download_size - total) >> 20);
+ y2error("Not enough free space for download in advance upgrade: "
+ + "estimated size after installation: %1MB, download size: %2MB, "
+ + "total size: %3MB, estimated free space: %4MB", after_install >> 20,
+ download_size >> 20, total >> 20, (total - after_install - download_size) >> 20);
+ }
+ else if (after_install + download_size + min_free_space < total)
+ {
+ result = `warning;
+ message = sformat(_("There might not be enough free space for download in advance mode migration. The estimated free space after migration is %2MB, it is recommended to increase the free space in case the estimation is inaccurate to avoid installation errors."),
+ (total - after_install - download_size) >> 20);
+ y2warning("Low free space: estimated size after installation: %1MB, "
+ + "download size: %2MB, total size: %3MB, estimated free space: %4MB",
+ after_install >> 20, download_size >> 20, total >> 20, (total - after_install - download_size) >> 20);
+ }
+
+ return $[ "result" : result, "message" : message ];
+ }
+
+ global void ProposeDownloadMode()
+ {
+ if (PackageInstallation::DownloadInAdvance() == nil)
+ {
+ map dwspace = CheckDownloadSpace();
+
+ PackageInstallation::SetDownloadInAdvance(dwspace["result"]:nil == `ok);
+ y2milestone("Proposed download in advance mode: %1", PackageInstallation::DownloadInAdvance());
+ }
+ }
+
global map MinimizeProductMap (map product) {
if (haskey (product, "license")) product["license"] = "...";
if (haskey (product, "description")) product["description"] = "...";
@@ -510,9 +635,14 @@
ret = "<ul>\n" + ret + "</ul>\n";
+ ret = ret + "<ul><li>\n" + _("Download all packages before upgrade: ") +
+ sformat("%2</a>", download_mode_link, (PackageInstallation::DownloadInAdvance() ? _("Enabled") : _("Disabled")))
+ + "</li></ul>\n";
+
map summary = $[
"preformatted_proposal" : ret,
- // help text
+ "links" : [ download_mode_link ],
+ // help text, TODO FIXME: replace the inner <p> by <b>
"help" : _("<p>To change the update settings, go to <p>Packages Proposal</p> section.</p>"),
];
@@ -630,5 +760,131 @@
return true;
}
+
+ /*
+ * Read registration status and sort products according their status
+ * @param file Read this registration status file
+ * @return map result: $[
+ *
+ "registered_system" : (boolean) - true registration was run, false registration has never run or there is no product to register (e.g. openSUSE installation) or the registration completely failed
+ "timestamp" : (integer) - time when the status was saved (unix time), -1 in an unregistered system
+ "registered" : (list<string>) - registered products
+ "provisional" : (list<string>) - products with provisional subscription (registered, but no updates available)
+ "rma" : (list<string>) - refunded subscriptions, not active anymore
+ "expired" : (list<string>) - expired subscriptions
+ "no_subscription" : (list<string>) - products which do not need a subscription (e.g. SLES-SDK)
+ "failed" : (list<string>) - registration failed (e.g. invalid registration code)
+ * ]
+ */
+ global define map RegistrationStatusFromFile(string file)
+ {
+ boolean registered_system = true;
+ integer timestamp = -1;
+
+ list<string> failed = [];
+ list<string> no_subscription = [];
+ list<string> expired = [];
+ list<string> rma = [];
+ list<string> provisional = [];
+ list<string> registered = [];
+
+ // 0 = empty file, -1 = missing
+ if (FileUtils::GetSize(file) <= 0)
+ {
+ y2milestone("File %1 does not exist", file);
+ registered_system = false;
+ }
+ else
+ {
+ // read the registration status
+ // see https://wiki.innerweb.novell.com/index.php/Registration#Add_Registration_Sta...
+ // for more datils about the file format
+ map status = RegistrationStatus::ReadFile(file);
+
+ timestamp = tointeger(status["generated"]:"-1");
+ list<map> products = status["productstatus"]:[];
+
+ // check each product
+ foreach(map product, products,
+ {
+ string product_name = product["product"]:"";
+
+ // not registered (error present, but not "expired")
+ if (product["result"]:"" == "error" && product["errorcode"]:"" != "ERR_SUB_EXP")
+ {
+ failed = add(failed, product_name);
+ }
+ else
+ {
+ // registered, but subscription is not needed (e.g. SLES-SDK)
+ if (product["subscription"]:$[] == $[])
+ {
+ no_subscription = add(no_subscription, product_name);
+ }
+ else
+ {
+ string status = product["subscription", "status"]:"";
+ string expiration = product["subscription", "expiration"]:"";
+
+ // expired subscription (status == EXPIRED or the timestamp is in the past)
+ if (status == "EXPIRED" || (expiration != "" && tointeger(expiration) < time()))
+ {
+ expired = add(expired, product_name);
+ }
+ else if (status == "RMA")
+ {
+ rma = add(rma, product_name);
+ }
+ else
+ {
+ string type = product["subscription", "type"]:"";
+
+ // provisional subscription
+ if (type == "PROVISIONAL")
+ {
+ provisional = add(provisional, product_name);
+ }
+ else
+ {
+ registered = add(registered, product_name);
+ }
+ }
+ }
+ }
+ }
+ );
+ }
+
+ return $[
+ "registered_system" : registered_system,
+ "timestamp" : timestamp,
+ "registered" : registered,
+ "provisional" : provisional,
+ "rma" : rma,
+ "expired" : expired,
+ "no_subscription" : no_subscription,
+ "failed" : failed
+ ];
+
+ }
+
+ /*
+ * Read registration status from /var/lib/suseRegister/registration-status.xml and sort products according their status
+ * @return map result: $[
+ *
+ "registered_system" : (boolean) - true registration was run, false registration has never run or there is no product to register (e.g. openSUSE installation) or the registration completely failed
+ "timestamp" : (integer) - time when the status was saved (unix time), -1 in an unregistered system
+ "registered" : (list<string>) - registered products
+ "provisional" : (list<string>) - products with provisional subscription (registered, but no updates available)
+ "rma" : (list<string>) - refunded subscriptions, not active anymore
+ "expired" : (list<string>) - expired subscriptions
+ "no_subscription" : (list<string>) - products which do not need a subscription (e.g. SLES-SDK)
+ "failed" : (list<string>) - registration failed (e.g. invalid registration code)
+ * ]
+ */
+ global define map RegistrationStatus()
+ {
+ return RegistrationStatusFromFile(RegistrationStatus::RegFile());
+ }
/* EOF */
}
Modified: branches/SuSE-Code-11-SP1-Branch/wagon/yast2-wagon.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon/yast2-wagon.spec.in?rev=64919&r1=64918&r2=64919&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/yast2-wagon.spec.in (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/yast2-wagon.spec.in Wed Jul 20 14:05:51 2011
@@ -4,11 +4,17 @@
# PackagesUI::RunPackageSelector
Requires: yast2 >= 2.17.40
Requires: yast2-online-update-frontend >= 2.17.9
-# <upgrades> section from product file
-Requires: yast2-pkg-bindings >= 2.17.44
+# Pkg::AddUpgradeRepo()
+Requires: yast2-pkg-bindings >= 2.17.45.1
+# Pkg::AddUpgradeRepo()
+BuildRequires: yast2-pkg-bindings >= 2.17.45.1
+
+BuildRequires: perl-XML-Simple
+Requires: perl-XML-Simple
# Called in proposal and in code
-Requires: yast2-packager yast2-add-on
+Requires: yast2-packager >= 2.17.78.1
+Requires: yast2-add-on
# Counting packages directly in packages proposal (BNC #573482)
Requires: yast2-update >= 2.17.19
@@ -47,6 +53,7 @@
@clientdir@/*.ycp
@moduledir@/*.ycp
@moduledir@/*.ybc
+@moduledir@/*.pm
%dir @yncludedir@/wagon
@yncludedir@/wagon/*.ycp
%dir /usr/share/YaST2/control
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org