libzypp
12.16.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
User data as transaction id
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
#include "
zypp/ManagedFile.h
"
33
35
namespace
zypp
36
{
37
38
namespace
target
39
{
40
41
DEFINE_PTR_TYPE
(TargetImpl);
42
class
CommitPackageCache;
43
45
//
46
// CLASS NAME : TargetImpl
47
//
53
class
TargetImpl
:
public
base::ReferenceCounted
,
private
base::NonCopyable
54
{
55
friend
std::ostream &
operator<<
( std::ostream & str,
const
TargetImpl
& obj );
56
57
public
:
59
typedef
std::list<PoolItem>
PoolItemList
;
60
62
typedef
std::set<PoolItem>
PoolItemSet
;
63
64
public
:
66
TargetImpl
(
const
Pathname & root_r =
"/"
,
bool
doRebuild_r =
false
);
68
virtual
~TargetImpl
();
69
71
static
TargetImpl_Ptr
nullimpl
();
72
77
void
createAnonymousId
()
const
;
78
82
void
createLastDistributionFlavorCache
()
const
;
83
90
private
:
92
Pathname
defaultSolvfilesPath
()
const
;
93
95
Pathname
solvfilesPath
()
const
96
{
return
solvfilesPathIsTemp
() ?
_tmpSolvfilesPath
:
defaultSolvfilesPath
(); }
97
99
bool
solvfilesPathIsTemp
()
const
100
{
return
!
_tmpSolvfilesPath
.empty(); }
101
102
Pathname
_tmpSolvfilesPath
;
103
104
public
:
105
void
load
(
bool
force =
true
);
106
107
void
unload
();
108
109
void
reload
();
110
111
void
clearCache
();
112
113
bool
buildCache
();
115
116
public
:
117
119
Pathname
root
()
const
120
{
return
_root
; }
121
123
Pathname
home
()
const
124
{
return
home
(
_root
); }
125
126
static
Pathname
home
(
const
Pathname & root_r )
127
{
return
root_r /
"/var/lib/zypp"
; }
128
130
ZYppCommitResult
commit
(
ResPool
pool_r,
const
ZYppCommitPolicy
& policy_r );
131
133
void
installSrcPackage
(
const
SrcPackage_constPtr & srcPackage_r );
134
136
ManagedFile
provideSrcPackage
(
const
SrcPackage_constPtr & srcPackage_r );
137
139
virtual
std::ostream &
dumpOn
( std::ostream & str )
const
140
{
141
return
str <<
"TargetImpl"
;
142
}
143
145
rpm::RpmDb
&
rpm
();
146
149
bool
providesFile
(
const
std::string & path_str,
const
std::string & name_str)
const
;
150
153
std::string
whoOwnsFile
(
const
std::string & path_str)
const
154
{
return
_rpm
.
whoOwnsFile
(path_str); }
155
157
Date
timestamp
()
const
;
158
160
Product::constPtr
baseProduct
()
const
;
161
163
LocaleSet
requestedLocales
()
const
164
{
return
_requestedLocalesFile
.
locales
(); }
166
static
LocaleSet
requestedLocales
(
const
Pathname & root_r );
167
169
std::string
targetDistribution
()
const
;
171
static
std::string
targetDistribution
(
const
Pathname & root_r );
172
174
std::string
targetDistributionRelease
()
const
;
176
static
std::string
targetDistributionRelease
(
const
Pathname & root_r );
177
179
Target::DistributionLabel
distributionLabel
()
const
;
181
static
Target::DistributionLabel
distributionLabel
(
const
Pathname & root_r );
182
184
std::string
distributionVersion
()
const
;
186
static
std::string
distributionVersion
(
const
Pathname & root_r );
187
189
std::string
distributionFlavor
()
const
;
191
static
std::string
distributionFlavor
(
const
Pathname & root_r );
192
194
std::string
anonymousUniqueId
()
const
;
196
static
std::string
anonymousUniqueId
(
const
Pathname & root_r );
197
198
private
:
200
void
commit
(
const
ZYppCommitPolicy
& policy_r,
201
CommitPackageCache
& packageCache_r,
202
ZYppCommitResult
& result_r );
203
204
protected
:
206
Pathname
_root
;
208
rpm::RpmDb
_rpm
;
210
RequestedLocalesFile
_requestedLocalesFile
;
212
SoftLocksFile
_softLocksFile
;
214
HardLocksFile
_hardLocksFile
;
216
mutable
std::string
_distributionVersion
;
217
218
private
:
220
static
TargetImpl_Ptr
_nullimpl
;
221
};
223
225
inline
std::ostream &
operator<<
( std::ostream & str,
const
TargetImpl
& obj )
226
{
227
return
obj.
dumpOn
( str );
228
}
229
231
}
// namespace target
234
}
// namespace zypp
236
#endif // ZYPP_TARGET_TARGETIMPL_H
zypp
target
TargetImpl.h
Generated by
1.8.2