libzypp  17.8.0
ZYpp.cc
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #include <iostream>
13 #include "zypp/base/Logger.h"
14 
15 #include "zypp/ZYpp.h"
17 #include "zypp/sat/Pool.h"
18 #include "zypp/ManagedFile.h"
19 
20 using std::endl;
21 
23 namespace zypp
24 {
25 
26  // class ZYpp:
27  // ctor and dtor implemented in ZYppFactory.cc
28 
29  std::ostream & operator<<( std::ostream & str, const ZYpp & obj )
30  { return str << *obj._pimpl; }
31 
33  //
34  // Forward to Impl:
35  //
37 
39  { return _pimpl->pool(); }
40 
42  { return _pimpl->diskUsage(); }
43 
45  { return _pimpl->setPartitions(mp); }
46 
48  { return _pimpl->getPartitions(); }
49 
51  { return _pimpl->poolProxy(); }
52 
53  Resolver_Ptr ZYpp::resolver() const
54  { return _pimpl->resolver(); }
55 
56  KeyRing_Ptr ZYpp::keyRing() const
57  { return _pimpl->keyRing(); }
58 
60  //
61  // Forward to Impl:
62  //
64 
66  { return _pimpl->target(); }
67 
69  { return _pimpl->getTarget(); }
70 
71  void ZYpp::initializeTarget( const Pathname & root, bool doRebuild_r )
72  { _pimpl->initializeTarget( root, doRebuild_r ); }
73 
75  { _pimpl->finishTarget(); }
76 
78  { return _pimpl->commit( policy_r ); }
79 
80  void ZYpp::installSrcPackage( const SrcPackage_constPtr & srcPackage_r )
81  { _pimpl->installSrcPackage( srcPackage_r ); }
82 
83  ManagedFile ZYpp::provideSrcPackage( const SrcPackage_constPtr & srcPackage_r )
84  {return _pimpl->provideSrcPackage( srcPackage_r ); }
86 
88  { return _pimpl->homePath(); }
89 
91  { return _pimpl->tmpPath(); }
92 
93  void ZYpp::setHomePath( const Pathname & path )
94  { _pimpl->setHomePath(path); }
95 
97 } // namespace zypp
Target_Ptr target() const
Definition: ZYppImpl.cc:112
KeyRing_Ptr keyRing() const
Definition: ZYppImpl.h:59
void setHomePath(const Pathname &path)
set the home, if you need to change it
Definition: ZYppImpl.cc:203
Result returned from ZYpp::commit.
ManagedFile provideSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Provides a source package on the Target.
Definition: ZYpp.cc:83
void installSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Install a source package on the Target.
Definition: ZYpp.cc:80
String related utilities and Regular expression matching.
DiskUsageCounter::MountPointSet diskUsage()
Definition: ZYppImpl.cc:86
Pathname tmpPath() const
Get the path where zypp related plugins store temp data.
Definition: ZYpp.cc:90
Resolver_Ptr resolver() const
Definition: ZYppImpl.h:63
ResPoolProxy poolProxy() const
Pool of ui::Selectable.
Definition: ZYpp.cc:50
DiskUsageCounter::MountPointSet getPartitions() const
Definition: ZYppImpl.cc:101
ResPool::instance().proxy();.
Definition: ResPoolProxy.h:34
ResPoolProxy poolProxy() const
Definition: ZYppImpl.h:55
void initializeTarget(const Pathname &root, bool doRebuild_r)
Definition: ZYppImpl.cc:119
Pathname homePath() const
Get the path where zypp related plugins store persistent data and caches.
Definition: ZYpp.cc:87
DiskUsageCounter::MountPointSet getPartitions() const
Definition: ZYpp.cc:47
Target_Ptr target() const
Definition: ZYpp.cc:65
std::set< MountPoint > MountPointSet
ZYppCommitResult commit(const ZYppCommitPolicy &policy_r)
Commit changes and transactions.
Definition: ZYppImpl.cc:148
void setPartitions(const DiskUsageCounter::MountPointSet &mp)
Definition: ZYpp.cc:44
void setHomePath(const Pathname &path)
set the home, if you need to change it
Definition: ZYpp.cc:93
Resolver_Ptr resolver() const
Definition: ZYpp.cc:53
std::ostream & operator<<(std::ostream &str, const Exception &obj)
Definition: Exception.cc:147
Options and policies for ZYpp::commit.
Pathname tmpPath() const
Get the path where zypp related plugins store tmp data.
Definition: ZYppImpl.cc:206
ZYppCommitResult commit(const ZYppCommitPolicy &policy_r)
Commit changes and transactions.
Definition: ZYpp.cc:77
KeyRing_Ptr keyRing() const
Definition: ZYpp.cc:56
void installSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Install a source package on the Target.
Definition: ZYppImpl.cc:183
Pathname homePath() const
Get the path where zypp related plugins store persistent data and caches.
Definition: ZYppImpl.cc:200
ResPool pool() const
Access to the global resolvable pool.
Definition: ZYpp.cc:38
void initializeTarget(const Pathname &root, bool doRebuild_r=false)
Definition: ZYpp.cc:71
Global ResObject pool.
Definition: ResPool.h:60
RW_pointer< Impl > _pimpl
Pointer to implementation.
Definition: ZYpp.h:157
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Definition: AutoDispose.h:92
Target_Ptr getTarget() const
Same as target but returns NULL if target is not initialized, instead of throwing.
Definition: ZYppImpl.h:76
ResPool pool() const
Definition: ZYppImpl.h:52
Target_Ptr getTarget() const
Same as target but returns NULL if target is not initialized, instead of throwing.
Definition: ZYpp.cc:68
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
void setPartitions(const DiskUsageCounter::MountPointSet &mp)
Definition: ZYppImpl.cc:95
DiskUsageCounter::MountPointSet diskUsage()
Definition: ZYpp.cc:41
ManagedFile provideSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Install a source package on the Target.
Definition: ZYppImpl.cc:190
void finishTarget()
Definition: ZYpp.cc:74