Author: mlandres
Date: Mon Sep 3 17:10:22 2007
New Revision: 7094
URL: http://svn.opensuse.org/viewcvs/zypp?rev=7094&view=rev
Log:
Reset transact bits when switching status from "update" to "protected" (#246976)
Modified:
trunk/libzypp/VERSION.cmake
trunk/libzypp/devel/devel.ma/Basic.cc
trunk/libzypp/package/libzypp.changes
trunk/libzypp/zypp/ui/SelectableImpl.cc
trunk/libzypp/zypp/ui/SelectableImpl.h
Modified: trunk/libzypp/VERSION.cmake
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/VERSION.cmake?rev=7094&r1=7093&r2=7094&view=diff
==============================================================================
--- trunk/libzypp/VERSION.cmake (original)
+++ trunk/libzypp/VERSION.cmake Mon Sep 3 17:10:22 2007
@@ -47,4 +47,4 @@
SET(LIBZYPP_MAJOR "3")
SET(LIBZYPP_MINOR "22")
SET(LIBZYPP_COMPATMINOR "21")
-SET(LIBZYPP_PATCH "0")
+SET(LIBZYPP_PATCH "1")
Modified: trunk/libzypp/devel/devel.ma/Basic.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/Basic.cc?rev=7094&r1=7093&r2=7094&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/Basic.cc (original)
+++ trunk/libzypp/devel/devel.ma/Basic.cc Mon Sep 3 17:10:22 2007
@@ -9,27 +9,22 @@
#include
#include
#include
+#include "zypp/ResPoolProxy.h"
using namespace std;
using namespace zypp;
+using namespace zypp::ui;
-void chk( ResObject::constPtr p )
+bool chst( Selectable::Ptr & sel, Status status )
{
- MIL << p << endl;
- DBG << p->deps() << endl;
+ DBG << "+++ " << sel << endl;
+ Status ostatus( sel->status() );
+ bool res = sel->set_status( status );
+ (res?MIL:WAR) << ostatus << " -> " << status << " ==>(" << res << ") " << sel->status() << endl;
+ DBG << "--- " << sel << endl;
+ return res;
}
-namespace zypp {
-namespace filesystem {
- void touch( const char * p )
- {
- static std::string w;
- ofstream s(p);
- s<pool() );
- USR << pool << endl;
-
const char *const lines[] = {
"@ package",
"@ installed",
"- foo 1 1 i686",
- "@ provides",
- "modalias(kernel-bigsmp:pci:*provided*)",
- "@ suplements",
- "modalias(kernel-bigsmp:pci:*suplements*)",
+ "@ available",
+ "- foo 2 1 i686",
"@ fin"
};
- //debug::addPool( lines, lines+(sizeof(lines)/sizeof(const char *const)) );
- //debug::addPool( "/tmp/a" );
+ debug::addPool( lines, lines+(sizeof(lines)/sizeof(const char *const)) );
+
+ ResPool pool( getZYpp()->pool() );
+ ResPoolProxy uipool( getZYpp()->poolProxy() );
+
USR << pool << endl;
- for_each( pool.begin(), pool.end(), chk );
+ USR << uipool << endl;
+
+ //for_each( pool.begin(), pool.end(), Print() );
- SEC << pool.serial().serial() << endl;
- SEC << pool.serial().serial() << endl;
- filesystem::touch( "/etc/sysconfig/storage" );
- SEC << pool.serial().serial() << endl;
- SEC << pool.serial().serial() << endl;
- SEC << pool.serial().serial() << endl;
- filesystem::touch( "/etc/sysconfig/storage" );
- SEC << pool.serial().serial() << endl;
- SEC << pool.serial().serial() << endl;
- filesystem::touch( "/etc/sysconfig/storage" );
- SEC << pool.serial().serial() << endl;
- SEC << pool.serial().serial() << endl;
- SEC << pool.serial().serial() << endl;
+ Selectable::Ptr sel( *uipool.byKindBegin<Package>() );
+
+/* enum Status
+ {
+ S_Protected, // Keep this unmodified ( have installedObj && S_Protected )
+ S_Taboo, // Keep this unmodified ( have no installedObj && S_Taboo)
+ // requested by user:
+ S_Del, // delete installedObj ( clears S_Protected if set )
+ S_Update, // install candidateObj ( have installedObj, clears S_Protected if set )
+ S_Install, // install candidateObj ( have no installedObj, clears S_Taboo if set )
+ // not requested by user:
+ S_AutoDel, // delete installedObj
+ S_AutoUpdate, // install candidateObj ( have installedObj )
+ S_AutoInstall, // install candidateObj ( have no installedObj )
+ // no modification:
+ S_KeepInstalled, // no modification ( have installedObj && !S_Protected, clears S_Protected if set )
+ S_NoInst, // no modification ( have no installedObj && !S_Taboo, clears S_Taboo if set )
+ };
+*/
+ MIL << sel << endl;
+ chst( sel, ui::S_Update );
+ chst( sel, ui::S_Install );
+ chst( sel, ui::S_Protected );
+ chst( sel, ui::S_KeepInstalled );
INT << "===[END]============================================" << endl
<< endl;
Modified: trunk/libzypp/package/libzypp.changes
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=7094&r1=7093&r2=7094&view=diff
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Mon Sep 3 17:10:22 2007
@@ -1,8 +1,15 @@
-------------------------------------------------------------------
+Mon Sep 3 17:14:02 CEST 2007 - ma@suse.de
+
+- Reset transact bits when switching status from
+ "update" to "protected" (#246976)
+- version 3.22.1
+
+-------------------------------------------------------------------
Mon Sep 3 13:56:42 CEST 2007 - schubi@suse.de
- new translations added
-- rev 7083
+- rev 7083
-------------------------------------------------------------------
Fri Aug 31 22:10:55 CEST 2007 - ma@suse.de
Modified: trunk/libzypp/zypp/ui/SelectableImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ui/SelectableImpl.cc?rev=7094&r1=7093&r2=7094&view=diff
==============================================================================
--- trunk/libzypp/zypp/ui/SelectableImpl.cc (original)
+++ trunk/libzypp/zypp/ui/SelectableImpl.cc Mon Sep 3 17:10:22 2007
@@ -126,6 +126,7 @@
bool setProtected() const
{
if ( inst ) {
+ resetTransactingCandidates();
inst.status().setTransact( false, ResStatus::USER );
return inst.status().setLock( true, ResStatus::USER );
} else
Modified: trunk/libzypp/zypp/ui/SelectableImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ui/SelectableImpl.h?rev=7094&r1=7093&r2=7094&view=diff
==============================================================================
--- trunk/libzypp/zypp/ui/SelectableImpl.h (original)
+++ trunk/libzypp/zypp/ui/SelectableImpl.h Mon Sep 3 17:10:22 2007
@@ -188,7 +188,7 @@
return str << '[' << obj.kind() << ']' << obj.name() << ": " << obj.status()
<< " (I " << obj._installedItem << ")"
<< " (A " << obj._availableItems.size() << ")"
- << obj._candidate;
+ << obj.candidateObj();
}
/////////////////////////////////////////////////////////////////
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org