ADD_SUBDIRECTORY(devel.dmacvicar)
ADD_SUBDIRECTORY(devel.ma)
-ADD_SUBDIRECTORY(devel.jkupec)
+++ /dev/null
-ADD_DEFINITIONS(
- -DSRC_DIR="${CMAKE_CURRENT_SOURCE_DIR}"
- -DTESTS_SRC_DIR="${LIBZYPP_SOURCE_DIR}/tests"
-)
-
-SET( bridge_SRCS
- bridge/bridge.cc
- bridge/BaseImpl.cc
- bridge/Derived.cc
-)
-
-SET( bridge_HEADERS
- bridge/Base.h
- bridge/BaseImpl.h
- bridge/Derived.h
-)
-
-#ADD_EXECUTABLE( bridge ${bridge_SRCS} )
-#TARGET_LINK_LIBRARIES( bridge zypp )
-
-#ADD_EXECUTABLE( deltarpm deltarpm.cc )
-#TARGET_LINK_LIBRARIES( deltarpm zypp )
-
-#ADD_EXECUTABLE( pathinfo pathinfo.cc )
-#TARGET_LINK_LIBRARIES( pathinfo zypp )
-
-ADD_EXECUTABLE( poolquery poolquery.cc )
-TARGET_LINK_LIBRARIES( poolquery zypp )
-
-ADD_EXECUTABLE( repos repos.cc )
-TARGET_LINK_LIBRARIES( repos zypp )
-
-#ADD_EXECUTABLE( yumparsertest YUMParser_test.cc )
-#TARGET_LINK_LIBRARIES( yumparsertest zypp )
-
-ADD_EXECUTABLE( play play.cc )
-TARGET_LINK_LIBRARIES( play zypp boost_signals )
+++ /dev/null
-#include "zypp/ZYpp.h"
-#include "zypp/ZYppFactory.h"
-#include "zypp/base/Logger.h"
-#include "zypp/base/LogControl.h"
-#include "zypp/base/Measure.h"
-#include "zypp/cache/CacheStore.h"
-#include "zypp/parser/yum/RepoParser.h"
-
-#undef ZYPP_BASE_LOGGER_LOGGROUP
-#define ZYPP_BASE_LOGGER_LOGGROUP "yumparsertest"
-
-using namespace std;
-using namespace zypp;
-using namespace zypp::parser::yum;
-using zypp::debug::Measure;
-
-bool progress_function(ProgressData::value_type p)
-{
- cout << "Parsing YUM source [" << p << "%]" << endl;
-// cout << "\rParsing YUM source [" << p << "%]" << flush;
- return true;
-}
-
-int main(int argc, char **argv)
-{
- base::LogControl::instance().logfile("yumparsertest.log");
-
- if (argc < 2)
- {
- cout << "usage: yumparsertest path/to/yumsourcedir" << endl << endl;
- return 1;
- }
-
- try
- {
- ZYpp::Ptr z = getZYpp();
-
- Measure open_repository_timer("CacheStore: lookupOrAppendRepository");
-
- cache::CacheStore store(getenv("PWD"));
- data::RecordId repository_id = store.lookupOrAppendRepository("somealias");
-
- open_repository_timer.stop();
-
- MIL << "creating PrimaryFileParser" << endl;
- Measure parse_primary_timer("primary.xml.gz parsing");
-
- parser::yum::RepoParser parser( repository_id, store, &progress_function);
- parser.parse(argv[1]);
-
- store.commit();
- parse_primary_timer.stop();
-
- cout << endl;
- }
- catch ( const Exception &e )
- {
- cout << "Oops! " << e.msg() << std::endl;
- }
-
- return 0;
-}
-
-// vim: set ts=2 sts=2 sw=2 et ai:
+++ /dev/null
-#ifndef JK_BASE_H_
-#define JK_BASE_H_
-
-#include "zypp/base/NonCopyable.h"
-
-namespace jk
-{
-
-
- class Base : private zypp::base::NonCopyable
- {
- protected:
- class BaseImpl;
- };
-
-
-} // ns jk
-
-
-#endif /*JK_BASE_H_*/
-
-// vim: set ts=2 sts=2 sw=2 et ai:
-
+++ /dev/null
-#include "BaseImpl.h"
-
-using namespace std;
-
-namespace jk
-{
-
-
- Base::BaseImpl::BaseImpl()
- {}
-
-
-} // ns zypp
-
-// vim: set ts=2 sts=2 sw=2 et ai:
-
+++ /dev/null
-#ifndef JK_BASEIMPL_H_
-#define JK_BASEIMPL_H_
-
-#include "zypp/base/NonCopyable.h"
-#include "Base.h"
-
-namespace jk
-{
-
-
- class Base::BaseImpl : private zypp::base::NonCopyable
- {
- public:
- BaseImpl();
- };
-
-
-} // ns jk
-
-#endif /*JK_BASEIMPL_H_*/
-
-// vim: set ts=2 sts=2 sw=2 et ai:
-
+++ /dev/null
-#include "BaseImpl.h"
-#include "Derived.h"
-
-namespace jk
-{
-
-
- class Derived::Impl : public BaseImpl
- {
- public:
- Impl();
- };
-
- Derived::Impl::Impl()
- {}
-
-
- Derived::Derived() : _pimpl(new Impl())
- {}
-
- Derived::~Derived()
- {}
-
-
-} // ns jk
-
-// vim: set ts=2 sts=2 sw=2 et ai:
-
+++ /dev/null
-#ifndef JK_DERIVED_H_
-#define JK_DERIVED_H_
-
-#include "zypp/base/PtrTypes.h"
-#include "Base.h"
-
-namespace jk
-{
-
-
- class Derived : public Base
- {
- public:
- Derived();
- ~Derived();
-
- private:
- class Impl;
- zypp::RW_pointer<Impl,zypp::rw_pointer::Scoped<Impl> > _pimpl;
- };
-
-
-
-} // ns jk
-
-#endif /*JK_DERIVED_H_*/
+++ /dev/null
-#include<iostream>
-
-#include "zypp/base/Exception.h"
-
-#include "Derived.h"
-
-
-using namespace std;
-using namespace jk;
-using namespace zypp;
-
-int main(int argc, char **argv)
-{
- try
- {
- Derived d;
- }
- catch ( const Exception &e )
- {
- cout << "Oops! " << e.msg() << std::endl;
- }
-
- return 0;
-}
-
-// vim: set ts=2 sts=2 sw=2 et ai:
+++ /dev/null
- <deltainfo>
- <newpackage name="libzypp" epoch="0" version="4.21.3" release="2" arch="i386">
- <delta oldepoch="0" oldversion="4.21.3" oldrelease="1">
- <filename>DRPMS/libzypp-4.21.3-1_4.21.3-2.i386.drpm</filename>
- <sequence>libzypp-4.21.3-1-d3571f98b048b1a870e40241bb46c67ab4</sequence>
- <size>22452</size>
- <checksum type="sha">8f05394695dee9399c204614e21e5f6848990ab7</checksum>
- </delta>
- <delta oldepoch="0" oldversion="4.21.2" oldrelease="3">
- <filename>DRPMS/libzypp-4.21.2-3_4.21.3-2.i386.drpm</filename>
- <sequence>libzypp-4.21.2-3-e82691677eee1e83b4812572c5c9ce8eb</sequence>
- <size>110362</size>
- <checksum type="sha">326658fee45c0baec1e70231046dbaf560f941ce</checksum>
- </delta>
- </newpackage>
- </deltainfo>
-
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<repomd xmlns="http://linux.duke.edu/metadata/repo">
- <data type="other">
- <location href="repodata/other.xml.gz"/>
- <checksum type="sha">d41033826a12ce44a1b33eff2e7905785e0999da</checksum>
- <timestamp>1211014822</timestamp>
- <open-checksum type="sha">319b2951aad2417c8961442ba692d4700962043b</open-checksum>
- </data>
- <data type="updateinfo">
- <location href="repodata/updateinfo.xml.gz"/>
- <checksum type="sha">4f8f83525b232db93a761ed1be79515956b574cf</checksum>
- <timestamp>1211014822</timestamp>
- <open-checksum type="sha">70eb95f379e0db1c9815f0a1cb2269d93e408015</open-checksum>
- </data>
- <data type="primary">
- <location href="repodata/primary.xml.gz"/>
- <checksum type="sha">28a6aae0cd873e1df286d4a07fc7e54263fec79d</checksum>
- <timestamp>1211014821</timestamp>
- <open-checksum type="sha">5ad445e403218ef4a6585dbfc37ccf31d5a10096</open-checksum>
- </data>
- <data type="filelists">
- <location href="repodata/filelists.xml.gz"/>
- <checksum type="sha">553f609c610b0cf51b54efc4c5c618537707ac8d</checksum>
- <timestamp>1211014821</timestamp>
- <open-checksum type="sha">8c840e0b03ad8c2ed0d4ddf57f9a6b5cea3ac412</open-checksum>
- </data>
- <data type="deltainfo">
- <location href="repodata/deltainfo.xml"/>
- <checksum type="sha">cb4c1c8b35d3c486dde918de72a4e630434e5b40</checksum>
- <timestamp>1210522397</timestamp>
- <open-checksum type="sha">cb4c1c8b35d3c486dde918de72a4e630434e5b40</open-checksum>
- </data>
-</repomd>
+++ /dev/null
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.0.7 (GNU/Linux)
-
-iD8DBQBILp6nqE7a6JyACsoRApMoAKCSmiVFYUOGXhWikMAKRrh0Lp0jaQCf
-YN82OkmNZJRvtpBFUs/R5iCx7CU=
-=BuV4
------END PGP SIGNATURE-----
+++ /dev/null
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.4.0 (GNU/Linux)
-
-mQGiBDnu9IERBACT8Y35+2vv4MGVKiLEMOl9GdST6MCkYS3yEKeueNWc+z/0Kvff
-4JctB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0hHHJN3D3EN8C1yPqZd5CvvznYv
-B6bWBIpWcRgdn2DUVMmpU661jwqGlRz1F84JG/xe4jGuzgpJt9IXSzyohEJB6XG5
-+D0BuQINBDnu9JIQCACEkdBN6Mxf5WvqDWkcMRy6wnrd9DYJ8UUTmIT2iQf07tRU
-KJJ9v0JXfx2Z4d08IQSMNRaq4VgSe+PdYgIy0fbj23Via5/gO7fJEpD2hd2f+pMn
-OWvH2rOOIbeYfuhzAc6BQjAKtmgR0ERUTafTM9Wb6F13CNZZNZfDqnFDP6L12w3z
-3F7FFXkz07Rs3AIto1ZfYZd4sCSpMr/0S5nLrHbIvGLp271hhQBeRmmoGEKO2JRe
-lGgUJ2CUzOdtwDIKT0LbCpvaP8PVnYF5IFoYJIWRHqlEt5ucTXstZy7vYjL6vTP4
-l5xs+LIOkNmPhqmfsgLzVo0UaLt80hOwc4NvDCOLAAMGB/9g+9V3ORzw4LvO1pwR
-YJqfDKUq/EJ0rNMMD4N8RLpZRhKHKJUm9nNHLbksnlZwrbSTM5LpC/U6sheLP+l0
-bLVoq0lmsCcUSyh+mY6PxWirLIWCn/IAZAGnXb6Zd6TtIJlGG6pqUN8QxGJYQnon
-l0uTJKHJENbI9sWHQdcTtBMc34gorHFCo1Bcvpnc1LFLrWn7mfoGx6INQjf3HGQp
-MXAWuSBQhzkazY6vaWFpa8bBJ+gKbBuySWzNm3rFtT5HRKMWpO+M9bHp4d+puY0L
-1YwN1OMatcMMpcWnZpiWiR83oi32+xtWUY2U7Ae38mMag8zFbpeqPQUsDv9V7CAJ
-1dbriEwEGBECAAwFAkDYBnoFCQ5t3+gACgkQqE7a6JyACspnpgCfRbYwxT3iq+9l
-/PgNTUNTZOlof2oAn25y0eGi0371jap9kOV6uq71sUuO
-=pJli
------END PGP PUBLIC KEY BLOCK-----
+++ /dev/null
- <deltainfo>
- <newpackage name="libzypp" epoch="0" version="4.21.3" release="2" arch="i386">
- <delta oldepoch="0" oldversion="4.21.3" oldrelease="1">
- <filename>DRPMS/libzypp-4.21.3-1_4.21.3-2.i386.drpm</filename>
- <sequence>libzypp-4.21.3-1-d3571f98b048b1a870e40241bb46c67ab4</sequence>
- <size>22452</size>
- <checksum type="sha">8f05394695dee9399c204614e21e5f6848990ab7</checksum>
- </delta>
- <delta oldepoch="0" oldversion="4.21.2" oldrelease="3">
- <filename>DRPMS/libzypp-4.21.2-3_4.21.3-2.i386.drpm</filename>
- <sequence>libzypp-4.21.2-3-e82691677eee1e83b4812572c5c9ce8eb</sequence>
- <size>110362</size>
- <checksum type="sha">326658fee45c0baec1e70231046dbaf560f941ce</checksum>
- </delta>
- </newpackage>
- </deltainfo>
-
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<repomd xmlns="http://linux.duke.edu/metadata/repo">
- <data type="other">
- <location href="repodata/other.xml.gz"/>
- <checksum type="sha">d41033826a12ce44a1b33eff2e7905785e0999da</checksum>
- <timestamp>1211014822</timestamp>
- <open-checksum type="sha">319b2951aad2417c8961442ba692d4700962043b</open-checksum>
- </data>
- <data type="updateinfo">
- <location href="repodata/updateinfo.xml.gz"/>
- <checksum type="sha">4f8f83525b232db93a761ed1be79515956b574cf</checksum>
- <timestamp>1211014822</timestamp>
- <open-checksum type="sha">70eb95f379e0db1c9815f0a1cb2269d93e408015</open-checksum>
- </data>
- <data type="primary">
- <location href="repodata/primary.xml.gz"/>
- <checksum type="sha">28a6aae0cd873e1df286d4a07fc7e54263fec79d</checksum>
- <timestamp>1211014821</timestamp>
- <open-checksum type="sha">5ad445e403218ef4a6585dbfc37ccf31d5a10096</open-checksum>
- </data>
- <data type="filelists">
- <location href="repodata/filelists.xml.gz"/>
- <checksum type="sha">553f609c610b0cf51b54efc4c5c618537707ac8d</checksum>
- <timestamp>1211014821</timestamp>
- <open-checksum type="sha">8c840e0b03ad8c2ed0d4ddf57f9a6b5cea3ac412</open-checksum>
- </data>
- <data type="deltainfo">
- <location href="repodata/deltainfo.xml"/>
- <checksum type="sha">cb4c1c8b35d3c486dde918de72a4e630434e5b40</checksum>
- <timestamp>1210522397</timestamp>
- <open-checksum type="sha">cb4c1c8b35d3c486dde918de72a4e630434e5b40</open-checksum>
- </data>
-</repomd>
+++ /dev/null
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.0.7 (GNU/Linux)
-
-iD8DBQBILp6nqE7a6JyACsoRApMoAKCSmiVFYUOGXhWikMAKRrh0Lp0jaQCf
-YN82OkmNZJRvtpBFUs/R5iCx7CU=
-=BuV4
------END PGP SIGNATURE-----
+++ /dev/null
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.4.0 (GNU/Linux)
-
-mQGiBDnu9IERBACT8Y35+2vv4MGVKiLEMOl9GdST6MCkYS3yEKeueNWc+z/0Kvff
-4JctBsgs47tjmiI9sl0eHjm3gTR8rItXMN6sJEUHWzDP+Y0PFPboMvKx0FXl/A0d
-M+HFrruCgBlWt6FA+okRySQiliuI5phwqkXefl9AhkwR8xocQSVCFxcwvwCglVcO
-QliHu8jwRQHxlRE0tkwQQI0D+wfQwKdvhDplxHJ5nf7U8c/yE/vdvpN6lF0tmFrK
-XBUX+K7u4ifrZlQvj/81M4INjtXreqDiJtr99Rs6xa0ScZqITuZC4CWxJa9GynBE
-D3+D2t1V/f8l0smsuYoFOF7Ib49IkTdbtwAThlZp8bEhELBeGaPdNCcmfZ66rKUd
-G5sRA/9ovnc1krSQF2+sqB9/o7w5/q2qiyzwOSTnkjtBUVKn4zLUOf6aeBAoV6NM
-CC3Kj9aZHfA+ND0ehPaVGJgjaVNFhPi4x0e7BULdvgOoAqajLfvkURHAeSsxXIoE
-myW/xC1sBbDkDUIBSx5oej73XCZgnj/inphRqGpsb+1nKFvF+rQoU3VTRSBQYWNr
-YWdlIFNpZ25pbmcgS2V5IDxidWlsZEBzdXNlLmRlPohiBBMRAgAiBQJA2AY+AhsD
-BQkObd+9BAsHAwIDFQIDAxYCAQIeAQIXgAAKCRCoTtronIAKypCfAJ9RuZ6ZSV7Q
-W4pTgTIxQ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FCo1Bcvpnc1LFLrWn7mfoGx6INQjf3HGQp
-MXAWuSBQhzkazY6vaWFpa8bBJ+gKbBuySWzNm3rFtT5HRKMWpO+M9bHp4d+puY0L
-1YwN1OMatcMMpcWnZpiWiR83oi32+xtWUY2U7Ae38mMag8zFbpeqPQUsDv9V7CAJ
-1dbriEwEGBECAAwFAkDYBnoFCQ5t3+gACgkQqE7a6JyACspnpgCfRbYwxT3iq+9l
-/PgNTUNTZOlof2oAn25y0eGi0371jap9kOV6uq71sUuO
-=pJli
------END PGP PUBLIC KEY BLOCK-----
+++ /dev/null
-a file
\ No newline at end of file
+++ /dev/null
-afile
\ No newline at end of file
+++ /dev/null
-another file
\ No newline at end of file
+++ /dev/null
-subdir/anotherfile
\ No newline at end of file
+++ /dev/null
--- what kinds of resolvables have been read?
-select * from types where class = 'kind';
-
--- what languages have been encountered?
-select * from types where class = 'lang';
-
--- what architectures have been read?
-select * from types where class = 'arch';
-
--- what types of dependencies have been encountered?
-select * from types where class = 'deptype';
-
--- ----------------------------------------------------------------------------
-
--- how many packages have been read?
-select count(*) from resolvables r, types t where t.class = 'kind' and t.name = 'package' and t.id = r.kind;
-
--- print resolvable kind -> count table
-select t.name, count(*) from resolvables r, types t where t.class = 'kind' and t.id = r.kind group by t.name;
-
--- what patches have been read? print id, name, and version
-select r.id, r.name, r.version from resolvables r, types t where t.class = 'kind' and t.name = 'patch' and t.id = r.kind;
-
--- ----------------------------------------------------------------------------
-
--- print all text and numeric attributes of resolvable with id = 2
-select a.weak_resolvable_id "res-id", t.class "attr-class", t.name "attr-name", a.text "value"
- from text_attributes a, types t
- where t.id = a.attr_id and a.weak_resolvable_id = 2
-union
-select a.weak_resolvable_id "res-id", t.class "attr-class", t.name "attr-name", a.value "value"
- from numeric_attributes a, types t
- where t.id = a.attr_id and a.weak_resolvable_id = 2
-order by t.class
-
--- print all named dependencies of resolvable with id = 2
-select dt.name "dtype", kt.name "kind", n.name "name", rt.name "rel", c.version "version"
- from named_capabilities c, types dt, types kt, types rt, names n
- where c.dependency_type = dt.id
- and c.refers_kind= kt.id
- and c.relation = rt.id
- and c.name_id = n.id
- and c.resolvable_id = 2;
-
--- print all file dependencies of resolvable with id = 2
-select dt.name "dtype", kt.name "kind", (dname.name || '/' || fname.name) "file"
- from file_capabilities c, types dt, types kt, files f
- left outer join file_names fname on fname.id = f.file_name_id
- left outer join dir_names dname on dname.id = f.dir_name_id
- where c.dependency_type = dt.id
- and c.refers_kind= kt.id
- and c.file_id = f.id
- and c.resolvable_id = 2;
-
+++ /dev/null
-#include <stdio.h>
-#include <iostream>
-#include <iterator>
-#include <list>
-
-extern "C"
-{
-#include <solv/repo.h>
-}
-
-#include "zypp/ZYppFactory.h"
-#include "zypp/Pathname.h"
-
-#include "zypp/RepoManager.h"
-#include "zypp/repo/DeltaCandidates.h"
-#include "zypp/PoolQuery.h"
-
-using std::cout;
-using std::endl;
-using std::string;
-using namespace zypp;
-
-
-struct PrintAndCount
-{
- PrintAndCount() : _count(0) {}
-
- bool operator()( const sat::Solvable & solvable )
- {
- 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;
-};
-
-
-
-int main (int argc, const char ** argv)
-{
- Pathname rootdir(SRC_DIR "/data/deltarpm");
- RepoManagerOptions opts(rootdir);
- opts.repoRawCachePath = rootdir;
- opts.repoSolvCachePath = rootdir;
- RepoManager rm(opts);
-
- RepoInfo updates;
- updates.setAlias("updates");
- updates.addBaseUrl(Url(string("dir:") + rootdir.absolutename().asString() + "/updates"));
-
- RepoInfo updates2;
- updates2.setAlias("updates2");
- updates2.addBaseUrl(Url(string("dir:") + rootdir.absolutename().asString() + "/updates2"));
-
- try
- {
- rm.buildCache(updates);
- rm.buildCache(updates2);
- rm.loadFromCache(updates);
- rm.loadFromCache(updates2);
- }
- catch (const Exception & e)
- {
- cout << "Problem getting the data: " << e.msg() << endl;
- }
-
- sat::Pool pool(sat::Pool::instance());
- for_(repoit, pool.reposBegin(), pool.reposEnd())
- {
- Repository repo(*repoit);
- for (int i = 0; i < repo.get()->nextra; ++i)
- {
- cout << endl << "extra " << i << ":" << endl;
- ::Dataiterator di;
- ::dataiterator_init(&di, repo.get(), -1 - i, 0, 0, SEARCH_EXTRA | SEARCH_NO_STORAGE_SOLVABLE);
- while (::dataiterator_step(&di))
- {
- const char * keyname;
- keyname = ::id2str(repo.get()->pool, di.key->name);
-
- cout << keyname << ": ";
-
- switch (di.key->name)
- {
- case DELTA_PACKAGE_NAME:
- {
- cout << IdString(di.kv.id);
- break;
- }
- case DELTA_PACKAGE_EVR:
- {
- cout << IdString(di.kv.id);
- break;
- }
- case DELTA_PACKAGE_ARCH:
- {
- cout << IdString(di.kv.id);
- break;
- }
- case DELTA_LOCATION_DIR:
- {
- cout << IdString(di.kv.id);
- break;
- }
- case DELTA_LOCATION_NAME:
- {
- cout << IdString(di.kv.id);
- break;
- }
- case DELTA_LOCATION_EVR:
- {
- cout << IdString(di.kv.id);
- break;
- }
- case DELTA_LOCATION_SUFFIX:
- {
- cout << IdString(di.kv.id);
- break;
- }
- case DELTA_DOWNLOADSIZE:
- {
- cout << di.kv.num;
- break;
- }
- case DELTA_CHECKSUM:
- {
- cout << di.kv.str;
- break;
- }
- case DELTA_BASE_EVR:
- {
- cout << IdString(di.kv.id);
- break;
- }
- case DELTA_SEQ_NAME:
- {
- cout << IdString(di.kv.id);
- break;
- }
- case DELTA_SEQ_EVR:
- {
- cout << IdString(di.kv.id);
- break;
- }
- case DELTA_SEQ_NUM:
- {
- cout << di.kv.str;
- break;
- }
- default:
- cout << "ingoring " << IdString(di.key->name) << endl;
- }
- cout << endl;
- }
- }
- }
-
- PoolQuery q;
- q.addKind(ResKind::package);
- q.addAttribute(sat::SolvAttr::name, "libzypp");
- q.setMatchExact();
-
- std::for_each(q.begin(), q.end(), PrintAndCount());
-
- PoolItem pi(*q.poolItemBegin());
- if (pi)
- {
- Package::constPtr p = asKind<Package>(pi.resolvable());
-
- std::list<Repository> repos( pool.reposBegin(), pool.reposEnd() );
- repo::DeltaCandidates deltas(repos, p->name());
- deltas.deltaRpms(p);
- }
- else
- cout << "no such package" << endl;
-}
+++ /dev/null
-#include <iostream>
-
-#include "zypp/Pathname.h"
-#include "zypp/PathInfo.h"
-
-using std::cout;
-using std::endl;
-using std::string;
-using namespace zypp;
-
-int main (int argc, const char ** argv)
-{
- Pathname datadir(SRC_DIR "/data/pathinfo");
- Pathname alink = datadir / "alink";
- PathInfo alinkinfo(alink);
-
- cout << "alink exists: " << alinkinfo.isExist() << endl;
- Pathname alinkExp = filesystem::expandlink(alink);
- cout << "alink expands to: " << alinkExp << endl;
- cout << "alinkExp exists: " << PathInfo(alinkExp).isExist() << endl;
-
- Pathname subdirlink = datadir / "subdirlink";
- PathInfo subdirlinkinfo(subdirlink);
-
- cout << "subdirlink exists: " << subdirlinkinfo.isExist() << endl;
- Pathname subdirlinkExp = filesystem::expandlink(subdirlink);
- cout << "subdirlink expands to: " << subdirlinkExp << endl;
- cout << "subdirlinkExp exists: " << PathInfo(subdirlinkExp).isExist() << endl;
-}
+++ /dev/null
-#include <iostream>
-
-#include "zypp/base/LogTools.h"
-#include "zypp/ZYppCallbacks.h"
-
-#include "zypp/parser/HistoryLogReader.h"
-#include "zypp/parser/ParseException.h"
-
-using std::endl;
-using std::cout;
-using namespace zypp;
-
-bool progress_function(const ProgressData & p)
-{
- cout << ".";
- return true;
-}
-
-struct HistoryItemCollector
-{
- std::vector<HistoryItem::Ptr> items;
-
- bool operator()( const HistoryItem::Ptr & item_ptr )
- {
- items.push_back(item_ptr);
- //cout << *item_ptr << endl;
- return true;
- }
-};
-
-// ---------------------------------------------------------------------------
-
-int main( int argc, const char * argv[] )
-{
- --argc; ++argv; // skip arg 0
-
- HistoryItemCollector ic;
- parser::HistoryLogReader reader(*argv, boost::ref(ic));
- reader.setIgnoreInvalidItems(true);
- ProgressReportReceiver progress;
- progress.connect();
- try
- {
- //reader.readAll(&progress_function);
- reader.readFromTo(Date("2009-01-01", "%Y-%m-%d"), Date("2009-01-02", "%Y-%m-%d"));
- }
- catch (const parser::ParseException & e)
- {
- cout << "error in " << *argv << ":" << endl;
- cout << e.asUserHistory() << endl;
- }
- progress.disconnect();
-
- cout << "got " << ic.items.size() << endl;
- return 0;
-}
+++ /dev/null
-#include <stdio.h>
-#include <iostream>
-#include <iterator>
-#include <list>
-
-#include "zypp/ZYppFactory.h"
-#include "zypp/PoolQuery.h"
-#include "zypp/PoolQueryUtil.tcc"
-#include "zypp/RepoInfo.h"
-#include "zypp/Arch.h"
-#include "zypp/Pathname.h"
-#include "zypp/base/Regex.h"
-
-using std::cout;
-using std::endl;
-using std::string;
-using namespace zypp;
-
-
-bool result_cb( const sat::Solvable & solvable )
-{
- zypp::PoolItem pi( zypp::ResPool::instance().find( solvable ) );
- cout << pi.resolvable() << endl;
- // name: yast2-sound 2.16.2-9 i586
- return true;
-}
-
-
-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 i5; i5.setAlias("pyton");
- sat::Pool::instance().addRepoSolv(dir / "python.solv", i5);
- RepoInfo i4; i4.setAlias("@System");
- sat::Pool::instance().addRepoSolv(dir / "@System.solv", i4);
-}
-
-
-int main (int argc, const char ** argv)
-{
- // ./poolquery regex string
- if (argc == 3)
- {
- str::regex regex(argv[1], REG_EXTENDED | REG_NOSUB | REG_NEWLINE | REG_ICASE);
- cout << (str::regex_match(argv[2], regex) ? "" : "no") << "match" << endl;
- }
-
- init_pool();
-
- PoolQuery q;
- q.addAttribute(sat::SolvAttr::name, "cjson");
-
- /*
- PoolQuery q;
- q.addString("weather");
- q.addAttribute(sat::SolvAttr::name, "thunder");
- q.addAttribute(sat::SolvAttr::description, "storm");
- q.addKind(ResKind::package);
- q.addRepo("factory");
-*/
- std::for_each(q.begin(), q.end(), &result_cb);
-// cout << q.size() << endl;
-// cout << q << endl;
- cout << "=====" << endl;
- for_(it, q.selectableBegin(), q.selectableEnd())
- cout << *it << endl;
-}
+++ /dev/null
-#include <stdio.h>
-#include <iostream>
-#include <iterator>
-#include <list>
-
-#include "zypp/ZYppFactory.h"
-#include "zypp/RepoInfo.h"
-#include "zypp/Arch.h"
-#include "zypp/Pathname.h"
-#include "zypp/RepoManager.h"
-
-using std::cout;
-using std::endl;
-using std::string;
-using namespace zypp;
-
-
-bool result_cb( const sat::Solvable & solvable )
-{
- zypp::PoolItem pi( zypp::ResPool::instance().find( solvable ) );
- cout << pi.resolvable() << endl;
- // name: yast2-sound 2.16.2-9 i586
- return true;
-}
-
-
-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);
-}
-
-
-int main (int argc, const char ** argv)
-{
- string _target_root = "/local/jkupec/rr";
-
- RepoManagerOptions repo_options(_target_root);
- // repo_options.knownReposPath = Pathname(_target_root) + repo_options.knownReposPath;
-
- RepoManager rm(repo_options);
-
- for ( RepoManager::RepoConstIterator it = rm.repoBegin();
- it != rm.repoEnd(); ++it )
- {
- cout << it->packagesPath() << endl;
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- valid against patterns.rnc r5590 -->
-<patterns
- xmlns="http://novell.com/package/metadata/suse/pattern"
- xmlns:rpm="http://linux.duke.edu/metadata/rpm"
- count="2">
- <pattern>
- <name>example pattern</name>
- <summary lang="en">Just an example pattern</summary>
- <summary lang="sk">Toto je len príklad patternu</summary>
- <description lang="en">Description of the example pattern</description>
- <description lang="sk">Detailnejší popis patternu</description>
- <!-- <default/> -->
- <uservisible/>
- <category lang="en">Services</category>
- <category lang="sk">Služby</category>
- <icon>repodata/example-pattern.png</icon>
- <rpm:requires>
- <rpm:entry kind="package" name="pikaball" epoch="0" ver="3.0" rel="3" flags="GE"/>
- </rpm:requires>
- </pattern>
- <pattern>
- <name>funky apps</name>
- <summary lang="en">Just an example of funky pattern</summary>
- <summary lang="sk">Príklad funky patternu</summary>
- <description lang="en">The best apps</description>
- <description lang="sk">Najsamlepjšie programčoke</description>
- <default/>
- <uservisible/>
- <category lang="en">Desktop Apps</category>
- <category lang="sk">Klientské aplikácie</category>
- <icon>repodata/funky-apps-pattern.png</icon>
- <rpm:requires>
- <rpm:entry kind="product" name="konsole" epoch="0" ver="2.1.5" rel="1" flags="GE"/>
- </rpm:requires>
- </pattern>
-</patterns>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- valid against products.rnc r5591 -->
-<products
- xmlns="http://novell.com/package/metadata/suse/products"
- xmlns:rpm="http://linux.duke.edu/metadata/rpm">
- <product type="type">
- <vendor>Novell, Inc.</vendor>
- <name>SLES10-SP1</name>
- <version epoch="0" ver="10.0.15" rel="1"/>
- <displayname lang="en">SUSE Linux Enterprise Server 10 SP1</displayname>
- <shortname lang="en">SLES 10 SP1</shortname>
- <description lang="en">The best server OS so far</description>
- <description lang="sk">Doposiaľ najlepší OS pre servery</description>
- <rpm:requires>
- <rpm:entry kind="ackage" name="pikaball" epoch="0" ver="3.0" rel="3" flags="GE" pre="1"/>
- <rpm:entry kind="package" name="base" epoch="0" ver="3.0" rel="3" flags="GE"/>
- </rpm:requires>
- <rpm:provides>
- <rpm:entry kind="product" name="SLES10-SP1"/>
- </rpm:provides>
- </product>
-</products>