libzypp
11.13.5
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
libzypp
Welcome to libzypp
Code Pitfalls - Frequently made mistakes
Code Snippets
Environment Variables
Testing for provided features.
Notes on revisions
Extending ZYpp: Plugins and Hooks
Services
Solver - Vendor protection
Writing and tunning testcases
Libzypp and threads
Todo List
Deprecated List
Modules
Namespaces
Classes
Files
File List
zypp
base
media
misc
parser
pool
repo
sat
solver
target
hal
modalias
rpm
CommitPackageCache.cc
CommitPackageCache.h
CommitPackageCacheImpl.cc
CommitPackageCacheImpl.h
CommitPackageCacheReadAhead.cc
CommitPackageCacheReadAhead.h
HardLocksFile.cc
HardLocksFile.h
RequestedLocalesFile.cc
RequestedLocalesFile.h
SoftLocksFile.cc
SoftLocksFile.h
TargetCallbackReceiver.cc
TargetCallbackReceiver.h
TargetException.cc
TargetException.h
TargetImpl.cc
TargetImpl.h
thread
ui
url
ws
zypp_detail
APIConfig.h
Arch.cc
Arch.h
AutoDispose.h
Bit.h
ByteCount.cc
ByteCount.h
Callback.h
Capabilities.cc
Capabilities.h
Capability.cc
Capability.h
CapMatch.cc
CapMatch.h
Changelog.cc
Changelog.h
CheckSum.cc
CheckSum.h
CountryCode.cc
CountryCode.h
Date.cc
Date.h
Dep.cc
Dep.h
Digest.cc
Digest.h
DiskUsage.cc
DiskUsage.h
DiskUsageCounter.cc
DiskUsageCounter.h
DownloadMode.cc
DownloadMode.h
Edition.cc
Edition.h
ExternalProgram.cc
ExternalProgram.h
Fetcher.cc
Fetcher.h
FileChecker.cc
FileChecker.h
Filter.h
Glob.cc
Glob.h
HistoryLog.cc
HistoryLog.h
HistoryLogData.cc
HistoryLogData.h
IdString.cc
IdString.h
IdStringType.h
InstanceId.cc
InstanceId.h
KeyContext.h
KeyRing.cc
KeyRing.h
KVMap.h
LanguageCode.cc
LanguageCode.h
Locale.cc
Locale.h
Locks.cc
Locks.h
ManagedFile.h
MediaProducts.cc
MediaProducts.h
MediaSetAccess.cc
MediaSetAccess.h
Misc.h
OnMediaLocation.cc
OnMediaLocation.h
Package.cc
Package.h
PackageKeyword.h
Patch.cc
Patch.h
PathInfo.cc
PathInfo.h
Pathname.cc
Pathname.h
Pattern.cc
Pattern.h
PluginFrame.cc
PluginFrame.h
PluginFrameException.cc
PluginFrameException.h
PluginScript.cc
PluginScript.h
PluginScriptException.cc
PluginScriptException.h
PoolItem.cc
PoolItem.h
PoolItemBest.cc
PoolItemBest.h
PoolQuery.cc
PoolQuery.h
PoolQueryResult.cc
PoolQueryResult.h
PoolQueryUtil.tcc
ProblemSolution.cc
ProblemSolution.h
ProblemTypes.h
Product.cc
Product.h
ProgressData.cc
ProgressData.h
ProvideFilePolicy.cc
ProvideFilePolicy.h
PublicKey.cc
PublicKey.h
Range.cc
Range.h
Rel.cc
Rel.h
RelCompare.h
RepoInfo.cc
RepoInfo.h
RepoManager.cc
RepoManager.h
Repository.cc
Repository.h
RepoStatus.cc
RepoStatus.h
ResFilters.h
ResKind.cc
ResKind.h
ResObject.cc
ResObject.h
ResObjects.h
Resolvable.cc
Resolvable.h
Resolver.cc
Resolver.h
ResolverProblem.cc
ResolverProblem.h
ResPool.cc
ResPool.h
ResPoolProxy.cc
ResPoolProxy.h
ResStatus.cc
ResStatus.h
ResTraits.h
ServiceInfo.cc
ServiceInfo.h
Signature.cc
Signature.h
SrcPackage.cc
SrcPackage.h
SysContent.cc
SysContent.h
Target.cc
Target.h
TmpPath.cc
TmpPath.h
TriBool.h
Url.cc
Url.h
Vendor.h
VendorAttr.cc
VendorAttr.h
VendorSupportOptions.cc
VendorSupportOptions.h
ZConfig.cc
ZConfig.h
ZYpp.cc
ZYpp.h
ZYppCallbacks.h
ZYppCommit.h
ZYppCommitPolicy.cc
ZYppCommitPolicy.h
ZYppCommitResult.cc
ZYppCommitResult.h
ZYppFactory.cc
ZYppFactory.h
File Members
TargetImpl.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
12
#ifndef ZYPP_TARGET_TARGETIMPL_H
13
#define ZYPP_TARGET_TARGETIMPL_H
14
15
#include <iosfwd>
16
#include <set>
17
18
#include "
zypp/base/ReferenceCounted.h
"
19
#include "
zypp/base/NonCopyable.h
"
20
#include "
zypp/base/PtrTypes.h
"
21
#include "
zypp/PoolItem.h
"
22
#include "
zypp/ZYppCommit.h
"
23
24
#include "
zypp/Pathname.h
"
25
#include "
zypp/media/MediaAccess.h
"
26
#include "
zypp/Target.h
"
27
#include "
zypp/target/rpm/RpmDb.h
"
28
#include "
zypp/target/TargetException.h
"
29
#include "
zypp/target/RequestedLocalesFile.h
"
30
#include "
zypp/target/SoftLocksFile.h
"
31
#include "
zypp/target/HardLocksFile.h
"
32
34
namespace
zypp
35
{
36
37
namespace
target
38
{
39
40
DEFINE_PTR_TYPE
(TargetImpl);
41
class
CommitPackageCache;
42
44
//
45
// CLASS NAME : TargetImpl
46
//
52
class
TargetImpl
:
public
base::ReferenceCounted
,
private
base::NonCopyable
53
{
54
friend
std::ostream &
operator<<
( std::ostream & str,
const
TargetImpl
& obj );
55
56
public
:
58
typedef
std::list<PoolItem>
PoolItemList
;
59
61
typedef
std::set<PoolItem>
PoolItemSet
;
62
63
public
:
65
TargetImpl
(
const
Pathname & root_r =
"/"
,
bool
doRebuild_r =
false
);
67
virtual
~TargetImpl
();
68
70
static
TargetImpl_Ptr
nullimpl
();
71
76
void
createAnonymousId
()
const
;
77
81
void
createLastDistributionFlavorCache
()
const
;
82
89
private
:
91
Pathname
defaultSolvfilesPath
()
const
;
92
94
Pathname
solvfilesPath
()
const
95
{
return
solvfilesPathIsTemp
() ?
_tmpSolvfilesPath
:
defaultSolvfilesPath
(); }
96
98
bool
solvfilesPathIsTemp
()
const
99
{
return
!
_tmpSolvfilesPath
.empty(); }
100
101
Pathname
_tmpSolvfilesPath
;
102
103
public
:
104
void
load
();
105
106
void
unload
();
107
108
void
clearCache
();
109
110
void
buildCache
();
112
113
public
:
114
116
Pathname
root
()
const
117
{
return
_root
; }
118
120
Pathname
home
()
const
121
{
return
home
(
_root
); }
122
123
static
Pathname
home
(
const
Pathname & root_r )
124
{
return
root_r /
"/var/lib/zypp"
; }
125
127
ZYppCommitResult
commit
(
ResPool
pool_r,
const
ZYppCommitPolicy
& policy_r );
128
130
void
installSrcPackage
(
const
SrcPackage_constPtr & srcPackage_r );
131
133
virtual
std::ostream &
dumpOn
( std::ostream & str )
const
134
{
135
return
str <<
"TargetImpl"
;
136
}
137
139
rpm::RpmDb
&
rpm
();
140
143
bool
providesFile
(
const
std::string & path_str,
const
std::string & name_str)
const
;
144
147
std::string
whoOwnsFile
(
const
std::string & path_str)
const
148
{
return
_rpm
.
whoOwnsFile
(path_str); }
149
151
Date
timestamp
()
const
;
152
154
Product::constPtr
baseProduct
()
const
;
155
157
LocaleSet
requestedLocales
()
const
158
{
return
_requestedLocalesFile
.
locales
(); }
160
static
LocaleSet
requestedLocales
(
const
Pathname & root_r );
161
163
std::string
targetDistribution
()
const
;
165
static
std::string
targetDistribution
(
const
Pathname & root_r );
166
168
std::string
targetDistributionRelease
()
const
;
170
static
std::string
targetDistributionRelease
(
const
Pathname & root_r );
171
173
Target::DistributionLabel
distributionLabel
()
const
;
175
static
Target::DistributionLabel
distributionLabel
(
const
Pathname & root_r );
176
178
std::string
distributionVersion
()
const
;
180
static
std::string
distributionVersion
(
const
Pathname & root_r );
181
183
std::string
distributionFlavor
()
const
;
185
static
std::string
distributionFlavor
(
const
Pathname & root_r );
186
188
std::string
anonymousUniqueId
()
const
;
190
static
std::string
anonymousUniqueId
(
const
Pathname & root_r );
191
192
private
:
194
void
commit
(
const
ZYppCommitPolicy
& policy_r,
195
CommitPackageCache
& packageCache_r,
196
ZYppCommitResult
& result_r );
197
198
protected
:
200
Pathname
_root
;
202
rpm::RpmDb
_rpm
;
204
RequestedLocalesFile
_requestedLocalesFile
;
206
SoftLocksFile
_softLocksFile
;
208
HardLocksFile
_hardLocksFile
;
210
mutable
std::string
_distributionVersion
;
211
212
private
:
214
static
TargetImpl_Ptr
_nullimpl
;
215
};
217
219
inline
std::ostream &
operator<<
( std::ostream & str,
const
TargetImpl
& obj )
220
{
221
return
obj.
dumpOn
( str );
222
}
223
225
}
// namespace target
228
}
// namespace zypp
230
#endif // ZYPP_TARGET_TARGETIMPL_H
zypp
target
TargetImpl.h
Generated by
1.8.1