l = Locale( "dsdf" );
str << str::form("%-25s: ",l.code().c_str()) << p->summary(l) << endl;
OUTS( summary );
- OUTS( installsize );
+ OUTS( installSize );
OUTS( downloadSize );
OUTS( sourcePkgName );
OUTS( sourcePkgEdition );
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
- if ( 1 )
+ if ( 0 )
{
PoolItem pi ( getPi<Patch>("xorg-x11-Xvnc") );
MIL << pi << endl;
}
}
+ SEC << endl;
+ for_( it, pool.knownRepositoriesBegin(), pool.knownRepositoriesEnd() )
+ {
+ USR << *it << endl;
+ it->info().hasLicense();
+ }
+
+ SEC << endl;
+ RepoManager repoManager( makeRepoManager( sysRoot ) );
+ RepoInfoList repos = repoManager.knownRepositories();
+ for_( it, repos.begin(), repos.end() )
+ {
+ USR << *it << endl;
+ it->hasLicense();
+ WAR << it->getLicense( Locale("de_De") ) << endl;
+ }
+
#if 0
getZYpp()->resolver()->addRequire( Capability("amarok") );
solve();
Prefix: /usr
Provides: yast2-packagemanager
Obsoletes: yast2-packagemanager
+Recommends: logrotate
BuildRequires: cmake
BuildRequires: libsatsolver-devel >= 0.12.0 openssl-devel
BuildRequires: boost-devel curl-devel dejagnu doxygen gcc-c++ gettext-devel graphviz hal-devel libxml2-devel
%else
Requires: gnupg
%endif
-
-Requires: satsolver-tools == %( echo `rpm -q --queryformat '%{VERSION}' satsolver-tools`)
+%requires_eq satsolver-tools
%description
Package, Patch, Pattern, and Product Management
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 >= 0.10.14
-Recommends: logrotate
Summary: Package, Patch, Pattern, and Product Management - developers files
Group: System/Packages
Provides: yast2-packagemanager-devel
%dir /etc/zypp/repos.d
%config(noreplace) /etc/zypp/zypp.conf
%config(noreplace) /etc/zypp/systemCheck
+%config(noreplace) %{_sysconfdir}/logrotate.d/zypp-history.lr
%dir %{_var}/lib/zypp
%dir %{_var}/log/zypp
%dir %{_var}/cache/zypp
%{prefix}/bin/package-manager-su
%{_libdir}/libzypp*so.*
%doc %_mandir/man5/locks.5.*
-%{_sysconfdir}/logrotate.d/zypp-history.lr
%files devel
%defattr(-,root,root)
-#include <stdio.h>
-#include <iostream>
-#include <iterator>
-#include <boost/test/auto_unit_test.hpp>
-#include <list>
-
-//#include "zypp/ZYppFactory.h"
+#include "TestSetup.h"
#include "zypp/PoolQuery.h"
#include "zypp/PoolQueryUtil.tcc"
-#include "TestSetup.h"
#define BOOST_TEST_MODULE PoolQuery
-using std::cout;
-using std::endl;
-using std::string;
-using namespace zypp;
-using namespace boost::unit_test;
+/////////////////////////////////////////////////////////////////////////////
+static TestSetup test( "/tmp/x", Arch_x86_64 );
+
+BOOST_AUTO_TEST_CASE(pool_query_init)
+{
+ //test.loadTarget(); // initialize and load target
+ //test.loadRepo( TESTS_SRC_DIR "/data/openSUSE-11.1", "@System" );
+ test.loadRepo( TESTS_SRC_DIR "/data/openSUSE-11.1", "opensuse" );
+ test.loadRepo( TESTS_SRC_DIR "/data/OBS_zypp_svn-11.1", "zyppsvn" );
+ test.loadRepo( TESTS_SRC_DIR "/data/OBS:VirtualBox-11.1", "@system" );
+
+ dumpRange( USR, test.pool().knownRepositoriesBegin(),
+ test.pool().knownRepositoriesEnd() );
+ USR << "pool: " << test.pool() << endl;
+}
+/////////////////////////////////////////////////////////////////////////////
struct PrintAndCount
{
{
zypp::PoolItem pi( zypp::ResPool::instance().find( solvable ) );
cout << pi.resolvable() << endl;
- // name: yast2-sound 2.16.2-9 i586
++_count;
return true;
}
unsigned _count;
};
-/*
-static void init_pool()
-{
- Pathname dir(TESTS_SRC_DIR);
- dir += "/zypp/data/PoolQuery";
-
- ZYpp::Ptr z = getZYpp();
- ZConfig::instance().setSystemArchitecture(Arch("i586"));
-
- RepoInfo i1; i1.setAlias("factory");
- sat::Pool::instance().addRepoSolv(dir / "factory.solv", i1);
- RepoInfo i2; i2.setAlias("factory-nonoss");
- sat::Pool::instance().addRepoSolv(dir / "factory-nonoss.solv", i2);
- RepoInfo i3; i3.setAlias("zypp_svn");
- sat::Pool::instance().addRepoSolv(dir / "zypp_svn.solv", i3);
- RepoInfo i4; i4.setAlias("@System");
- sat::Pool::instance().addRepoSolv(dir / "@System.solv", i4);
-}
-*/
-
-BOOST_AUTO_TEST_CASE(pool_query_init)
-{
- TestSetup test( Arch_x86_64 );
- //test.loadTarget(); // initialize and load target
- test.loadRepo( TESTS_SRC_DIR "/data/openSUSE-11.1", "opensuse" );
- test.loadRepo( TESTS_SRC_DIR "/data/OBS_zypp_svn-11.1", "zyppsvn" );
- test.loadRepo( TESTS_SRC_DIR "/data/OBS:VirtualBox-11.1", "vbox" );
-}
-
#if 0
BOOST_AUTO_TEST_CASE(pool_query_experiment)
{
PoolQuery q;
q.addString("zypper");
- BOOST_CHECK(std::for_each(q.begin(), q.end(), PrintAndCount())._count == 10);
+ BOOST_CHECK(std::for_each(q.begin(), q.end(), PrintAndCount())._count == 11);
}
// default query + one attribute + one string
and sometimes only in description (e.g. bc, lftp). We don't have
any package with 'revers' only in package name, but let's ignore this.
I didn't find a string with the same characteristics giving fewer matches
- :-/ */
+ :-/ */
q.addString("revers");
q.addAttribute(sat::SolvAttr::name);
q.addAttribute(sat::SolvAttr::summary);
q.setMatchGlob();
// creates: ^(.*zy.p|yast.*package.*|.*bzypp)$
BOOST_CHECK(std::for_each(q.begin(), q.end(), PrintAndCount())._count == 11);
-
+
cout << "****500.3****" << endl;
PoolQuery q1;
q1.addString("^libsm[a-z]*[0-9]$");
q.setEdition(Edition("0.12.5"), Rel::GT);
BOOST_CHECK(std::for_each(q.begin(), q.end(), PrintAndCount())._count == 4);
-
+
cout << "****600.2****" << endl;
q.setEdition(Edition("0.12.5"), Rel::LT);