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
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
ZYppCommitResult.cc
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
13
#include <iostream>
14
#include "
zypp/base/LogTools.h
"
15
16
#include "
zypp/ZYppCommitResult.h
"
17
19
namespace
zypp
20
{
21
23
//
24
// CLASS NAME : ZYppCommitResult::Impl
25
//
27
28
class
ZYppCommitResult::Impl
29
{
30
public
:
31
Impl
()
32
{}
33
34
public
:
35
Pathname
_root
;
36
sat::Transaction
_transaction
;
37
TransactionStepList
_transactionStepList
;
38
UpdateNotifications
_updateMessages
;
39
40
private
:
41
friend
Impl
* rwcowClone<Impl>(
const
Impl
* rhs );
43
Impl
*
clone
()
const
{
return
new
Impl
( *
this
); }
44
};
45
47
//
48
// CLASS NAME : ZYppCommitResult
49
//
51
52
ZYppCommitResult::ZYppCommitResult
()
53
: _result(0), _pimpl( new
Impl
)
54
{}
55
56
ZYppCommitResult::ZYppCommitResult
(
const
ZYppCommitResult
& lhs_r )
57
: _result(0)
58
, _errors( lhs_r._errors )
59
, _remaining( lhs_r._remaining )
60
, _srcremaining( lhs_r._srcremaining )
61
, _pimpl( lhs_r._pimpl )
62
{}
63
64
ZYppCommitResult::ZYppCommitResult
(
const
Pathname & root_r )
65
: _result(0), _pimpl( new
Impl
)
66
{
_pimpl
->
_root
= root_r; }
67
68
ZYppCommitResult::~ZYppCommitResult
()
69
{}
70
71
const
Pathname &
ZYppCommitResult::root
()
const
72
{
return
_pimpl
->
_root
; }
73
74
const
sat::Transaction
&
ZYppCommitResult::transaction
()
const
75
{
return
_pimpl
->
_transaction
; }
76
77
sat::Transaction
&
ZYppCommitResult::rTransaction
()
78
{
return
_pimpl
->
_transaction
; }
79
80
const
ZYppCommitResult::TransactionStepList
&
ZYppCommitResult::transactionStepList
()
const
81
{
return
_pimpl
->
_transactionStepList
; }
82
83
ZYppCommitResult::TransactionStepList
&
ZYppCommitResult::rTransactionStepList
()
84
{
return
_pimpl
->
_transactionStepList
; }
85
86
const
UpdateNotifications
&
ZYppCommitResult::updateMessages
()
const
87
{
return
_pimpl
->
_updateMessages
; }
88
89
UpdateNotifications
&
ZYppCommitResult::rUpdateMessages
()
90
{
return
_pimpl
->
_updateMessages
; }
91
93
94
std::ostream &
operator<<
( std::ostream & str,
const
ZYppCommitResult
& obj )
95
{
96
DefaultIntegral<unsigned,0>
result[4];
97
for_
( it, obj.
transaction
().
actionBegin
(), obj.
transaction
().
actionEnd
() )
98
{
99
++result[0];
100
switch
( it->stepStage() )
101
{
102
case
sat::Transaction::STEP_DONE
: ++result[1];
break
;
103
case
sat::Transaction::STEP_ERROR
: ++result[2];
break
;
104
case
sat::Transaction::STEP_TODO
: ++result[3];
break
;
105
}
106
}
107
str <<
"CommitResult "
108
<<
" (total "
<< result[0]
109
<<
", done "
<< result[1]
110
<<
", error "
<< result[2]
111
<<
", skipped "
<< result[3]
112
<<
", updateMessages "
<< obj.
updateMessages
().size()
113
<<
")"
;
114
return
str;
115
}
116
118
}
// namespace zypp
zypp
ZYppCommitResult.cc
Generated by
1.8.1