Mailinglist Archive: yast-commit (126 mails)

< Previous Next >
[yast-commit] r67609 - in /branches/SuSE-Code-11-SP2-Branch/wagon: VERSION package/yast2-wagon.changes src/clients/wagon_migration_products.ycp src/clients/wagon_selfupdate.ycp yast2-wagon.spec.in
Author: lslezak
Date: Thu Mar 8 17:16:32 2012
New Revision: 67609

URL: http://svn.opensuse.org/viewcvs/yast?rev=67609&view=rev
Log:
- do not downgrade release packages, avoid migrating again
(bnc#751147)
- 2.17.32

Modified:
branches/SuSE-Code-11-SP2-Branch/wagon/VERSION
branches/SuSE-Code-11-SP2-Branch/wagon/package/yast2-wagon.changes

branches/SuSE-Code-11-SP2-Branch/wagon/src/clients/wagon_migration_products.ycp
branches/SuSE-Code-11-SP2-Branch/wagon/src/clients/wagon_selfupdate.ycp
branches/SuSE-Code-11-SP2-Branch/wagon/yast2-wagon.spec.in

Modified: branches/SuSE-Code-11-SP2-Branch/wagon/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/wagon/VERSION?rev=67609&r1=67608&r2=67609&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/wagon/VERSION (original)
+++ branches/SuSE-Code-11-SP2-Branch/wagon/VERSION Thu Mar 8 17:16:32 2012
@@ -1 +1 @@
-2.17.31
+2.17.32

Modified: branches/SuSE-Code-11-SP2-Branch/wagon/package/yast2-wagon.changes
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/wagon/package/yast2-wagon.changes?rev=67609&r1=67608&r2=67609&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/wagon/package/yast2-wagon.changes
(original)
+++ branches/SuSE-Code-11-SP2-Branch/wagon/package/yast2-wagon.changes Thu Mar
8 17:16:32 2012
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Thu Mar 8 12:11:52 UTC 2012 - lslezak@xxxxxxx
+
+- do not downgrade release packages, avoid migrating again
+ (bnc#751147)
+- 2.17.32
+
+-------------------------------------------------------------------
Wed Mar 7 08:14:29 UTC 2012 - lslezak@xxxxxxx

- ensure that the migration products are removed (bnc#750746)

Modified:
branches/SuSE-Code-11-SP2-Branch/wagon/src/clients/wagon_migration_products.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/wagon/src/clients/wagon_migration_products.ycp?rev=67609&r1=67608&r2=67609&view=diff
==============================================================================
---
branches/SuSE-Code-11-SP2-Branch/wagon/src/clients/wagon_migration_products.ycp
(original)
+++
branches/SuSE-Code-11-SP2-Branch/wagon/src/clients/wagon_migration_products.ycp
Thu Mar 8 17:16:32 2012
@@ -57,16 +57,12 @@
return;
}

- // Product version is the same but release can be different
- // product map doesn't contain the release string. To be sure,
product will be reinstalled
y2milestone ("Upgrading product %1 version %2", product_name,
product_version);
- // The version is the same, release can be different
- if (Pkg::ResolvableInstall (product_name, `product) != true) {
- Report::Error (sformat(_("Cannot update installed product
%1."), product_name));
- return;
- }

- affected_products = affected_products + 1;
+ if (Pkg::ResolvableUpdate(product_name, `product))
+ {
+ affected_products = affected_products + 1;
+ }
});

return affected_products;

Modified:
branches/SuSE-Code-11-SP2-Branch/wagon/src/clients/wagon_selfupdate.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/wagon/src/clients/wagon_selfupdate.ycp?rev=67609&r1=67608&r2=67609&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/wagon/src/clients/wagon_selfupdate.ycp
(original)
+++ branches/SuSE-Code-11-SP2-Branch/wagon/src/clients/wagon_selfupdate.ycp Thu
Mar 8 17:16:32 2012
@@ -50,88 +50,19 @@

integer pkgs_affected = 0;

- map <string, list <string> > installed_versions = $[];
-
- boolean some_packages_selected = false;
-
foreach (string one_package, packages, {
- // All packages of the given name
- list <map <string, any> > respros = Pkg::ResolvableProperties
(one_package, `package, "");
-
- // All installed packages of the given name
- list <map <string, any> > installed = filter (map <string, any>
one_respro, respros, {
- return (one_respro["status"]:`unknown == `installed);
- });
-
- // All available packages of the given name
- list <map <string, any> > available = filter (map <string, any>
one_respro, respros, {
- return (one_respro["status"]:`unknown == `available);
- });
-
- // Such package is not installed
- if (size (installed) < 1) {
- y2milestone ("Package %1 is not installed", one_package);
- return;
- }
-
- // Er, installed but not available
- if (size (available) < 1) {
- y2warning ("Package %1 is installed but not available",
one_package);
- return;
- }
-
- // Remember the installed version(s)
- installed_versions[one_package] = maplist (map <string,any>
one_installed, installed, {
- return one_installed["version"]:"unknown";
- });
+ y2milestone ("Updating package %1", one_package);

- // Force upgrade/install
- y2milestone ("Selecting package %1 for installation", one_package);
- if (Pkg::ResolvableInstall (one_package, `package) == true) {
- some_packages_selected = true;
- } else {
- y2error ("Cannot install package %1", one_package);
+ if (Pkg::ResolvableUpdate(one_package, `package)) {
+ pkgs_affected = pkgs_affected + 1;
}
});

- if (some_packages_selected != true) {
- y2milestone ("No packages have been selected for upgrade");
- return pkgs_affected;
+ if (pkgs_affected > 0) {
+ // run the solver to check dependencies
+ SolverRunWithFeedback();
}

- // Calling solver to select the best version
- SolverRunWithFeedback();
-
- y2milestone ("Some packages have been selected, checking...");
-
- // Check whether the selected version is different to the already
installed one
- foreach (string one_package, list <string>
previously_installed_versions, installed_versions, {
- list <map <string, any> > respros = Pkg::ResolvableProperties
(one_package, `package, "");
-
- // All selected packages of the given name
- list <map <string, any> > selected = filter (map <string, any>
one_respro, respros, {
- return (one_respro["status"]:`unknown == `selected);
- });
-
- // The package of a given name is selected
- if (size (selected) > 0) {
- boolean selection_differs = false;
-
- foreach (map <string, any> one_selected, selected, {
- if (! contains (previously_installed_versions,
one_selected["version"]:"some-version")) {
- pkgs_affected = pkgs_affected + 1;
- selection_differs = true;
- break;
- }
- });
-
- if (selection_differs != true) {
- y2milestone ("Selection of packages doesn't differ,
neutralizing package: %1", one_package);
- Pkg::ResolvableNeutral (one_package, `package, false);
- }
- }
- });
-
return pkgs_affected;
}


Modified: branches/SuSE-Code-11-SP2-Branch/wagon/yast2-wagon.spec.in
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/wagon/yast2-wagon.spec.in?rev=67609&r1=67608&r2=67609&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/wagon/yast2-wagon.spec.in (original)
+++ branches/SuSE-Code-11-SP2-Branch/wagon/yast2-wagon.spec.in Thu Mar 8
17:16:32 2012
@@ -4,10 +4,10 @@
# String::FindMountPoint()
Requires: yast2 >= 2.17.110
Requires: yast2-online-update-frontend >= 2.17.9
-# Pkg::AddUpgradeRepo()
-Requires: yast2-pkg-bindings >= 2.17.48
-# Pkg::AddUpgradeRepo()
-BuildRequires: yast2-pkg-bindings >= 2.17.48
+# Pkg::ResolvableUpdate()
+Requires: yast2-pkg-bindings >= 2.17.58
+# Pkg::ResolvableUpdate()
+BuildRequires: yast2-pkg-bindings >= 2.17.58

# String::FindMountPoint()
BuildRequires: yast2 >= 2.17.110

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

< Previous Next >
This Thread
  • No further messages