Mailinglist Archive: yast-commit (62 mails)

< Previous Next >
[yast-commit] r62491 - in /branches/SuSE-Linux-11_3-Branch/gtk: ChangeLog VERSION VERSION.cmake package/yast2-gtk.changes src/pkg/YGPackageSelector.cc src/pkg/yzyppwrapper.cc src/pkg/yzyppwrapper.h
  • From: rpmcruz@xxxxxxxxxxxxxxxxx
  • Date: Tue, 14 Sep 2010 13:48:39 -0000
  • Message-id: <20100914134839.679DC322E1@xxxxxxxxxxxxxxxxx>
Author: rpmcruz
Date: Tue Sep 14 15:48:38 2010
New Revision: 62491

URL: http://svn.opensuse.org/viewcvs/yast?rev=62491&view=rev
Log:
Milestone version.

Modified:
branches/SuSE-Linux-11_3-Branch/gtk/ChangeLog
branches/SuSE-Linux-11_3-Branch/gtk/VERSION
branches/SuSE-Linux-11_3-Branch/gtk/VERSION.cmake
branches/SuSE-Linux-11_3-Branch/gtk/package/yast2-gtk.changes
branches/SuSE-Linux-11_3-Branch/gtk/src/pkg/YGPackageSelector.cc
branches/SuSE-Linux-11_3-Branch/gtk/src/pkg/yzyppwrapper.cc
branches/SuSE-Linux-11_3-Branch/gtk/src/pkg/yzyppwrapper.h

Modified: branches/SuSE-Linux-11_3-Branch/gtk/ChangeLog
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-11_3-Branch/gtk/ChangeLog?rev=62491&r1=62490&r2=62491&view=diff
==============================================================================
--- branches/SuSE-Linux-11_3-Branch/gtk/ChangeLog (original)
+++ branches/SuSE-Linux-11_3-Branch/gtk/ChangeLog Tue Sep 14 15:48:38 2010
@@ -1,3 +1,11 @@
+2010-09-14 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>
+
+ * src/pkg/YGPackageSelector.cc: fix bug 637761: run
+ solver one final time at apply. (backport)
+
+ * src/pkg/yzyppwrapper.h/cc: added supporting methods.
+ (backport)
+
2010-08-23 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>

* src/YGUI.cc & src/YGDialog.cc: bug fix 633498: set

Modified: branches/SuSE-Linux-11_3-Branch/gtk/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-11_3-Branch/gtk/VERSION?rev=62491&r1=62490&r2=62491&view=diff
==============================================================================
--- branches/SuSE-Linux-11_3-Branch/gtk/VERSION (original)
+++ branches/SuSE-Linux-11_3-Branch/gtk/VERSION Tue Sep 14 15:48:38 2010
@@ -1 +1 @@
-2.21.72
+2.21.73

Modified: branches/SuSE-Linux-11_3-Branch/gtk/VERSION.cmake
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-11_3-Branch/gtk/VERSION.cmake?rev=62491&r1=62490&r2=62491&view=diff
==============================================================================
--- branches/SuSE-Linux-11_3-Branch/gtk/VERSION.cmake (original)
+++ branches/SuSE-Linux-11_3-Branch/gtk/VERSION.cmake Tue Sep 14 15:48:38 2010
@@ -1,3 +1,3 @@
SET(VERSION_MAJOR "2")
SET(VERSION_MINOR "21")
-SET(VERSION_PATCH "72")
+SET(VERSION_PATCH "73")

Modified: branches/SuSE-Linux-11_3-Branch/gtk/package/yast2-gtk.changes
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-11_3-Branch/gtk/package/yast2-gtk.changes?rev=62491&r1=62490&r2=62491&view=diff
==============================================================================
--- branches/SuSE-Linux-11_3-Branch/gtk/package/yast2-gtk.changes (original)
+++ branches/SuSE-Linux-11_3-Branch/gtk/package/yast2-gtk.changes Tue Sep 14
15:48:38 2010
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Sep 14 14:48:00 WET 2010 - rpmcruz@xxxxxxxxxxxxxxxxxxx
+
+- 2.21.73
+- sw_single: run solver at end, fixes bnc#620513.
+
+-------------------------------------------------------------------
Mon Aug 30 18:05:00 WET 2010 - rpmcruz@xxxxxxxxxxxxxxxxxxx

- 2.21.72

Modified: branches/SuSE-Linux-11_3-Branch/gtk/src/pkg/YGPackageSelector.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-11_3-Branch/gtk/src/pkg/YGPackageSelector.cc?rev=62491&r1=62490&r2=62491&view=diff
==============================================================================
--- branches/SuSE-Linux-11_3-Branch/gtk/src/pkg/YGPackageSelector.cc (original)
+++ branches/SuSE-Linux-11_3-Branch/gtk/src/pkg/YGPackageSelector.cc Tue Sep 14
15:48:38 2010
@@ -266,13 +266,13 @@
return confirmed;
}

- virtual bool acceptLicense (Ypp::Selectable &sel, const std::string
&license)
+ virtual bool showLicense (Ypp::Selectable &sel, const std::string
&license)
{
return acceptText (sel, _("License Agreement"),
_("Do you accept the terms of this license?"), license);
}

- virtual bool displayMessage (Ypp::Selectable &sel, const std::string
&message)
+ virtual bool showMessage (Ypp::Selectable &sel, const std::string
&message)
{ return acceptText (sel, _("Warning Message"), _("Install anyway"),
message); }

virtual bool resolveProblems (const std::list <Ypp::Problem *>
&problems)
@@ -699,6 +699,7 @@
dialog->setTitle (title);

Ypp::setInterface (impl);
+ Ypp::runSolver(); // check dependencies at start
impl->refreshQuery();

if (summaryMode()) popupChanges();
@@ -720,6 +721,11 @@

void YGPackageSelector::apply()
{
+ if (!Ypp::runSolver()) return; // final dependencies check
+ if (onlineUpdateMode())
+ if (!Ypp::showPendingLicenses (Ypp::Selectable::PATCH)) return;
+ if (!Ypp::showPendingLicenses (Ypp::Selectable::PACKAGE)) return;
+
if (Ypp::isModified()) { // confirm
if (!onlineUpdateMode() && confirmUnsupported()) {
if (!impl->confirmUnsupported())

Modified: branches/SuSE-Linux-11_3-Branch/gtk/src/pkg/yzyppwrapper.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-11_3-Branch/gtk/src/pkg/yzyppwrapper.cc?rev=62491&r1=62490&r2=62491&view=diff
==============================================================================
--- branches/SuSE-Linux-11_3-Branch/gtk/src/pkg/yzyppwrapper.cc (original)
+++ branches/SuSE-Linux-11_3-Branch/gtk/src/pkg/yzyppwrapper.cc Tue Sep 14
15:48:38 2010
@@ -17,6 +17,7 @@
#include <algorithm>

static Ypp::Interface *g_interface = 0;
+static bool g_autoSolver = true;

// Repository

@@ -322,14 +323,14 @@
default: {
if (!m_sel->hasLicenceConfirmed()) {
ZyppResObject obj = m_sel->candidateObj();
- if (obj) {
+ if (obj && g_interface && g_autoSolver) {
const std::string &license =
obj->licenseToConfirm();
- if (!license.empty() && g_interface)
- if (!g_interface->acceptLicense
(*this, license))
+ if (!license.empty())
+ if (!g_interface->showLicense
(*this, license))
return;
const std::string &msg =
obj->insnotify();
- if (!msg.empty() && g_interface)
- if
(!g_interface->displayMessage (*this, msg))
+ if (!msg.empty())
+ if (!g_interface->showMessage
(*this, msg))
return;
}
m_sel->setLicenceConfirmed();
@@ -379,11 +380,11 @@
_zyppPool().eraseRequestedLocale (m_locale);
break;
default: {
- if (m_sel->hasCandidateObj()) {
+ if (m_sel->hasCandidateObj() && g_interface &&
g_autoSolver) {
ZyppResObject obj = m_sel->candidateObj();
const std::string &msg = obj->delnotify();
- if (!msg.empty() && g_interface)
- if (!g_interface->displayMessage
(*this, msg))
+ if (!msg.empty())
+ if (!g_interface->showMessage (*this,
msg))
return;
}

@@ -832,7 +833,7 @@
// Interface

std::list <Ypp::SelListener *> g_sel_listeners;
-static bool g_transacting = false, g_autoSolver = true;
+static bool g_transacting = false;

void Ypp::addSelListener (Ypp::SelListener *listener)
{ g_sel_listeners.push_back (listener); }
@@ -850,7 +851,6 @@
void Ypp::setInterface (Ypp::Interface *interface)
{
g_interface = interface;
- runSolver(); // check problems at start
}

Ypp::Interface *Ypp::getInterface() { return g_interface; }
@@ -938,6 +938,30 @@
bool Ypp::isSolverEnabled()
{ return g_autoSolver; }

+bool Ypp::showPendingLicenses (Ypp::Selectable::Type type)
+{
+ const zypp::ResKind &kind = Selectable::asKind (type);
+ for (ZyppPool::const_iterator it = zyppPool().byKindBegin(kind);
+ it != zyppPool().byKindEnd(kind); it++) {
+ ZyppSelectable zsel = (*it);
+ switch (zsel->status()) {
+ case zypp::ui::S_Install: case zypp::ui::S_AutoInstall:
+ case zypp::ui::S_Update: case zypp::ui::S_AutoUpdate:
+ if (zsel->candidateObj()) {
+ std::string license =
zsel->candidateObj()->licenseToConfirm();
+ if (!license.empty())
+ if
(!zsel->hasLicenceConfirmed()) {
+ Selectable sel (zsel);
+ if
(!g_interface->showLicense (sel, license))
+ return false;
+ }
+ }
+ default: break;
+ }
+ }
+ return true;
+}
+
void Ypp::startTransactions()
{ g_transacting = true; }


Modified: branches/SuSE-Linux-11_3-Branch/gtk/src/pkg/yzyppwrapper.h
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-11_3-Branch/gtk/src/pkg/yzyppwrapper.h?rev=62491&r1=62490&r2=62491&view=diff
==============================================================================
--- branches/SuSE-Linux-11_3-Branch/gtk/src/pkg/yzyppwrapper.h (original)
+++ branches/SuSE-Linux-11_3-Branch/gtk/src/pkg/yzyppwrapper.h Tue Sep 14
15:48:38 2010
@@ -266,6 +266,7 @@
bool runSolver (bool force = false); // returns whether succesful
void setEnableSolver (bool enabled); // true by default
bool isSolverEnabled();
+ bool showPendingLicenses (Ypp::Selectable::Type type);

// temporarily suspends run-solver while installing/removing a few
packages at a time
// -- used by Ypp::List
@@ -273,8 +274,8 @@
bool finishTransactions(); // returns return of runSolver()

struct Interface {
- virtual bool acceptLicense (Selectable &sel, const std::string
&license) = 0;
- virtual bool displayMessage (Selectable &sel, const std::string
&message) = 0;
+ virtual bool showLicense (Selectable &sel, const std::string
&license) = 0;
+ virtual bool showMessage (Selectable &sel, const std::string
&message) = 0;
// resolveProblems = false to cancel the action that had that
effect
virtual bool resolveProblems (const std::list <Problem *>
&problems) = 0;
};

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

< Previous Next >
This Thread
  • No further messages