Mailinglist Archive: yast-commit (650 mails)
| < Previous | Next > |
[yast-commit] r55588 - in /trunk/add-on: VERSION package/yast2-add-on.changes src/add-on-workflow.ycp
- From: locilka@xxxxxxxxxxxxxxxx
- Date: Wed, 18 Feb 2009 14:19:00 -0000
- Message-id: <E1LZnGO-0000xe-U8@xxxxxxxxxxxxxxxx>
Author: locilka
Date: Wed Feb 18 15:19:00 2009
New Revision: 55588
URL: http://svn.opensuse.org/viewcvs/yast?rev=55588&view=rev
Log:
- Reloading libzypp state if user declines the Add-On
deinstallation proposal or some add-on finished libzypp in its
workflow (bnc #476417).
- 2.18.3
Modified:
trunk/add-on/VERSION
trunk/add-on/package/yast2-add-on.changes
trunk/add-on/src/add-on-workflow.ycp
Modified: trunk/add-on/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/add-on/VERSION?rev=55588&r1=55587&r2=55588&view=diff
==============================================================================
--- trunk/add-on/VERSION (original)
+++ trunk/add-on/VERSION Wed Feb 18 15:19:00 2009
@@ -1 +1 @@
-2.18.2
+2.18.3
Modified: trunk/add-on/package/yast2-add-on.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/add-on/package/yast2-add-on.changes?rev=55588&r1=55587&r2=55588&view=diff
==============================================================================
--- trunk/add-on/package/yast2-add-on.changes (original)
+++ trunk/add-on/package/yast2-add-on.changes Wed Feb 18 15:19:00 2009
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Wed Feb 18 13:26:03 CET 2009 - locilka@xxxxxxx
+
+- Reloading libzypp state if user declines the Add-On
+ deinstallation proposal or some add-on finished libzypp in its
+ workflow (bnc #476417).
+- 2.18.3
+
+-------------------------------------------------------------------
Tue Feb 17 13:30:31 CET 2009 - locilka@xxxxxxx
- Installed products are not directly connected with their add-on
Modified: trunk/add-on/src/add-on-workflow.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/add-on/src/add-on-workflow.ycp?rev=55588&r1=55587&r2=55588&view=diff
==============================================================================
--- trunk/add-on/src/add-on-workflow.ycp (original)
+++ trunk/add-on/src/add-on-workflow.ycp Wed Feb 18 15:19:00 2009
@@ -1362,6 +1362,9 @@
counter = counter + 1;
y2milestone ("Product: %1, Info: %2", one_product, repository_info);
+ if (repository_info == nil) {
+ y2warning ("No matching repository found for product listed above");
+ }
repository_info = GetRepoInfo (one_product, all_products);
@@ -1558,6 +1561,40 @@
Pkg::SourceReleaseAll();
}
+// Cleanup UI - Prepare it for progress callbacks
+void SetWizardWindowInProgress () {
+ Wizard::SetContents (
+ _("Add-On Products"),
+ `Label (_("Initializing...")),
+ _("<p>Initializing add-on products...</p>"),
+ false,
+ false
+ );
+
+ Wizard::SetTitleIcon ("yast-addon");
+}
+
+// BNC #476417: When user cancels removing an add-on, we have to neutralize all
+// libzypp resolvables to their inital states
+void NeutralizeAllResolvables () {
+ foreach (symbol one_type, [`product, `patch, `package, `srcpackage,
`pattern], {
+ y2milestone ("Neutralizing all: %1", one_type);
+ Pkg::ResolvableNeutral ("", one_type, true);
+ });
+}
+
+// Either there are no repositories now or they
+// were changed, neutralized, etc.
+void LoadLibzyppNow () {
+ y2milestone ("Reloading libzypp");
+ SetWizardWindowInProgress();
+
+ // Reinitialize
+ Pkg::TargetInitialize (Installation::destdir);
+ Pkg::TargetLoad();
+ Pkg::SourceStartManager (true);
+}
+
symbol RunAddOnsOverviewDialog () {
y2milestone ("Overview Dialog");
symbol ret = `next;
@@ -1593,6 +1630,13 @@
RunAddProductWorkflow();
}
+ // Something has disabled all the repositories or finished
+ // libzypp, reload it
+ list <integer> current_repos = Pkg::SourceGetCurrent(true);
+ if (current_repos == nil || size (current_repos) == 0) {
+ LoadLibzyppNow();
+ }
+
CreateAddOnsOverviewDialog();
RedrawAddOnsOverviewTable();
@@ -1600,11 +1644,37 @@
} else if (userret == `delete) {
y2milestone ("Removing selected product...");
- if (RemoveProductWithDependencies() == true) {
- CreateAddOnsOverviewDialog();
- RedrawAddOnsOverviewTable();
+ boolean rpwd = RemoveProductWithDependencies();
+ y2milestone ("RPWD result was: %1", rpwd);
+
+ // nil == user decided not to remove the product
+ if (rpwd == nil) {
+ y2milestone ("User decided not to remove the selected product");
+ continue;
+
+ // false == user decided not confirm the add-on removal
+ // libzypp has been already changed
+ // BNC #476417: Getting libzypp to the previous state
+ } else if (rpwd == false) {
+ y2milestone ("User aborted the package manager");
+
+ SetWizardWindowInProgress();
+
+ // Neutralizing all resolvables (some are usually marked for
removal)
+ NeutralizeAllResolvables();
+ Pkg::SourceFinishAll();
+
+ LoadLibzyppNow();
+
+ // true == packages and sources have been removed
+ } else {
+ // Store sources state
+ Pkg::SourceSaveAll();
}
+ CreateAddOnsOverviewDialog();
+ RedrawAddOnsOverviewTable();
+
// Redrawing info widget
} else if (userret == "list_of_addons") {
AdjustInfoWidget();
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
Date: Wed Feb 18 15:19:00 2009
New Revision: 55588
URL: http://svn.opensuse.org/viewcvs/yast?rev=55588&view=rev
Log:
- Reloading libzypp state if user declines the Add-On
deinstallation proposal or some add-on finished libzypp in its
workflow (bnc #476417).
- 2.18.3
Modified:
trunk/add-on/VERSION
trunk/add-on/package/yast2-add-on.changes
trunk/add-on/src/add-on-workflow.ycp
Modified: trunk/add-on/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/add-on/VERSION?rev=55588&r1=55587&r2=55588&view=diff
==============================================================================
--- trunk/add-on/VERSION (original)
+++ trunk/add-on/VERSION Wed Feb 18 15:19:00 2009
@@ -1 +1 @@
-2.18.2
+2.18.3
Modified: trunk/add-on/package/yast2-add-on.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/add-on/package/yast2-add-on.changes?rev=55588&r1=55587&r2=55588&view=diff
==============================================================================
--- trunk/add-on/package/yast2-add-on.changes (original)
+++ trunk/add-on/package/yast2-add-on.changes Wed Feb 18 15:19:00 2009
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Wed Feb 18 13:26:03 CET 2009 - locilka@xxxxxxx
+
+- Reloading libzypp state if user declines the Add-On
+ deinstallation proposal or some add-on finished libzypp in its
+ workflow (bnc #476417).
+- 2.18.3
+
+-------------------------------------------------------------------
Tue Feb 17 13:30:31 CET 2009 - locilka@xxxxxxx
- Installed products are not directly connected with their add-on
Modified: trunk/add-on/src/add-on-workflow.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/add-on/src/add-on-workflow.ycp?rev=55588&r1=55587&r2=55588&view=diff
==============================================================================
--- trunk/add-on/src/add-on-workflow.ycp (original)
+++ trunk/add-on/src/add-on-workflow.ycp Wed Feb 18 15:19:00 2009
@@ -1362,6 +1362,9 @@
counter = counter + 1;
y2milestone ("Product: %1, Info: %2", one_product, repository_info);
+ if (repository_info == nil) {
+ y2warning ("No matching repository found for product listed above");
+ }
repository_info = GetRepoInfo (one_product, all_products);
@@ -1558,6 +1561,40 @@
Pkg::SourceReleaseAll();
}
+// Cleanup UI - Prepare it for progress callbacks
+void SetWizardWindowInProgress () {
+ Wizard::SetContents (
+ _("Add-On Products"),
+ `Label (_("Initializing...")),
+ _("<p>Initializing add-on products...</p>"),
+ false,
+ false
+ );
+
+ Wizard::SetTitleIcon ("yast-addon");
+}
+
+// BNC #476417: When user cancels removing an add-on, we have to neutralize all
+// libzypp resolvables to their inital states
+void NeutralizeAllResolvables () {
+ foreach (symbol one_type, [`product, `patch, `package, `srcpackage,
`pattern], {
+ y2milestone ("Neutralizing all: %1", one_type);
+ Pkg::ResolvableNeutral ("", one_type, true);
+ });
+}
+
+// Either there are no repositories now or they
+// were changed, neutralized, etc.
+void LoadLibzyppNow () {
+ y2milestone ("Reloading libzypp");
+ SetWizardWindowInProgress();
+
+ // Reinitialize
+ Pkg::TargetInitialize (Installation::destdir);
+ Pkg::TargetLoad();
+ Pkg::SourceStartManager (true);
+}
+
symbol RunAddOnsOverviewDialog () {
y2milestone ("Overview Dialog");
symbol ret = `next;
@@ -1593,6 +1630,13 @@
RunAddProductWorkflow();
}
+ // Something has disabled all the repositories or finished
+ // libzypp, reload it
+ list <integer> current_repos = Pkg::SourceGetCurrent(true);
+ if (current_repos == nil || size (current_repos) == 0) {
+ LoadLibzyppNow();
+ }
+
CreateAddOnsOverviewDialog();
RedrawAddOnsOverviewTable();
@@ -1600,11 +1644,37 @@
} else if (userret == `delete) {
y2milestone ("Removing selected product...");
- if (RemoveProductWithDependencies() == true) {
- CreateAddOnsOverviewDialog();
- RedrawAddOnsOverviewTable();
+ boolean rpwd = RemoveProductWithDependencies();
+ y2milestone ("RPWD result was: %1", rpwd);
+
+ // nil == user decided not to remove the product
+ if (rpwd == nil) {
+ y2milestone ("User decided not to remove the selected product");
+ continue;
+
+ // false == user decided not confirm the add-on removal
+ // libzypp has been already changed
+ // BNC #476417: Getting libzypp to the previous state
+ } else if (rpwd == false) {
+ y2milestone ("User aborted the package manager");
+
+ SetWizardWindowInProgress();
+
+ // Neutralizing all resolvables (some are usually marked for
removal)
+ NeutralizeAllResolvables();
+ Pkg::SourceFinishAll();
+
+ LoadLibzyppNow();
+
+ // true == packages and sources have been removed
+ } else {
+ // Store sources state
+ Pkg::SourceSaveAll();
}
+ CreateAddOnsOverviewDialog();
+ RedrawAddOnsOverviewTable();
+
// Redrawing info widget
} else if (userret == "list_of_addons") {
AdjustInfoWidget();
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
| < Previous | Next > |