Hello community,
here is the log from the commit of package libzypp
checked in at Tue Jan 15 09:16:07 CET 2008.
--------
--- libzypp/libzypp.changes 2008-01-10 16:58:05.000000000 +0100
+++ /mounts/work_src_done/STABLE/libzypp/libzypp.changes 2008-01-14 17:17:54.616428000 +0100
@@ -1,0 +2,9 @@
+Mon Jan 14 17:11:15 CET 2008 - schubi@suse.de
+
+- Textchanges
+- reduced logging in SAT-solver
+- ordering solutions
+- version 4.1.8
+- revision 8276
+
+-------------------------------------------------------------------
Old:
----
libzypp-4.1.7.tar.bz2
New:
----
libzypp-4.1.8.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.M16452/_old 2008-01-15 09:15:36.000000000 +0100
+++ /var/tmp/diff_new_pack.M16452/_new 2008-01-15 09:15:36.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package libzypp (Version 4.1.7)
+# spec file for package libzypp (Version 4.1.8)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -16,9 +16,9 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-build
AutoReqProv: on
Summary: Package, Patch, Pattern, and Product Management
-Version: 4.1.7
+Version: 4.1.8
Release: 1
-Source: libzypp-4.1.7.tar.bz2
+Source: libzypp-4.1.8.tar.bz2
Source1: libzypp-rpmlintrc
Prefix: /usr
Provides: yast2-packagemanager
@@ -44,7 +44,7 @@
Ladislav Slezak
%package devel
-Requires: libzypp == 4.1.7
+Requires: libzypp == 4.1.8
Requires: libxml2-devel curl-devel openssl-devel rpm-devel glibc-devel zlib-devel
Requires: bzip2 popt-devel dbus-1-devel glib2-devel hal-devel boost-devel libstdc++-devel
Requires: cmake
@@ -132,6 +132,12 @@
%{_libdir}/pkgconfig/libzypp.pc
%changelog
+* Mon Jan 14 2008 - schubi@suse.de
+- Textchanges
+- reduced logging in SAT-solver
+- ordering solutions
+- version 4.1.8
+- revision 8276
* Thu Jan 10 2008 - schubi@suse.de
- Enabled SAT solver via default. (removed ZYPP_SAT_SOLVER)
ZYPP_RC_SOLVER=1 will enable the old RedCapet solver
++++++ libzypp-4.1.7.tar.bz2 -> libzypp-4.1.8.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/package/libzypp.changes new/libzypp-4.1.8/package/libzypp.changes
--- old/libzypp-4.1.7/package/libzypp.changes 2008-01-10 16:57:33.000000000 +0100
+++ new/libzypp-4.1.8/package/libzypp.changes 2008-01-14 17:17:09.000000000 +0100
@@ -1,4 +1,13 @@
-------------------------------------------------------------------
+Mon Jan 14 17:11:15 CET 2008 - schubi@suse.de
+
+- Textchanges
+- reduced logging in SAT-solver
+- ordering solutions
+- version 4.1.8
+- revision 8276
+
+-------------------------------------------------------------------
Thu Jan 10 16:50:26 CET 2008 - schubi@suse.de
- Enabled SAT solver via default. (removed ZYPP_SAT_SOLVER)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/VERSION.cmake new/libzypp-4.1.8/VERSION.cmake
--- old/libzypp-4.1.7/VERSION.cmake 2008-01-10 16:57:33.000000000 +0100
+++ new/libzypp-4.1.8/VERSION.cmake 2008-01-14 17:17:09.000000000 +0100
@@ -47,4 +47,4 @@
SET(LIBZYPP_MAJOR "4")
SET(LIBZYPP_MINOR "1")
SET(LIBZYPP_COMPATMINOR "1")
-SET(LIBZYPP_PATCH "7")
+SET(LIBZYPP_PATCH "8")
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/VERSION.cmake.bak new/libzypp-4.1.8/VERSION.cmake.bak
--- old/libzypp-4.1.7/VERSION.cmake.bak 2008-01-10 16:57:33.000000000 +0100
+++ new/libzypp-4.1.8/VERSION.cmake.bak 2008-01-14 17:17:09.000000000 +0100
@@ -47,4 +47,4 @@
SET(LIBZYPP_MAJOR "4")
SET(LIBZYPP_MINOR "1")
SET(LIBZYPP_COMPATMINOR "1")
-SET(LIBZYPP_PATCH "6")
+SET(LIBZYPP_PATCH "7")
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/zypp/PublicKey.cc new/libzypp-4.1.8/zypp/PublicKey.cc
--- old/libzypp-4.1.7/zypp/PublicKey.cc 2008-01-10 16:57:29.000000000 +0100
+++ new/libzypp-4.1.8/zypp/PublicKey.cc 2008-01-14 17:17:05.000000000 +0100
@@ -20,6 +20,9 @@
#include "zypp/PathInfo.h"
#include "zypp/base/Exception.h"
#include "zypp/base/Logger.h"
+#include "zypp/Date.h"
+
+#include <ctime>
using std::endl;
@@ -66,6 +69,12 @@
std::string fingerprint() const
{ return _fingerprint; }
+
+ Date created() const
+ { return _created; }
+
+ Date expires() const
+ { return _expires; }
Pathname path() const
{
@@ -74,6 +83,38 @@
}
protected:
+
+ // create Date from a string in format YYYY-MM-DD
+ Date createDate(const std::string &datestr)
+ {
+ // empty input
+ if (datestr.empty())
+ {
+ return Date();
+ }
+
+ tm date;
+
+ try
+ {
+ // set the date
+ date.tm_year = str::strtonum<int>(std::string(datestr, 0, 4)) - 1900; // years since 1900
+ date.tm_mon = str::strtonum<int>(std::string(datestr, 5, 2)) - 1; // months since January
+ date.tm_mday = str::strtonum<int>(std::string(datestr, 9, 2)); // day
+ }
+ catch(...)
+ {
+ WAR << "Cannot parse date string: " << datestr << std::endl;
+ return Date();
+ }
+
+ // reset time (set 00:00:00)
+ date.tm_sec = date.tm_min = date.tm_hour = 0;
+
+ time_t time_epoch = ::mktime(&date);
+
+ return Date(time_epoch);
+ }
void readFromFile( const Pathname &keyfile)
{
@@ -125,6 +166,9 @@
{
_id = what[5];
_name = what[10];
+
+ _created = createDate(what[6]);
+ _expires = createDate(what[7]);
//return key;
}
else if ( what[1] == "fpr" )
@@ -146,6 +190,8 @@
std::string _fingerprint;
std::string _data;
filesystem::TmpFile _data_file;
+ Date _created;
+ Date _expires;
//Pathname _data_file;
private:
friend Impl * rwcowClone<Impl>( const Impl * rhs );
@@ -197,6 +243,12 @@
std::string PublicKey::fingerprint() const
{ return _pimpl->fingerprint(); }
+
+ Date PublicKey::created() const
+ { return _pimpl->created(); }
+
+ Date PublicKey::expires() const
+ { return _pimpl->expires(); }
Pathname PublicKey::path() const
{ return _pimpl->path(); }
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/zypp/PublicKey.h new/libzypp-4.1.8/zypp/PublicKey.h
--- old/libzypp-4.1.7/zypp/PublicKey.h 2008-01-10 16:57:28.000000000 +0100
+++ new/libzypp-4.1.8/zypp/PublicKey.h 2008-01-14 17:17:04.000000000 +0100
@@ -55,7 +55,10 @@
Pathname _keyfile;
};
-
+
+ // forward declaration of class Date
+ class Date;
+
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : PublicKey
@@ -88,6 +91,18 @@
std::string id() const;
std::string name() const;
std::string fingerprint() const;
+
+ /**
+ * Date when the key was created (time is 00:00:00)
+ */
+ Date created() const;
+
+ /**
+ * Date when the key expires (time is 00:00:00)
+ * If the key never expires the date is Date() (i.e. 0 seconds since the epoch (1.1.1970))
+ */
+ Date expires() const;
+
Pathname path() const;
bool operator==( PublicKey b ) const;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/zypp/ResolverProblem.cc new/libzypp-4.1.8/zypp/ResolverProblem.cc
--- old/libzypp-4.1.7/zypp/ResolverProblem.cc 2008-01-10 16:57:31.000000000 +0100
+++ new/libzypp-4.1.8/zypp/ResolverProblem.cc 2008-01-14 17:17:08.000000000 +0100
@@ -101,9 +101,14 @@
**/
void
-ResolverProblem::addSolution( ProblemSolution_Ptr solution )
+ResolverProblem::addSolution( ProblemSolution_Ptr solution,
+ bool inFront )
{
- _solutions.push_back (solution);
+ if (inFront) {
+ _solutions.push_front (solution);
+ } else {
+ _solutions.push_back (solution);
+ }
}
void
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/zypp/ResolverProblem.cc.bak new/libzypp-4.1.8/zypp/ResolverProblem.cc.bak
--- old/libzypp-4.1.7/zypp/ResolverProblem.cc.bak 1970-01-01 01:00:00.000000000 +0100
+++ new/libzypp-4.1.8/zypp/ResolverProblem.cc.bak 2008-01-14 17:17:08.000000000 +0100
@@ -0,0 +1,117 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* ResolverProblem.cc
+ *
+ * Easy-to use interface to the ZYPP dependency resolver
+ *
+ * Copyright (C) 2000-2002 Ximian, Inc.
+ * Copyright (C) 2005 SUSE Linux Products GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#include "zypp/ResolverProblem.h"
+#include "zypp/ProblemSolution.h"
+
+using namespace std;
+
+/////////////////////////////////////////////////////////////////////////
+namespace zypp
+{ ///////////////////////////////////////////////////////////////////////
+
+IMPL_PTR_TYPE(ResolverProblem);
+
+//---------------------------------------------------------------------------
+
+ostream&
+operator<<( ostream& os, const ResolverProblem & problem)
+{
+ os << "Problem:" << endl;
+ os << problem._description << endl;
+ os << problem._details << endl;
+ os << problem._solutions;
+ return os;
+}
+
+
+ostream&
+operator<<( ostream& os, const ResolverProblemList & problemlist)
+{
+ for (ResolverProblemList::const_iterator iter = problemlist.begin(); iter != problemlist.end(); ++iter) {
+ if (iter != problemlist.begin())
+ os << ", ";
+ os << (*iter);
+ }
+ return os;
+}
+
+//---------------------------------------------------------------------------
+
+/**
+ * Constructor.
+ **/
+ResolverProblem::ResolverProblem( const string & description, const string & details )
+ : _description (description)
+ , _details (details)
+{
+}
+
+/**
+ * Destructor.
+ **/
+ResolverProblem::~ResolverProblem()
+{
+}
+
+/**
+ * Return the possible solutions to this problem.
+ * All problems should have at least 2-3 (mutually exclusive) solutions:
+ *
+ * - Undo: Do not perform the offending transaction
+ * (do not install the package that had unsatisfied requirements,
+ * do not remove the package that would break other packages' requirements)
+ *
+ * - Remove referrers: Remove all packages that would break because
+ * they depend on the package that is requested to be removed
+ *
+ * - Ignore: Inject artificial "provides" for a missing requirement
+ * (pretend that requirement is satisfied)
+ **/
+
+ProblemSolutionList
+ResolverProblem::solutions() const
+{
+ return _solutions;
+}
+
+/**
+ * Add a solution to this problem. This class takes over ownership of
+ * the problem and will delete it when neccessary.
+ **/
+
+void
+ResolverProblem::addSolution( ProblemSolution_Ptr solution )
+{
+ _solutions.push_back (solution);
+}
+
+void
+ResolverProblem::clear()
+{
+ _solutions.clear();
+}
+
+ ///////////////////////////////////////////////////////////////////////
+};// namespace zypp
+/////////////////////////////////////////////////////////////////////////
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/zypp/ResolverProblem.h new/libzypp-4.1.8/zypp/ResolverProblem.h
--- old/libzypp-4.1.7/zypp/ResolverProblem.h 2008-01-10 16:57:28.000000000 +0100
+++ new/libzypp-4.1.8/zypp/ResolverProblem.h 2008-01-14 17:17:04.000000000 +0100
@@ -97,7 +97,7 @@
* Add a solution to this problem. This class takes over ownership of
* the problem and will delete it when neccessary.
**/
- void addSolution( ProblemSolution_Ptr solution );
+ void addSolution( ProblemSolution_Ptr solution, bool inFront = false );
};
///////////////////////////////////////////////////////////////////////
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/zypp/ResolverProblem.h.bak new/libzypp-4.1.8/zypp/ResolverProblem.h.bak
--- old/libzypp-4.1.7/zypp/ResolverProblem.h.bak 1970-01-01 01:00:00.000000000 +0100
+++ new/libzypp-4.1.8/zypp/ResolverProblem.h.bak 2008-01-14 17:17:05.000000000 +0100
@@ -0,0 +1,108 @@
+/*
+ *
+ * Easy-to use interface to the ZYPP dependency resolver
+ *
+ * Author: Stefan Hundhammer
+ *
+ **/
+
+#ifndef ZYPP_RESOLVERPROBLEM_H
+#define ZYPP_RESOLVERPROBLEM_H
+
+#include <list>
+#include <string>
+
+#include "zypp/base/ReferenceCounted.h"
+#include "zypp/base/PtrTypes.h"
+#include "zypp/ProblemSolution.h"
+
+/////////////////////////////////////////////////////////////////////////
+namespace zypp
+{ ///////////////////////////////////////////////////////////////////////
+
+
+ class ResolverProblem : public base::ReferenceCounted
+ {
+ private:
+
+ /**
+ * Clear all data.
+ * In particular, delete all members of _solutions.
+ **/
+ void clear();
+
+
+ //
+ // Data members
+ //
+
+ Resolver_constPtr _resolver;
+ std::string _description;
+ std::string _details;
+ ProblemSolutionList _solutions;
+
+ public:
+
+ /**
+ * Constructor.
+ **/
+ ResolverProblem( const std::string & description, const std::string & details );
+
+ /**
+ * Destructor.
+ **/
+ ~ResolverProblem();
+
+ // ---------------------------------- I/O
+
+ friend std::ostream& operator<<(std::ostream&, const ResolverProblem & problem);
+
+ // ---------------------------------- accessors
+
+ /**
+ * Return a one-line description of the problem.
+ **/
+ std::string description() const { return _description; }
+
+ /**
+ * Return a (possibly muti-line) detailed description of the problem
+ * or an empty string if there are no useful details.
+ **/
+ std::string details() const { return _details; }
+
+ /**
+ * Return the possible solutions to this problem.
+ * All problems should have at least 2-3 (mutually exclusive) solutions:
+ *
+ * - Undo: Do not perform the offending transaction
+ * (do not install the package that had unsatisfied requirements,
+ * do not remove the package that would break other packages' requirements)
+ *
+ * - Remove referrers: Remove all packages that would break because
+ * they depend on the package that is requested to be removed
+ *
+ * - Ignore: Inject artificial "provides" for a missing requirement
+ * (pretend that requirement is satisfied)
+ **/
+ ProblemSolutionList solutions() const;
+
+ /**
+ * Return the parent dependency resolver.
+ **/
+ Resolver_constPtr resolver() const { return _resolver; }
+
+ // ---------------------------------- methods
+
+ /**
+ * Add a solution to this problem. This class takes over ownership of
+ * the problem and will delete it when neccessary.
+ **/
+ void addSolution( ProblemSolution_Ptr solution );
+
+ };
+ ///////////////////////////////////////////////////////////////////////
+};// namespace zypp
+/////////////////////////////////////////////////////////////////////////
+
+#endif // ZYPP_RESOLVERPROBLEM_H
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/zypp/sat/detail/PoolImpl.cc new/libzypp-4.1.8/zypp/sat/detail/PoolImpl.cc
--- old/libzypp-4.1.7/zypp/sat/detail/PoolImpl.cc 2008-01-10 16:57:28.000000000 +0100
+++ new/libzypp-4.1.8/zypp/sat/detail/PoolImpl.cc 2008-01-14 17:17:04.000000000 +0100
@@ -72,7 +72,7 @@
}
// initialialize logging
bool verbose = ( getenv("ZYPP_FULLLOG") || getenv("ZYPP_LIBSAT_FULLLOG") );
- ::pool_setdebuglevel( _pool, verbose ? 5 : 2 );
+ ::pool_setdebuglevel( _pool, verbose ? 5 : 1 );
::pool_setdebugcallback( _pool, logSat, NULL );
// set pool architecture
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/zypp/sat/detail/PoolImpl.cc.bak new/libzypp-4.1.8/zypp/sat/detail/PoolImpl.cc.bak
--- old/libzypp-4.1.7/zypp/sat/detail/PoolImpl.cc.bak 2008-01-10 16:57:28.000000000 +0100
+++ new/libzypp-4.1.8/zypp/sat/detail/PoolImpl.cc.bak 2008-01-14 17:17:04.000000000 +0100
@@ -10,6 +10,7 @@
*
*/
#include <iostream>
+#include
#include "zypp/base/Logger.h"
#include "zypp/base/Gettext.h"
@@ -31,12 +32,18 @@
namespace detail
{ /////////////////////////////////////////////////////////////////
+ // MPL checks for satlib constants we redefine:
+ BOOST_MPL_ASSERT_RELATION( solvablePrereqMarker, ==, SOLVABLE_PREREQMARKER );
+ BOOST_MPL_ASSERT_RELATION( solvableFileMarker, ==, SOLVABLE_FILEMARKER );
+
+ /////////////////////////////////////////////////////////////////
+
void logSat( struct _Pool *, void *data, int type, const char *logString )
{
if ((type & (SAT_FATAL|SAT_ERROR))) {
_ERR("satsolver") << logString;
} else {
- _DBG("satsolver") << logString;
+ _MIL("satsolver") << logString;
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/zypp/sat/SATResolver.cc new/libzypp-4.1.8/zypp/sat/SATResolver.cc
--- old/libzypp-4.1.7/zypp/sat/SATResolver.cc 2008-01-10 16:57:28.000000000 +0100
+++ new/libzypp-4.1.8/zypp/sat/SATResolver.cc 2008-01-14 17:17:04.000000000 +0100
@@ -554,7 +554,7 @@
break;
case SOLVER_PROBLEM_NOT_INSTALLABLE:
s = pool_id2solvable(pool, source);
- ret = str::form (_("package %s is not installable"), solvable2str(pool, s));
+ ret = str::form (_("%s is not installable"), solvable2str(pool, s));
break;
case SOLVER_PROBLEM_NOTHING_PROVIDES_DEP:
s = pool_id2solvable(pool, source);
@@ -568,16 +568,16 @@
case SOLVER_PROBLEM_PACKAGE_CONFLICT:
s = pool_id2solvable(pool, source);
s2 = pool_id2solvable(pool, target);
- ret = str::form (_("package %s conflicts with %s provided by %s"), solvable2str(pool, s), dep2str(pool, dep), solvable2str(pool, s2));
+ ret = str::form (_("%s conflicts with %s provided by %s"), solvable2str(pool, s), dep2str(pool, dep), solvable2str(pool, s2));
break;
case SOLVER_PROBLEM_PACKAGE_OBSOLETES:
s = pool_id2solvable(pool, source);
s2 = pool_id2solvable(pool, target);
- ret = str::form (_("package %s obsoletes %s provided by %s"), solvable2str(pool, s), dep2str(pool, dep), solvable2str(pool, s2));
+ ret = str::form (_("%s obsoletes %s provided by %s"), solvable2str(pool, s), dep2str(pool, dep), solvable2str(pool, s2));
break;
case SOLVER_PROBLEM_DEP_PROVIDERS_NOT_INSTALLABLE:
s = pool_id2solvable(pool, source);
- ret = str::form (_("package %s requires %s, but none of the providers can be installed"), solvable2str(pool, s), dep2str(pool, dep));
+ ret = str::form (_("%s requires %s, but none of the providers can be installed"), solvable2str(pool, s), dep2str(pool, dep));
break;
}
@@ -642,7 +642,7 @@
if (poolItem) {
if (solv->installed && s->repo == solv->installed) {
problemSolution->addSingleAction (poolItem, KEEP);
- string description = str::form (_("do not deinstall %s"), solvable2str(pool, s));
+ string description = str::form (_("keep %s"), solvable2str(pool, s));
MIL << description << endl;
problemSolution->addDescription (description);
} else {
@@ -679,7 +679,7 @@
functor::chain (resfilter::ByInstalled (), // ByInstalled
resfilter::ByTransact ()), // will be deinstalled
functor::functorRef (info) );
- string description = str::form (_("do not deinstall %s"), id2str(pool, what));
+ string description = str::form (_("keep %s"), id2str(pool, what));
MIL << description << endl;
problemSolution->addDescription (description);
}
@@ -709,7 +709,7 @@
|| poolItem.status().staysInstalled())
problemSolution->addSingleAction (poolItem, KEEP);
}
- string description = str::form (_("do not deinstall all solvables providing %s"), dep2str(pool, what));
+ string description = str::form (_("keep all solvables providing %s"), dep2str(pool, what));
MIL << description << endl;
problemSolution->addDescription (description);
}
@@ -796,7 +796,8 @@
}
}
}
- resolverProblem->addSolution (problemSolution);
+ resolverProblem->addSolution (problemSolution,
+ problemSolution->actionCount() > 1 ? true : false); // Solutions with more than 1 action will be shown first.
MIL << "------------------------------------" << endl;
}
// save problem
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/zypp/sat/SATResolver.cc.bak new/libzypp-4.1.8/zypp/sat/SATResolver.cc.bak
--- old/libzypp-4.1.7/zypp/sat/SATResolver.cc.bak 2008-01-10 16:57:28.000000000 +0100
+++ new/libzypp-4.1.8/zypp/sat/SATResolver.cc.bak 2008-01-14 17:17:04.000000000 +0100
@@ -642,7 +642,7 @@
if (poolItem) {
if (solv->installed && s->repo == solv->installed) {
problemSolution->addSingleAction (poolItem, KEEP);
- string description = str::form (_("do not deinstall %s"), solvable2str(pool, s));
+ string description = str::form (_("keep %s"), solvable2str(pool, s));
MIL << description << endl;
problemSolution->addDescription (description);
} else {
@@ -679,7 +679,7 @@
functor::chain (resfilter::ByInstalled (), // ByInstalled
resfilter::ByTransact ()), // will be deinstalled
functor::functorRef (info) );
- string description = str::form (_("do not deinstall %s"), id2str(pool, what));
+ string description = str::form (_("keep %s"), id2str(pool, what));
MIL << description << endl;
problemSolution->addDescription (description);
}
@@ -709,7 +709,7 @@
|| poolItem.status().staysInstalled())
problemSolution->addSingleAction (poolItem, KEEP);
}
- string description = str::form (_("do not deinstall all solvables providing %s"), dep2str(pool, what));
+ string description = str::form (_("keep all solvables providing %s"), dep2str(pool, what));
MIL << description << endl;
problemSolution->addDescription (description);
}
@@ -796,7 +796,8 @@
}
}
}
- resolverProblem->addSolution (problemSolution);
+ resolverProblem->addSolution (problemSolution,
+ problemSolution->actionCount() > 1 ? true : false); // Solutions with more than 1 action will be shown first.
MIL << "------------------------------------" << endl;
}
// save problem
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/zypp/solver/detail/ProblemSolutionCombi.cc new/libzypp-4.1.8/zypp/solver/detail/ProblemSolutionCombi.cc
--- old/libzypp-4.1.7/zypp/solver/detail/ProblemSolutionCombi.cc 2008-01-10 16:57:31.000000000 +0100
+++ new/libzypp-4.1.8/zypp/solver/detail/ProblemSolutionCombi.cc 2008-01-14 17:17:07.000000000 +0100
@@ -48,6 +48,7 @@
ProblemSolutionCombi::ProblemSolutionCombi( ResolverProblem_Ptr parent)
: ProblemSolution (parent, "", "")
+ , actNumber(0)
{
_description = "";
_details = "";
@@ -56,6 +57,7 @@
void ProblemSolutionCombi::addSingleAction( PoolItem_Ref item, const TransactionKind action)
{
addAction (new TransactionSolutionAction(item, action));
+ actNumber++;
}
void ProblemSolutionCombi::addDescription( const std::string description)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/zypp/solver/detail/ProblemSolutionCombi.cc.bak new/libzypp-4.1.8/zypp/solver/detail/ProblemSolutionCombi.cc.bak
--- old/libzypp-4.1.7/zypp/solver/detail/ProblemSolutionCombi.cc.bak 2008-01-10 16:57:31.000000000 +0100
+++ new/libzypp-4.1.8/zypp/solver/detail/ProblemSolutionCombi.cc.bak 2008-01-14 17:17:06.000000000 +0100
@@ -48,31 +48,35 @@
ProblemSolutionCombi::ProblemSolutionCombi( ResolverProblem_Ptr parent)
: ProblemSolution (parent, "", "")
+ , actNumber = 0
{
_description = "";
_details = "";
}
-void ProblemSolutionCombi::addSingleAction( PoolItem_Ref item, const TransactionKind action,
- const std::string description)
+void ProblemSolutionCombi::addSingleAction( PoolItem_Ref item, const TransactionKind action)
{
- TransactionSolutionAction *actionTransact = new TransactionSolutionAction(item, action);
- addAction (actionTransact);
-
- if (description.size() == 0) {
- ostringstream details;
- details << *actionTransact;
- _details += details.str();
- } else {
- _details += description;
- }
+ addAction (new TransactionSolutionAction(item, action));
+ actNumber++;
}
void ProblemSolutionCombi::addDescription( const std::string description)
{
- if ( _description.size() > 0)
- _description += "\n";
- _description += description;
+ if ( _description.size() == 0
+ && _details.size() == 0) {
+ // first entry
+ _description = description;
+ } else {
+ if ( _description.size() > 0
+ && _details.size() == 0) {
+ // second entry
+ _details = _description;
+ _description = _("Following actions will be done:");
+ }
+ // all other
+ _details += "\n";
+ _details += description;
+ }
}
///////////////////////////////////////////////////////////////////
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/zypp/solver/detail/ProblemSolutionCombi.h new/libzypp-4.1.8/zypp/solver/detail/ProblemSolutionCombi.h
--- old/libzypp-4.1.7/zypp/solver/detail/ProblemSolutionCombi.h 2008-01-10 16:57:31.000000000 +0100
+++ new/libzypp-4.1.8/zypp/solver/detail/ProblemSolutionCombi.h 2008-01-14 17:17:07.000000000 +0100
@@ -44,6 +44,8 @@
**/
class ProblemSolutionCombi : public ProblemSolution
{
+ protected:
+ int actNumber; // number of actions
public:
/**
@@ -54,10 +56,17 @@
* Add a single action
*/
void addSingleAction( PoolItem_Ref item, const TransactionKind action);
+
+ /**
+ * returns the number of actions
+ */
+ int actionCount() { return actNumber;}
+
/**
* Set description text
*/
- void addDescription( const std::string description);
+ void addDescription( const std::string description);
+
};
///////////////////////////////////////////////////////////////////
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/zypp/solver/detail/ProblemSolutionCombi.h.bak new/libzypp-4.1.8/zypp/solver/detail/ProblemSolutionCombi.h.bak
--- old/libzypp-4.1.7/zypp/solver/detail/ProblemSolutionCombi.h.bak 2008-01-10 16:57:30.000000000 +0100
+++ new/libzypp-4.1.8/zypp/solver/detail/ProblemSolutionCombi.h.bak 2008-01-14 17:17:06.000000000 +0100
@@ -53,11 +53,19 @@
/**
* Add a single action
*/
- void addSingleAction( PoolItem_Ref item, const TransactionKind action, const std::string description = "");
+ void addSingleAction( PoolItem_Ref item, const TransactionKind action);
+
+ /**
+ * returns the number of actions
+ */
+ actionCount() { return actNumber;}
+
/**
* Set description text
*/
- void addDescription( const std::string description);
+ void addDescription( const std::string description);
+
+ int actNumber; // number of actions
};
///////////////////////////////////////////////////////////////////
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/zypp/solver/detail/Resolver.cc new/libzypp-4.1.8/zypp/solver/detail/Resolver.cc
--- old/libzypp-4.1.7/zypp/solver/detail/Resolver.cc 2008-01-10 16:57:31.000000000 +0100
+++ new/libzypp-4.1.8/zypp/solver/detail/Resolver.cc 2008-01-14 17:17:07.000000000 +0100
@@ -545,6 +545,11 @@
{
UndoTransact resetting (ResStatus::APPL_HIGH);
+ if ( !getenv("ZYPP_RC_SOLVER")) {
+ WAR << "Will currently not be supported by the SAT-solver" << endl;
+ return true;
+ }
+
_DEBUG ("Resolver::verifySystem() " << (considerNewHardware ? "consider new hardware":""));
invokeOnEach ( _pool.begin(), _pool.end(),
@@ -718,6 +723,11 @@
{
MIL << "Resolver::establishPool()" << endl;
+ if ( !getenv("ZYPP_RC_SOLVER")) {
+ WAR << "Will not be supported by the SAT-solver" << endl;
+ return true;
+ }
+
establishState (); // establish !
ResolverContext_Ptr solution = bestContext();
@@ -844,6 +854,11 @@
{
MIL << "Resolver::freshenPool()" << endl;
+ if ( !getenv("ZYPP_RC_SOLVER")) {
+ WAR << "Will not be supported by the SAT-solver" << endl;
+ return true;
+ }
+
freshenState (NULL, resetAfterSolve); // establish all packages with freshens; (NULL)= no initial context
ResolverContext_Ptr solution = bestContext();
@@ -884,6 +899,10 @@
bool
Resolver::resolveDependencies (const ResolverContext_Ptr context)
{
+ if ( !getenv("ZYPP_RC_SOLVER")) {
+ WAR << "Will not be supported by the SAT-solver; use resolvepool instead" << endl;
+ return false;
+ }
time_t t_start, t_now;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.1.7/zypp/solver/detail/Resolver.cc.bak new/libzypp-4.1.8/zypp/solver/detail/Resolver.cc.bak
--- old/libzypp-4.1.7/zypp/solver/detail/Resolver.cc.bak 2008-01-10 16:57:31.000000000 +0100
+++ new/libzypp-4.1.8/zypp/solver/detail/Resolver.cc.bak 2008-01-14 17:17:06.000000000 +0100
@@ -1291,7 +1291,7 @@
{
// Solving with the satsolver
- if ( getenv("ZYPP_SAT_SOLVER")) {
+ if ( !getenv("ZYPP_RC_SOLVER")) {
MIL << "-------------- Calling SAT Solver -------------------" << endl;
if ( !_satResolver ) {
// syncing with sat pool
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org