Mailinglist Archive: yast-commit (396 mails)

< Previous Next >
[yast-commit] r65107 - in /branches/SuSE-Code-11-SP1-Branch/wagon: ./ package/ src/clients/ src/include/ src/modules/
Author: lslezak
Date: Mon Aug 1 13:53:33 2011
New Revision: 65107

URL: http://svn.opensuse.org/viewcvs/yast?rev=65107&view=rev
Log:
backported fixes from SP2 branch

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_dup_repositories.ycp

branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_migration_products.ycp

branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_registration_check.ycp
branches/SuSE-Code-11-SP1-Branch/wagon/src/include/common_func.ycp
branches/SuSE-Code-11-SP1-Branch/wagon/src/modules/Wagon.ycp

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=65107&r1=65106&r2=65107&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/VERSION (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/VERSION Mon Aug 1 13:53:33 2011
@@ -1 +1 @@
-2.17.17.1
+2.17.17.2

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=65107&r1=65106&r2=65107&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 Mon Aug
1 13:53:33 2011
@@ -1,4 +1,19 @@
-------------------------------------------------------------------
+Mon Aug 1 11:40:57 UTC 2011 - lslezak@xxxxxxx
+
+- display solver error in the migration propsal, do not allow
+ starting migration when there is an unsolved problem (bnc#708676)
+- do not disable current repositories, minimal migration uses
+ "DUP from" feature so they can stay enabled (bnc#708632)
+- fixed registration status check when registering against SMT
+ (bnc#708888)
+- properly display selected migration type when going back in
+ the migration workflow (bnc#708667)
+- reset and repropose package selection when migration type is
+ changed (bnc#708641)
+- 2.17.17.2
+
+-------------------------------------------------------------------
Wed Jul 20 11:45:47 UTC 2011 - lslezak@xxxxxxx

- added new core/full migration selection dialog (fate#311994)

Modified:
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_dup_repositories.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_dup_repositories.ycp?rev=65107&r1=65106&r2=65107&view=diff
==============================================================================
---
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_dup_repositories.ycp
(original)
+++
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_dup_repositories.ycp
Mon Aug 1 13:53:33 2011
@@ -22,6 +22,7 @@
import "Wizard";
import "Popup";

+ include "wagon/common_func.ycp";

define list TableContent()
{
@@ -154,6 +155,8 @@
{
// heading text
string heading_text = _("Migration Type");
+ // full migration?
+ boolean full = sort(Wagon::DupRepos()) ==
sort(Pkg::SourceGetCurrent(true));

term contents = `VBox(
// frame label
@@ -163,9 +166,9 @@
`RadioButtonGroup(`id(`migration_type),
`VBox(
// radio button
- `Left(`RadioButton(`id(`minimal), _("&Minimal
migration (only the core packages)"), true)),
+ `Left(`RadioButton(`id(`minimal), _("&Minimal -
upgrade from repositories added by registration"), !full)),
// radio button
- `Left(`RadioButton(`id(`full), _("&Full
migration (all packages)")))
+ `Left(`RadioButton(`id(`full), _("&Full -
upgrade from all repositories"), full))
)
)
)
@@ -181,7 +184,9 @@
// help text
string help_text = "<p>" + _("Select the requested migration type.")
// help text
- + "</p><p>" + _("Minimal migration migrates only minimal set of
packages (the core packages providing basic system functionality), full
migration migrates all installed packages.") + "</p>";
+ + "</p><p>" + _("Minimal migration only uses the repositories added
by registration, full migration migrates all packages to the latest version
available in any enabled repository. Full migration might use third party
repositories.")
+ // help text
+ + "</p><p>" + _("Press <b>Advanced</b> button to manually select
the repositories used for upgrading.") + "</p>";

Wizard::SetContents (heading_text, contents, help_text,
GetInstArgs::enable_back(), GetInstArgs::enable_next());
@@ -193,8 +198,12 @@

symbol ret = nil;

+ list<integer> prev_dup_repos = Wagon::DupRepos();
+ boolean prev_manual_selection = Wagon::ManualRepoSelection();
+
while (true) {
- ret = (symbol)UI::UserInput();
+ // go to advanced config it was used previously
+ ret = (Wagon::ManualRepoSelection()) ? `advanced :
(symbol)UI::UserInput();

if (ret == `next)
{
@@ -207,6 +216,7 @@
// DUP: all repositories
y2milestone("Selected full migration, using %1
repositories", size(Pkg::SourceGetCurrent(true)));
Wagon::SetDupRepos(Pkg::SourceGetCurrent(true));
+ Wagon::SetManualRepoSelection(false);
}
else if (mtype == `minimal)
{
@@ -229,6 +239,7 @@
y2milestone("Converted aliases to ids: %1", added_repos);

Wagon::SetDupRepos(added_repos);
+ Wagon::SetManualRepoSelection(false);
}
else
{
@@ -255,14 +266,20 @@
y2milestone("Manual DUP repository selection selected");
ret = DupSelectionDialog();

- if (ret == `abort || ret == `close || ret == `next)
+ if (ret == `abort || ret == `close)
+ {
+ break;
+ }
+ else if (ret == `next)
{
+ Wagon::SetManualRepoSelection(true);
break;
}
else if (ret == `back)
{
// refresh the dialog
SetMigrationSelectionDialogContent();
+ Wagon::SetManualRepoSelection(false);
}
else
{
@@ -275,6 +292,15 @@
}
}

+ if (ret == `next && (prev_dup_repos != Wagon::DupRepos() ||
prev_manual_selection != Wagon::ManualRepoSelection()))
+ {
+ y2milestone("DUP repository config has been changed, repropose
package selection");
+ Wagon::ResetDUPProposal();
+
+ // reset current package selection
+ ResetPackager();
+ }
+
return ret;
}


Modified:
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_migration_products.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_migration_products.ycp?rev=65107&r1=65106&r2=65107&view=diff
==============================================================================
---
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_migration_products.ycp
(original)
+++
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_migration_products.ycp
Mon Aug 1 13:53:33 2011
@@ -290,9 +290,6 @@

ResetPackager();

- // Remembers all repositories that will be disabled later (after
registration run)
- FindOldRepositoriesToBeDisabled();
-
y2milestone ("Returning: %1", ret);

return ret;

Modified:
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_registration_check.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_registration_check.ycp?rev=65107&r1=65106&r2=65107&view=diff
==============================================================================
---
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_registration_check.ycp
(original)
+++
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_registration_check.ycp
Mon Aug 1 13:53:33 2011
@@ -232,6 +232,14 @@
// some other problem and user has to be informed about it
define boolean Interactive(map<string,any> status)
{
+ // SMT doesn't write /var/lib/suseRegister/registration-status.xml file
+ // so we cannot get any registration details, assume the system is
fully registered
+ if (status["ncc"]:nil == false)
+ {
+ y2milestone("SMT server is used, assuming fully registered system");
+ return false;
+ }
+
// the system is not registered at all
if (status["registered_system"]:false)
{

Modified: branches/SuSE-Code-11-SP1-Branch/wagon/src/include/common_func.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon/src/include/common_func.ycp?rev=65107&r1=65106&r2=65107&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/src/include/common_func.ycp
(original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/src/include/common_func.ycp Mon Aug
1 13:53:33 2011
@@ -126,24 +126,23 @@
);

y2milestone ("Reseting Pkg");
- Pkg::PkgApplReset();
- Pkg::PkgReset();

- symbol status = nil;
- string name = nil;
+ list<integer> repos = Pkg::GetUpgradeRepos();
+ if (size(repos) > 0)
+ {
+ y2milestone("Resetting upgrade repos config");
+ foreach(integer repo, repos, {Pkg::RemoveUpgradeRepo(repo);});
+ }

- y2milestone ("Neutralizing all resolvables");
- foreach (symbol resolvable, [`pattern, `patch, `package, `product,
`srcpackage], {
- Pkg::ResolvableNeutral ("" /* all */, resolvable, true /* force */);
- });
-
- y2milestone ("Running solver");
- Pkg::PkgSolve (true);
+ // reset solver flags
+ Pkg::SetSolverFlags($["reset" : true]);

Pkg::TargetFinish();
Pkg::SourceFinishAll();

Wagon::InitPkg();
+
+ y2milestone ("Running solver");
Pkg::PkgSolve (true);
}


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=65107&r1=65106&r2=65107&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 Mon Aug 1
13:53:33 2011
@@ -123,6 +123,20 @@
dup_repos = repos;
}

+ boolean manual_repo_selection = false;
+
+ // manual or automatic DUP repo selection?
+ global boolean ManualRepoSelection()
+ {
+ return manual_repo_selection;
+ }
+
+ global void SetManualRepoSelection(boolean manual)
+ {
+ y2milestone("Manual DUP repo selection: %1", manual);
+ manual_repo_selection = manual;
+ }
+
// list of repositories (aliases) added by suse_register
list<string> new_registration_repos = [];

@@ -437,7 +451,8 @@
Pkg::SetSolverFlags($["ignoreAlreadyRecommended" : true]);
}

- Pkg::PkgSolve(true);
+ // set the solve error flag for packages proposal
+ Update::solve_errors = Pkg::PkgSolve(true) ? 0 : Pkg::PkgSolveErrors();

already_proposed = true;

@@ -761,6 +776,50 @@
return true;
}

+ /**
+ * Check whether NCC or SMT is used for registration
+ */
+ define boolean NCCUsed()
+ {
+ // check /etc/suseRegister.conf content
+ string conf = (string)SCR::Read(.target.string,
"/etc/suseRegister.conf");
+
+ if (conf == nil)
+ {
+ y2error("Cannot read /etc/suseRegister.conf");
+ return nil;
+ }
+
+ list<string> lines = splitstring(conf, "\n");
+
+ boolean found_url = false;
+ boolean found_ncc = false;
+
+ foreach(string line, lines, {
+ if (regexpmatch(line, "^[ \t]*url[ \t]*=[ \t]*"))
+ {
+ found_url = true;
+ y2milestone("Found registration URL option: %1", line);
+
+ if (regexpmatch(line, "^[ \t]*url[ \t]*=[
\t]*https://secure-www.novell.com/center/regsvc/*[ \t]*(#*.*)*"))
+ {
+ found_ncc = true;
+ y2milestone("NCC URL found");
+ }
+ }
+ });
+
+ if (!found_url)
+ {
+ y2error("No url option found in /etc/suseRegister.conf");
+ return nil;
+ }
+
+ y2milestone("Found NCC registration server: %1", found_ncc);
+
+ return found_ncc;
+ }
+
/*
* Read registration status and sort products according their status
* @param file Read this registration status file
@@ -873,6 +932,7 @@
* @return map<string,any> 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
+ "ncc" : (boolean) - true - NCC is used for
registration, false - a SMT server is configured, nil - not configured or other
error
"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)
@@ -884,7 +944,10 @@
*/
global define map<string,any> RegistrationStatus()
{
- return RegistrationStatusFromFile(RegistrationStatus::RegFile());
+ map<string,any> ret =
RegistrationStatusFromFile(RegistrationStatus::RegFile());
+ ret["ncc"] = NCCUsed();
+
+ return ret;
}
/* EOF */
}

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages