Hello community,
here is the log from the commit of package libzypp
checked in at Sun Apr 6 03:42:00 CEST 2008.
--------
--- libzypp/libzypp.changes 2008-04-03 17:38:57.000000000 +0200
+++ libzypp/libzypp.changes 2008-04-04 15:01:41.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Apr 4 14:01:45 CEST 2008 - jreidinger@suse.cz
+
+- add split with respect to escaped delimeters and also for quotes
+- revision 9373
+
+-------------------------------------------------------------------
Old:
----
libzypp-4.7.0.tar.bz2
New:
----
libzypp-4.8.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.X32054/_old 2008-04-06 03:41:04.000000000 +0200
+++ /var/tmp/diff_new_pack.X32054/_new 2008-04-06 03:41:04.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package libzypp (Version 4.7.0)
+# spec file for package libzypp (Version 4.8.0)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -17,9 +17,9 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-build
AutoReqProv: on
Summary: Package, Patch, Pattern, and Product Management
-Version: 4.7.0
+Version: 4.8.0
Release: 1
-Source: libzypp-4.7.0.tar.bz2
+Source: libzypp-4.8.0.tar.bz2
Source1: libzypp-rpmlintrc
Prefix: /usr
Provides: yast2-packagemanager
@@ -63,7 +63,7 @@
%package devel
License: GPL v2 or later
-Requires: libzypp == 4.7.0
+Requires: libzypp == 4.8.0
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 libsatsolver-devel
@@ -157,6 +157,9 @@
%{_libdir}/pkgconfig/libzypp.pc
%changelog
+* Fri Apr 04 2008 jreidinger@suse.cz
+- add split with respect to escaped delimeters and also for quotes
+- revision 9373
* Thu Apr 03 2008 ma@suse.de
- Fixed some missing package and source package attributes.
- revision 9348
++++++ libzypp-4.7.0.tar.bz2 -> libzypp-4.8.0.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.7.0/devel/devel.ma/NewPool.cc new/libzypp-4.8.0/devel/devel.ma/NewPool.cc
--- old/libzypp-4.7.0/devel/devel.ma/NewPool.cc 2008-04-03 17:38:50.000000000 +0200
+++ new/libzypp-4.8.0/devel/devel.ma/NewPool.cc 2008-04-04 15:01:33.000000000 +0200
@@ -35,6 +35,7 @@
#include "zypp/sat/Pool.h"
#include "zypp/sat/LocaleSupport.h"
+#include "zypp/sat/LookupAttr.h"
#include "zypp/sat/detail/PoolImpl.h"
#include
@@ -505,12 +506,15 @@
{
namespace sat
{
-
+#if 0
class LookupAttr
{
public:
LookupAttr()
{}
+ LookupAttr( SolvAttr attr_r )
+ : _attr( attr_r )
+ {}
LookupAttr( SolvAttr attr_r, Repository repo_r )
: _attr( attr_r ), _repo( repo_r )
{}
@@ -519,7 +523,13 @@
{}
public:
- class iterator
+ class iterator : public boost::iterator_adaptor<
+ iterator // Derived
+ , RepoDataIterator * // Base
+ , const sat::Solvable // Value
+ , boost::forward_traversal_tag // CategoryOrTraversal
+ , const sat::Solvable & // Reference
+ >
{
friend bool operator==( const iterator & lhs, const iterator & rhs );
@@ -570,15 +580,16 @@
inline bool operator!=( const LookupAttr::iterator & lhs, const LookupAttr::iterator & rhs )
{ return ! (lhs == rhs); }
- }
+#endif
+ }
}
void ditest( sat::Solvable slv_r )
{
MIL << slv_r << endl;
-
+#if 0
sat::LookupAttr q( sat::SolvAttr::keywords, slv_r );
dumpRange( MIL, q.begin(), q.end() ) << endl;
sat::LookupAttr::iterator a1( q.begin() );
@@ -587,6 +598,7 @@
SEC << ( a1 == q.begin() ) << endl;
SEC << ( a1 == ++q.begin() ) << endl;
return;
+#endif
::_Pool * pool = sat::Pool::instance().get();
::_Repo * repo = slv_r.repository().get();
sat::SolvAttr attr( "susetags:datadir" );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.7.0/package/libzypp.changes new/libzypp-4.8.0/package/libzypp.changes
--- old/libzypp-4.7.0/package/libzypp.changes 2008-04-03 17:38:49.000000000 +0200
+++ new/libzypp-4.8.0/package/libzypp.changes 2008-04-04 15:01:31.000000000 +0200
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Fri Apr 4 14:01:45 CEST 2008 - jreidinger@suse.cz
+
+- add split with respect to escaped delimeters and also for quotes
+- revision 9373
+
+-------------------------------------------------------------------
Thu Apr 3 12:55:50 CEST 2008 - ma@suse.de
- Fixed some missing package and source package attributes.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.7.0/tests/zypp/base/CMakeLists.txt new/libzypp-4.8.0/tests/zypp/base/CMakeLists.txt
--- old/libzypp-4.7.0/tests/zypp/base/CMakeLists.txt 2008-04-03 17:38:49.000000000 +0200
+++ new/libzypp-4.8.0/tests/zypp/base/CMakeLists.txt 2008-04-04 15:01:31.000000000 +0200
@@ -1,3 +1,4 @@
ADD_TESTS(Sysconfig )
+ADD_TESTS(String )
ADD_TESTS( InterProcessMutex InterProcessMutex2 )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.7.0/tests/zypp/base/String_test.cc new/libzypp-4.8.0/tests/zypp/base/String_test.cc
--- old/libzypp-4.7.0/tests/zypp/base/String_test.cc 1970-01-01 01:00:00.000000000 +0100
+++ new/libzypp-4.8.0/tests/zypp/base/String_test.cc 2008-04-04 15:01:31.000000000 +0200
@@ -0,0 +1,47 @@
+#include <string>
+#include <vector>
+#include <iterator>
+
+#include
+
+#include "zypp/base/String.h"
+
+using boost::unit_test::test_suite;
+using boost::unit_test::test_case;
+using namespace boost::unit_test;
+
+using namespace std;
+using namespace zypp;
+using namespace zypp::str;
+
+BOOST_AUTO_TEST_CASE(testsplitEscaped)
+{
+ string s( "simple non-escaped string" );
+ vector<string> v;
+
+ insert_iterator ii (v,v.end());
+ splitEscaped( s, ii );
+ BOOST_CHECK_EQUAL( v.size(), 3 );
+
+ v.clear();
+ s = string( "\"escaped sentence \"" );
+ ii = insert_iterator( v, v.end() );
+ splitEscaped( s, ii );
+ BOOST_CHECK_EQUAL( v.size(), 1 );
+ BOOST_CHECK_EQUAL( v.front(), string( "escaped sentence " ) );
+
+ v.clear();
+ s = string( "\"escaped \\\\sent\\\"ence \\\\\"" );
+ ii = insert_iterator( v, v.end() );
+ splitEscaped( s, ii );
+ BOOST_CHECK_EQUAL( v.size(), 1 );
+ BOOST_CHECK_EQUAL( v.front(), string( "escaped \\sent\"ence \\" ) );
+
+
+ v.clear();
+ s = string( "escaped sentence\\ with\\ space" );
+ ii = insert_iterator( v, v.end() );
+ splitEscaped( s, ii );
+ BOOST_CHECK_EQUAL( v.size(), 2 );
+ BOOST_CHECK_EQUAL( v[1], string( "sentence with space" ) );
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.7.0/VERSION.cmake new/libzypp-4.8.0/VERSION.cmake
--- old/libzypp-4.7.0/VERSION.cmake 2008-04-03 17:38:49.000000000 +0200
+++ new/libzypp-4.8.0/VERSION.cmake 2008-04-04 15:01:32.000000000 +0200
@@ -45,6 +45,6 @@
#
SET(LIBZYPP_MAJOR "4")
-SET(LIBZYPP_MINOR "7")
+SET(LIBZYPP_MINOR "8")
SET(LIBZYPP_COMPATMINOR "7")
SET(LIBZYPP_PATCH "0")
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.7.0/zypp/base/String.h new/libzypp-4.8.0/zypp/base/String.h
--- old/libzypp-4.7.0/zypp/base/String.h 2008-04-03 17:38:50.000000000 +0200
+++ new/libzypp-4.8.0/zypp/base/String.h 2008-04-04 15:01:33.000000000 +0200
@@ -16,6 +16,8 @@
#include <string>
#include
+#include
+
#include "zypp/base/PtrTypes.h"
///////////////////////////////////////////////////////////////////
@@ -321,6 +323,108 @@
}
return ret;
}
+
+ /** Split \a line_r into words with respect to escape delimeters.
+ * Any sequence of characters in \a sepchars_r is treated as
+ * delimiter if not inside "" or "" or escaped by \, but not \\.
+ * The words are passed to OutputIterator \a result_r.
+ * \code
+ * std::vectorstd::string words;
+ * str::splitEscaped( "some line", std::back_inserter(words) )
+ * \endcode
+ *
+ * \code
+ * example splitted strings
+ * normal line -> 2 elements ( "normal", "line" )
+ * escaped\ line -> 1 element( "escaped line" )
+ * "quoted line" -> 1 element same as above
+ * 'quoted line' -> 1 element same as above
+ * "escaped quote\'" -> 1 element ( "escaped quote'" )
+ * \endcode
+ */
+ template<class _OutputIterator>
+ unsigned splitEscaped( const C_Str & line_r,
+ _OutputIterator result_r,
+ const C_Str & sepchars_r = " \t" )
+ {
+ const char * beg = line_r;
+ const char * cur = beg;
+ // skip leading sepchars
+ while ( *cur && ::strchr( sepchars_r, *cur ) )
+ ++cur;
+ unsigned ret = 0;
+ for ( beg = cur; *beg; beg = cur, ++result_r, ++ret )
+ {
+ if ( *cur == '"' || *cur == '\'' )
+ {
+ char closeChar = *cur;
+ ++cur;
+ bool cont = true;
+ while (cont)
+ {
+ while ( *cur && *cur != closeChar)
+ ++cur;
+ if ( *cur == '\0' )
+ {
+ return ret; //TODO parsing exception no closing quote
+ }
+ int escCount = 0;
+ const char * esc = cur-1;
+ while ( esc != beg && *esc == '\\' )
+ {
+ escCount++;
+ --esc;
+ }
+ cont = (escCount % 2 == 1); // find some non escaped escape char
+ cur++; //skip quote
+ }
+
+ std::string s( beg+1, cur-beg-2 ); //without quotes
+ //transform escaped escape
+ boost::replace_all( s, "\\\\", "\\" );
+ //transform escaped quotes (only same as open
+ char tmpn[2] = { closeChar, 0 };
+ char tmpo[3] = { '\\', closeChar, 0 };
+ boost::replace_all( s, tmpo, tmpn );
+
+ *result_r = s;
+ }
+ else
+ {
+ // skip non sepchars
+ while( *cur && !::strchr( sepchars_r, *cur ) )
+ {
+ //ignore char after backslash
+ if ( *cur == '\\' )
+ {
+ ++cur;
+ }
+ ++cur;
+ }
+ // build string
+ std::string s( beg, cur-beg );
+ //transform escaped escape
+ boost::replace_all( s, "\\\\", "\\" );
+
+ const char *delimeter = sepchars_r;
+ while ( *delimeter )
+ {
+ std::string ds("\\");
+ const char tmp[2] = { *delimeter, '\0' };
+ std::string del(tmp);
+ ds+= del;
+ boost::replace_all( s, ds, del );
+ ++delimeter;
+ }
+
+ *result_r = s;
+ }
+ // skip sepchars
+ while ( *cur && ::strchr( sepchars_r, *cur ) )
+ ++cur;
+ }
+ return ret;
+ }
//@}
///////////////////////////////////////////////////////////////////
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.7.0/zypp/CMakeLists.txt new/libzypp-4.8.0/zypp/CMakeLists.txt
--- old/libzypp-4.7.0/zypp/CMakeLists.txt 2008-04-03 17:38:49.000000000 +0200
+++ new/libzypp-4.8.0/zypp/CMakeLists.txt 2008-04-04 15:01:32.000000000 +0200
@@ -514,6 +514,7 @@
sat/Solvable.cc
sat/WhatProvides.cc
sat/LocaleSupport.cc
+ sat/LookupAttr.cc
sat/SATResolver.cc
sat/SolvAttr.cc
)
@@ -523,6 +524,7 @@
sat/Solvable.h
sat/WhatProvides.h
sat/LocaleSupport.h
+ sat/LookupAttr.h
sat/SATResolver.h
sat/SolvAttr.h
)
@@ -876,7 +878,7 @@
TARGET_LINK_LIBRARIES(zypp ${LIBXML_LIBRARY} )
TARGET_LINK_LIBRARIES(zypp ${ZLIB_LIBRARY} )
TARGET_LINK_LIBRARIES(zypp ${SATSOLVER_LIBRARY} )
-TARGET_LINK_LIBRARIES(zypp ${OPENSSL_LIBRARIES})
+TARGET_LINK_LIBRARIES(zypp ${OPENSSL_LIBRARIES})
TARGET_LINK_LIBRARIES(zypp crypto)
INSTALL(TARGETS zypp LIBRARY DESTINATION ${LIB_INSTALL_DIR} )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.7.0/zypp/RepoManager.cc new/libzypp-4.8.0/zypp/RepoManager.cc
--- old/libzypp-4.7.0/zypp/RepoManager.cc 2008-04-03 17:38:50.000000000 +0200
+++ new/libzypp-4.8.0/zypp/RepoManager.cc 2008-04-04 15:01:32.000000000 +0200
@@ -677,6 +677,7 @@
assert_alias(info);
Pathname rawpath = rawcache_path_for_repoinfo(_pimpl->options, info);
+ filesystem::assert_dir(_pimpl->options.repoCachePath);
Pathname base = _pimpl->options.repoCachePath + info.escaped_alias();
Pathname solvfile = base.extend(".solv");
@@ -904,6 +905,7 @@
void RepoManager::setCacheStatus( const string &alias, const RepoStatus &status )
{
+ filesystem::assert_dir(_pimpl->options.repoCachePath);
Pathname base = _pimpl->options.repoCachePath + alias;
Pathname cookiefile = base.extend(".cookie");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.7.0/zypp/ResStatus.cc new/libzypp-4.8.0/zypp/ResStatus.cc
--- old/libzypp-4.7.0/zypp/ResStatus.cc 2008-04-03 17:38:49.000000000 +0200
+++ new/libzypp-4.8.0/zypp/ResStatus.cc 2008-04-04 15:01:32.000000000 +0200
@@ -28,8 +28,6 @@
const ResStatus ResStatus::toBeUninstalledDueToUpgrade (INSTALLED, TRANSACT, EXPLICIT_INSTALL, DUE_TO_UPGRADE);
const ResStatus ResStatus::installed (INSTALLED);
const ResStatus ResStatus::uninstalled (UNINSTALLED);
- const ResStatus ResStatus::recommended (RECOMMENDED);
- const ResStatus ResStatus::suggested (SUGGESTED);
///////////////////////////////////////////////////////////////////
//
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.7.0/zypp/sat/LookupAttr.cc new/libzypp-4.8.0/zypp/sat/LookupAttr.cc
--- old/libzypp-4.7.0/zypp/sat/LookupAttr.cc 1970-01-01 01:00:00.000000000 +0100
+++ new/libzypp-4.8.0/zypp/sat/LookupAttr.cc 2008-04-04 15:01:32.000000000 +0200
@@ -0,0 +1,72 @@
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/sat/LookupAttr.cc
+ *
+*/
+#include <iostream>
+#include "zypp/base/Logger.h"
+
+#include "zypp/sat/detail/PoolImpl.h"
+
+#include "zypp/sat/LookupAttr.h"
+
+using std::endl;
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////
+ namespace sat
+ { /////////////////////////////////////////////////////////////////
+
+ LookupAttr::iterator LookupAttr::begin() const
+ {
+#warning pool search still disabled.
+ if ( ! (_attr && _repo ) )
+ return iterator();
+
+ ::Dataiterator di;
+ if ( _solv )
+ ::dataiterator_init( &di, _solv.repository().id(), _solv.id(), _attr.id(), 0, SEARCH_NO_STORAGE_SOLVABLE );
+ else
+ ::dataiterator_init( &di, _repo.id(), 0, _attr.id(), 0, SEARCH_NO_STORAGE_SOLVABLE );
+ return iterator( /*di*/ );
+ }
+
+ LookupAttr::iterator LookupAttr::end() const
+ {
+ return iterator();
+ }
+
+ std::ostream & operator<<( std::ostream & str, const LookupAttr & obj )
+ {
+ if ( ! obj.attr() )
+ return str << "search nothing";
+
+ str << "seach " << obj.attr() << " in ";
+ if ( obj.solvable() )
+ return str << obj.solvable();
+ if ( obj.repo() )
+ return str << obj.repo();
+ return str << "pool";
+ }
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : LookupAttr::iterator
+ //
+ ///////////////////////////////////////////////////////////////////
+
+
+ /////////////////////////////////////////////////////////////////
+ } // namespace sat
+ ///////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.7.0/zypp/sat/LookupAttr.h new/libzypp-4.8.0/zypp/sat/LookupAttr.h
--- old/libzypp-4.7.0/zypp/sat/LookupAttr.h 1970-01-01 01:00:00.000000000 +0100
+++ new/libzypp-4.8.0/zypp/sat/LookupAttr.h 2008-04-04 15:01:32.000000000 +0200
@@ -0,0 +1,142 @@
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/sat/LookupAttr.h
+ *
+*/
+#ifndef ZYPP_SAT_LOOKUPATTR_H
+#define ZYPP_SAT_LOOKUPATTR_H
+
+#include <iosfwd>
+
+#include "zypp/base/PtrTypes.h"
+#include "zypp/sat/Pool.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////
+ namespace sat
+ { /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : LookupAttr
+ //
+ /** Lightweight attribute lookup.
+ */
+ class LookupAttr
+ {
+ public:
+ /** Default ctor. */
+ LookupAttr()
+ {}
+ /** Lookup \ref SolvAttr in \ref Pool (all repositories). */
+ LookupAttr( SolvAttr attr_r )
+ : _attr( attr_r )
+ {}
+ /** Lookup \ref SolvAttr in one \ref Repository. */
+ LookupAttr( SolvAttr attr_r, Repository repo_r )
+ : _attr( attr_r ), _repo( repo_r )
+ {}
+ /** Lookup \ref SolvAttr in one \ref Solvable. */
+ LookupAttr( SolvAttr attr_r, Solvable solv_r )
+ : _attr( attr_r ), _solv( solv_r )
+ {}
+
+ public:
+ /** \name Search result. */
+ //@{
+ /** Result iterator. */
+ class iterator;
+
+ /** Iterator to the begin of query results. */
+ iterator begin() const;
+
+ /** Iterator behind the end of query results. */
+ iterator end() const;
+
+ //@}
+ public:
+ /** \name What to search. */
+ //@{
+
+ /** The \ref SolvAttr to search. */
+ SolvAttr attr() const
+ { return _attr; }
+
+ /** Set the \ref SolvAttr to search. */
+ void setAttr( SolvAttr attr_r )
+ { _attr = attr_r; }
+
+ //@}
+ public:
+ /** \name Where to search. */
+ //@{
+ /** Wheter to search in \ref Pool. */
+ bool pool() const
+ { return ! (_repo || _solv); }
+
+ /** Set search in \ref Pool (all repositories). */
+ void setPool()
+ {
+ _repo = Repository::noRepository;
+ _solv = Solvable::noSolvable;
+ }
+
+ /** Wheter to search in one \ref Repository. */
+ Repository repo() const
+ { return _repo; }
+
+ /** Set search in one \ref Repository. */
+ void setRepo( Repository repo_r )
+ {
+ _repo = repo_r;
+ _solv = Solvable::noSolvable;
+ }
+
+ /** Wheter to search in one \ref Solvable. */
+ Solvable solvable() const
+ { return _solv; }
+
+ /** Set search in one \ref Solvable. */
+ void setSolvable( Solvable solv_r )
+ {
+ _repo = Repository::noRepository;
+ _solv = solv_r;
+ }
+
+ //@}
+ private:
+ SolvAttr _attr;
+ Repository _repo;
+ Solvable _solv;
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /** \relates Arch stream output. */
+ std::ostream & operator<<( std::ostream & str, const LookupAttr & obj );
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : LookupAttr::iterator
+ //
+ /** Result iterator.
+ */
+ struct LookupAttr::iterator
+ {
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /////////////////////////////////////////////////////////////////
+ } // namespace sat
+ ///////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_SAT_LOOKUPATTR_H
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-4.7.0/zypp/sat/SATResolver.cc new/libzypp-4.8.0/zypp/sat/SATResolver.cc
--- old/libzypp-4.7.0/zypp/sat/SATResolver.cc 2008-04-03 17:38:50.000000000 +0200
+++ new/libzypp-4.8.0/zypp/sat/SATResolver.cc 2008-04-04 15:01:32.000000000 +0200
@@ -525,7 +525,9 @@
PoolItem poolItem = _pool.find (sat::Solvable(p));
if (poolItem) {
- SATSolutionToPool (poolItem, ResStatus::recommended, ResStatus::SOLVER);
+ ResStatus status = poolItem.status();
+ status.setRecommended (true);
+ SATSolutionToPool (poolItem, status, ResStatus::SOLVER);
} else {
ERR << "id " << p << " not found in ZYPP pool." << endl;
}
@@ -541,7 +543,9 @@
PoolItem poolItem = _pool.find (sat::Solvable(p));
if (poolItem) {
- SATSolutionToPool (poolItem, ResStatus::suggested, ResStatus::SOLVER);
+ ResStatus status = poolItem.status();
+ status.setSuggested (true);
+ SATSolutionToPool (poolItem, status, ResStatus::SOLVER);
} else {
ERR << "id " << p << " not found in ZYPP pool." << endl;
}
@@ -728,8 +732,8 @@
for_( iter2, possibleProviders.begin(), possibleProviders.end() ) {
PoolItem provider2 = ResPool::instance().find( *iter2 );
if (compareByNVR (provider1.resolvable(),provider2.resolvable()) == 0
- && (provider1.status().isInstalled() && provider2.status().isUninstalled()
- || provider2.status().isInstalled() && provider1.status().isUninstalled())) {
+ && ( (provider1.status().isInstalled() && provider2.status().isUninstalled())
+ || (provider2.status().isInstalled() && provider1.status().isUninstalled()) )) {
found = true;
break;
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org