Author: mlandres
Date: Fri Aug 3 13:42:12 2007
New Revision: 6431
URL: http://svn.opensuse.org/viewcvs/zypp?rev=6431&view=rev
Log:
Fixed pattern includes and extends attributes.
Modified:
trunk/libzypp/VERSION.cmake
trunk/libzypp/devel/devel.ma/Parse.cc
trunk/libzypp/zypp/Pattern.h
trunk/libzypp/zypp/cache/CacheAttributes.h
trunk/libzypp/zypp/cache/CacheStore.cc
trunk/libzypp/zypp/detail/PatternImplIf.h
trunk/libzypp/zypp/repo/cached/PatternImpl.cc
trunk/libzypp/zypp/repo/cached/PatternImpl.h
Modified: trunk/libzypp/VERSION.cmake
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/VERSION.cmake?rev=6431&r1=6430&r2=6431&view=diff
==============================================================================
--- trunk/libzypp/VERSION.cmake (original)
+++ trunk/libzypp/VERSION.cmake Fri Aug 3 13:42:12 2007
@@ -47,4 +47,4 @@
SET(LIBZYPP_MAJOR "3")
SET(LIBZYPP_MINOR "13")
SET(LIBZYPP_COMPATMINOR "13")
-SET(LIBZYPP_PATCH "7")
+SET(LIBZYPP_PATCH "8")
Modified: trunk/libzypp/devel/devel.ma/Parse.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/Parse.cc?rev=6431&r1=6430&r2=6431&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/Parse.cc (original)
+++ trunk/libzypp/devel/devel.ma/Parse.cc Fri Aug 3 13:42:12 2007
@@ -48,28 +48,20 @@
{
bool operator()( const PoolItem & obj_r )
{
+ handle( asKind<Pattern>( obj_r ) );
return true;
}
- bool operator()( const ResObject_Ptr & obj_r )
+ void handle( const Pattern_constPtr & p )
{
- SrcPackage_constPtr p( asKind<SrcPackage>( obj_r ) );
- if ( p )
- {
- getZYpp()->installSrcPackage( p );
- SEC << p << endl;
- }
- return true;
- }
+ if ( !p )
+ return;
- bool operator()( const Repository & repo_r )
- {
- USR << repo_r.resolvables() << endl;
- std::for_each( repo_r.resolvables().begin(), repo_r.resolvables().end(), Xprint() );
- return true;
+ MIL << p << endl;
+ if ( ! p->includes().empty() ) DBG << p->includes() << endl;
+ if ( ! p->extends().empty() ) DBG << p->extends() << endl;
}
-
template<class _C>
bool operator()( const _C & obj_r )
{
@@ -262,11 +254,6 @@
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
-bool repolst( const Repository & r )
-{
- USR << (r?"Y":"N") << ": " << r << endl;
- return true;
-}
using namespace zypp;
@@ -308,9 +295,6 @@
pool.begin(),
pool.end() ) << endl;
-
- repolst( Repository::noRepository );
-
for ( RepoInfoList::iterator it = repos.begin(); it != repos.end(); ++it )
{
RepoInfo & nrepo( *it );
@@ -331,15 +315,12 @@
}
SEC << nrepo << endl;
-
Repository nrep( repoManager.createFromCache( nrepo ) );
const zypp::ResStore & store( nrep.resolvables() );
dumpPoolStats( SEC << "Store: " << endl,
store.begin(), store.end() ) << endl;
getZYpp()->addResolvables( store );
-
- repolst( nrep );
}
USR << "pool: " << pool << endl;
@@ -347,12 +328,14 @@
if ( 0 )
{
- zypp::base::LogControl::TmpLineWriter shutUp;
- getZYpp()->initTarget( sysRoot );
+ {
+ zypp::base::LogControl::TmpLineWriter shutUp;
+ getZYpp()->initTarget( sysRoot );
+ }
+ MIL << "Added target: " << pool << endl;
}
- MIL << "Added target: " << pool << endl;
- std::for_each( pool.knownRepositoriesBegin(), pool.knownRepositoriesEnd(), Xprint() );
+ std::for_each( pool.begin(), pool.end(), Xprint() );
///////////////////////////////////////////////////////////////////
INT << "===[END]============================================" << endl << endl;
Modified: trunk/libzypp/zypp/Pattern.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Pattern.h?rev=6431&r1=6430&r2=6431&view=diff
==============================================================================
--- trunk/libzypp/zypp/Pattern.h (original)
+++ trunk/libzypp/zypp/Pattern.h Fri Aug 3 13:42:12 2007
@@ -51,11 +51,12 @@
/** */
Label order() const;
- std::setstd::string install_packages( const Locale & lang = Locale("") ) const;
+ /** \deprecated AFAIK unused old Selection interface method. */
+ std::setstd::string install_packages( const Locale & lang = Locale("") ) const ZYPP_DEPRECATED;
- /** */
+ /** Ui hint. */
const CapSet & includes() const;
- /** */
+ /** Ui hint. */
const CapSet & extends() const;
protected:
Modified: trunk/libzypp/zypp/cache/CacheAttributes.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/cache/CacheAttributes.h?rev=6431&r1=6430&r2=6431&view=diff
==============================================================================
--- trunk/libzypp/zypp/cache/CacheAttributes.h (original)
+++ trunk/libzypp/zypp/cache/CacheAttributes.h Fri Aug 3 13:42:12 2007
@@ -73,6 +73,9 @@
inline const Attribute & attrPatternIsDefault() { static Attribute a("Pattern","isDefault"); return a; }
inline const Attribute & attrPatternOrder() { static Attribute a("Pattern","order"); return a; }
inline const Attribute & attrPatternUserVisible() { static Attribute a("Pattern","userVisible"); return a; }
+ inline const Attribute & attrPatternUiIncludes() { static Attribute a("Pattern","uiIncludes"); return a; }
+ inline const Attribute & attrPatternUiExtends() { static Attribute a("Pattern","uiExtends"); return a; }
+
///////////////////////////////////////////////////////////////////
inline const Attribute & attrProductDistributionEdition() { static Attribute a("Product","distributionEdition"); return a; }
inline const Attribute & attrProductDistributionName() { static Attribute a("Product","distributionName"); return a; }
Modified: trunk/libzypp/zypp/cache/CacheStore.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/cache/CacheStore.cc?rev=6431&r1=6430&r2=6431&view=diff
==============================================================================
--- trunk/libzypp/zypp/cache/CacheStore.cc (original)
+++ trunk/libzypp/zypp/cache/CacheStore.cc Fri Aug 3 13:42:12 2007
@@ -2,7 +2,8 @@
#include <map>
#include "zypp/cache/sqlite3x/sqlite3x.hpp"
-#include "zypp/base/Logger.h"
+#include "zypp/base/Easy.h"
+#include "zypp/base/LogTools.h"
#include "zypp/base/Measure.h"
#include "zypp/ZYppFactory.h"
#include "zypp/ZYpp.h"
@@ -136,8 +137,8 @@
update_disk_usage_cmd.reset( new sqlite3_command (con,
"insert or replace into resolvable_disk_usage (resolvable_id, dir_name_id, files, size) "
"values (:resolvable_id, :dir_name_id, :files, :size)" ));
-
-
+
+
// disable autocommit
con.executenonquery("BEGIN;");
}
@@ -202,7 +203,7 @@
sqlite3_command_ptr append_patch_baseversion_cmd;
sqlite3_command_ptr update_disk_usage_cmd;
-
+
map