libzypp
11.13.5
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
CommitPackageCache.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
#include "
zypp/base/Exception.h
"
15
16
#include "
zypp/target/CommitPackageCache.h
"
17
#include "
zypp/target/CommitPackageCacheImpl.h
"
18
#include "
zypp/target/CommitPackageCacheReadAhead.h
"
19
20
using
std::endl;
21
23
namespace
zypp
24
{
25
26
namespace
target
27
{
28
30
//
31
// CLASS NAME : CommitPackageCache
32
//
34
35
CommitPackageCache::CommitPackageCache
(
Impl
* pimpl_r )
36
: _pimpl( pimpl_r )
37
{
38
assert(
_pimpl
);
39
}
40
41
CommitPackageCache::CommitPackageCache
(
const
Pathname & rootDir_r,
42
const
PackageProvider
& packageProvider_r )
43
{
44
if
( getenv(
"ZYPP_COMMIT_NO_PACKAGE_CACHE"
) )
45
{
46
MIL
<<
"$ZYPP_COMMIT_NO_PACKAGE_CACHE is set."
<< endl;
47
_pimpl
.
reset
(
new
Impl
( packageProvider_r ) );
// no cache
48
}
49
else
50
{
51
_pimpl
.
reset
(
new
CommitPackageCacheReadAhead
( rootDir_r, packageProvider_r ) );
52
}
53
assert(
_pimpl
);
54
}
55
56
CommitPackageCache::~CommitPackageCache
()
57
{}
58
59
void
CommitPackageCache::setCommitList
( std::vector<sat::Solvable> commitList_r )
60
{
61
_pimpl
->
setCommitList
( commitList_r );
62
}
63
64
ManagedFile
CommitPackageCache::get
(
const
PoolItem
& citem_r )
65
{
return
_pimpl
->
get
( citem_r ); }
66
67
/******************************************************************
68
**
69
** FUNCTION NAME : operator<<
70
** FUNCTION TYPE : std::ostream &
71
*/
72
std::ostream &
operator<<
( std::ostream & str,
const
CommitPackageCache
& obj )
73
{
return
str << *obj.
_pimpl
; }
74
76
}
// namespace target
79
}
// namespace zypp
zypp
target
CommitPackageCache.cc
Generated by
1.8.1