libzypp 9.41.1
|
Result returned from ZYpp::commit. More...
#include <ZYppCommitResult.h>
Classes | |
class | Impl |
Public Types | |
typedef std::vector < sat::Transaction::Step > | TransactionStepList |
Public Member Functions | |
ZYppCommitResult () | |
ZYppCommitResult (const Pathname &root_r) | |
const Pathname & | root () const |
Remembered root directory of the target. | |
const sat::Transaction & | transaction () const |
The full transaction list. | |
sat::Transaction & | rTransaction () |
Manipulate transaction. | |
const TransactionStepList & | transactionStepList () const |
List of sat::Transaction::Step to be executed by commit. | |
TransactionStepList & | rTransactionStepList () |
Manipulate transactionStepList. | |
const UpdateNotifications & | updateMessages () const |
List of update messages installed during this commit. | |
UpdateNotifications & | rUpdateMessages () |
Manipulate updateMessages Pathnames are relative to the targets root directory. | |
Some statistics based on \ref Transaction | |
Class Transaction allows to count and iterate the action steps to get more detailed information about the transaction result. Here are just a few convenience methods for easy evaluation. ZYppCommitResult result; const sat::Transaction & trans( result.transaction() ); for_( it, trans.actionBegin(~sat::Transaction::STEP_DONE), trans.actionEnd() ) { // process all steps not DONE (ERROR and TODO) if ( it->satSolvable() ) std::cout << it->satSolvable() << endl; else // deleted @System solvable: print post mortem data available std::cout << it->ident() << endl; }
| |
bool | allDone () const |
Whether all steps were performed successfully (none skipped or error) | |
bool | noError () const |
Whether an error ocurred (skipped streps are ok). | |
Private Attributes | |
RWCOW_pointer< Impl > | _pimpl |
Pointer to data. | |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const ZYppCommitResult &obj) |
Oldstlye interface to be removed asap. | |
| |
typedef std::list< PoolItem > | PoolItemList |
int _result | ZYPP_DEPRECATED |
number of committed resolvables | |
PoolItemList _errors | ZYPP_DEPRECATED |
list of resolvables with error | |
PoolItemList _remaining | ZYPP_DEPRECATED |
list of resolvables remaining (due to wrong media) | |
PoolItemList _srcremaining | ZYPP_DEPRECATED |
list of kind:source resolvables remaining (due to wrong media) |
Result returned from ZYpp::commit.
private:
), this is not recommended as you may easily mess up things.Definition at line 62 of file ZYppCommitResult.h.
typedef std::vector<sat::Transaction::Step> zypp::ZYppCommitResult::TransactionStepList |
Definition at line 65 of file ZYppCommitResult.h.
typedef std::list<PoolItem> zypp::ZYppCommitResult::PoolItemList |
Definition at line 171 of file ZYppCommitResult.h.
zypp::ZYppCommitResult::ZYppCommitResult | ( | ) |
Definition at line 52 of file ZYppCommitResult.cc.
zypp::ZYppCommitResult::ZYppCommitResult | ( | const Pathname & | root_r | ) |
Definition at line 56 of file ZYppCommitResult.cc.
References _pimpl.
const Pathname & zypp::ZYppCommitResult::root | ( | ) | const |
Remembered root directory of the target.
Pathnames within this class are relative to the targets root directory.
Definition at line 60 of file ZYppCommitResult.cc.
References _pimpl.
const sat::Transaction & zypp::ZYppCommitResult::transaction | ( | ) | const |
The full transaction list.
The complete list including transaction steps that do not require any action (like obsoletes or non-package actions). Depending on ZYppCommitPolicy::restrictToMedia only a subset of this transaction might have been executed.
Definition at line 63 of file ZYppCommitResult.cc.
References _pimpl.
Referenced by allDone(), zypp::target::TargetImpl::commit(), noError(), and zypp::operator<<().
sat::Transaction & zypp::ZYppCommitResult::rTransaction | ( | ) |
Manipulate transaction.
Definition at line 66 of file ZYppCommitResult.cc.
References _pimpl.
Referenced by zypp::target::TargetImpl::commit().
const ZYppCommitResult::TransactionStepList & zypp::ZYppCommitResult::transactionStepList | ( | ) | const |
List of sat::Transaction::Step to be executed by commit.
The list of transaction step commit actually tried to execute.
Definition at line 69 of file ZYppCommitResult.cc.
References _pimpl.
ZYppCommitResult::TransactionStepList & zypp::ZYppCommitResult::rTransactionStepList | ( | ) |
Manipulate transactionStepList.
Definition at line 72 of file ZYppCommitResult.cc.
References _pimpl.
Referenced by zypp::target::TargetImpl::commit().
const UpdateNotifications & zypp::ZYppCommitResult::updateMessages | ( | ) | const |
List of update messages installed during this commit.
Pathnames are relative to the targets root directory.
ZYppCommitResult result; ... if ( ! result.updateMessages().empty() ) { MIL << "Received " << result.updateMessages().size() << " update notification(s):" << endl; for_( it, result.updateMessages().begin(), result.updateMessages().end() ) { MIL << "- From " << it->solvable().asString() << " in file " << Pathname::showRootIf( result.root(), it->file() ) << ":" << endl; { // store message files content in a string: InputStream istr( Pathname::assertprefix( result.root(), it->file() ) ); std::ostringstream strstr; iostr::copy( istr, strstr ); std::string message( strstr.str() ); // contains the message } { // or write out the message file indented: InputStream istr( Pathname::assertprefix( result.root(), it->file() ) ); iostr::copyIndent( istr, MIL, "> " ) << endl; } } }
Definition at line 75 of file ZYppCommitResult.cc.
References _pimpl.
Referenced by zypp::operator<<().
UpdateNotifications & zypp::ZYppCommitResult::rUpdateMessages | ( | ) |
Manipulate updateMessages Pathnames are relative to the targets root directory.
Definition at line 78 of file ZYppCommitResult.cc.
References _pimpl.
bool zypp::ZYppCommitResult::allDone | ( | ) | const [inline] |
Whether all steps were performed successfully (none skipped or error)
Definition at line 156 of file ZYppCommitResult.h.
References zypp::sat::Transaction::actionEmpty(), zypp::sat::Transaction::STEP_DONE, and transaction().
bool zypp::ZYppCommitResult::noError | ( | ) | const [inline] |
Whether an error ocurred (skipped streps are ok).
Definition at line 160 of file ZYppCommitResult.h.
References zypp::sat::Transaction::actionEmpty(), zypp::sat::Transaction::STEP_ERROR, and transaction().
std::ostream & operator<< | ( | std::ostream & | str, |
const ZYppCommitResult & | obj | ||
) | [related] |
Stream output.
Definition at line 83 of file ZYppCommitResult.cc.
int _result zypp::ZYppCommitResult::ZYPP_DEPRECATED |
number of committed resolvables
Definition at line 175 of file ZYppCommitResult.h.
list of resolvables with error
Definition at line 179 of file ZYppCommitResult.h.
list of resolvables remaining (due to wrong media)
Definition at line 183 of file ZYppCommitResult.h.
PoolItemList _srcremaining zypp::ZYppCommitResult::ZYPP_DEPRECATED |
list of kind:source resolvables remaining (due to wrong media)
Definition at line 187 of file ZYppCommitResult.h.
RWCOW_pointer<Impl> zypp::ZYppCommitResult::_pimpl [private] |
Pointer to data.
Definition at line 192 of file ZYppCommitResult.h.
Referenced by root(), rTransaction(), rTransactionStepList(), rUpdateMessages(), transaction(), transactionStepList(), updateMessages(), and ZYppCommitResult().