[yast-commit] r42568 - in /trunk/gtk/unstable: ChangeLog src/YGUI.cc src/yzyppwrapper.cc
Author: rpmcruz Date: Sat Dec 1 02:45:48 2007 New Revision: 42568 URL: http://svn.opensuse.org/viewcvs/yast?rev=42568&view=rev Log: * src/yzyppwrapper.cc: fixed pools notifications on package modifications. The resolver only tell us of *modified* packages, not *touched*. So, if I set a package to install, then reverse the operation, the package is not considered modified. Now, this direct user modifications are no problem; we know about them. The problem are dependencies. Did a work around for that; kept the old status and do a comparasion on all packages. Modified: trunk/gtk/unstable/ChangeLog trunk/gtk/unstable/src/YGUI.cc trunk/gtk/unstable/src/yzyppwrapper.cc Modified: trunk/gtk/unstable/ChangeLog URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/unstable/ChangeLog?rev=42568&r1=42567&r2=42568&view=diff ============================================================================== --- trunk/gtk/unstable/ChangeLog (original) +++ trunk/gtk/unstable/ChangeLog Sat Dec 1 02:45:48 2007 @@ -11,6 +11,13 @@ * src/yzyppwrapper.cc: fixed search name query. Was not being inclusive. + * src/yzyppwrapper.cc: fixed pools notifications on package modifications. + The resolver only tell us of *modified* packages, not *touched*. So, if + I set a package to install, then reverse the operation, the package is + not considered modified. Now, this direct user modifications are no problem; + we know about them. The problem are dependencies. Did a work around for that; + kept the old status and do a comparasion on all packages. + 2007-11-29 Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt> * src/ygtkwizard.c: de-coupled navigation widgets: tree and steps. Tree @@ -27,10 +34,6 @@ the current row being unselected because it was removed. But to play safe, blocked them then. -2007-11-23 Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt> - - * Merged PackageSelector with SVN. - 2007-11-22 Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt> * src/ygtkratiobox.c: reversed my last changes (except warning fix). Modified: trunk/gtk/unstable/src/YGUI.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/unstable/src/YGUI.cc?rev=42568&r1=42567&r2=42568&view=diff ============================================================================== --- trunk/gtk/unstable/src/YGUI.cc (original) +++ trunk/gtk/unstable/src/YGUI.cc Sat Dec 1 02:45:48 2007 @@ -699,9 +699,9 @@ #endif GtkTreeStore *store = gtk_tree_store_new (cols, G_TYPE_STRING, G_TYPE_STRING, - G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_STRING, G_TYPE_STRING #ifdef IS_VALID_COL - G_TYPE_BOOLEAN + , G_TYPE_BOOLEAN #endif ); Modified: trunk/gtk/unstable/src/yzyppwrapper.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/unstable/src/yzyppwrapper.cc?rev=42568&r1=42567&r2=42568&view=diff ============================================================================== --- trunk/gtk/unstable/src/yzyppwrapper.cc (original) +++ trunk/gtk/unstable/src/yzyppwrapper.cc Sat Dec 1 02:45:48 2007 @@ -187,6 +187,7 @@ ZyppObject installed = zyppSel->installedObj(); if (!!candidate && !!installed) hasUpgrade = zypp::Edition::compare (candidate->edition(), installed->edition()) > 0; + setUnmodified(); } ~Impl() @@ -197,6 +198,11 @@ g_slist_free (availableVersions); } + inline bool isModified() + { return curStatus != zyppSel->status(); } + inline void setUnmodified() + { curStatus = zyppSel->status(); } + std::string name, summary; ZyppSelectable zyppSel; int index; // used for Pools syncing @@ -206,6 +212,7 @@ Version *installedVersion; bool hasUpgrade; bool is3D; + zypp::ui::Status curStatus; // so we know if resolver touched it }; Ypp::Package::Package (Ypp::Package::Impl *impl) @@ -1275,11 +1282,10 @@ // resolver won't tell us what changed -- tell pools about Auto packages for (GSList *p = packages [Ypp::Package::PACKAGE_TYPE]; p; p = p->next) { Ypp::Package *pkg = (Ypp::Package *) p->data; -/* const zypp::ResStatus &status = pkg->impl->zyppSel->modifiedBy(); - if (!status.isBySolver()) {*/ - if (pkg->isAuto()) { + if (pkg->impl->isModified()) { for (GSList *i = pools; i; i = i->next) ((Pool::Impl *) i->data)->packageModified (pkg); + pkg->impl->setUnmodified(); } } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
rpmcruz@svn.opensuse.org