libzypp 17.31.23
zypp::target::RpmPostTransCollector Class Reference

Extract and remember posttrans scripts for later execution. More...

#include <target/RpmPostTransCollector.h>

Classes

class  Impl
 RpmPostTransCollector implementation. More...
 

Public Member Functions

 RpmPostTransCollector (const Pathname &root_r)
 Default ctor.
 
 ~RpmPostTransCollector ()
 Dtor.
 
bool hasPosttransScript (const Pathname &rpmPackage_r)
 Test whether a package defines a posttrans script.
 
void collectPosttransInfo (const Pathname &rpmPackage_r, const std::vector< std::string > &runposttrans_r)
 Extract and remember a packages posttrans script or dump_posttrans lines for later execution.
 
void collectPosttransInfo (const std::vector< std::string > &runposttrans_r)
 
void executeScripts (rpm::RpmDb &rpm_r)
 Execute the remembered scripts and/or or dump_posttrans lines.
 
void discardScripts ()
 Discard all remembered scripts and/or or dump_posttrans lines.
 

Private Attributes

RW_pointer< Impl_pimpl
 Implementation class.
 

Friends

std::ostream & operator<< (std::ostream &str, const RpmPostTransCollector &obj)
 
std::ostream & dumpOn (std::ostream &str, const RpmPostTransCollector &obj)
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const RpmPostTransCollector &obj)
 Stream output.
 
std::ostream & dumOn (std::ostream &str, const RpmPostTransCollector &obj)
 Verbose stream output.
 

Detailed Description

Extract and remember posttrans scripts for later execution.

bsc#1041742: Attempt to delay also transfiletrigger(postun|in) execution iff rpm supports it. Rpm versions supporting –runposttrans will inject "dump_posttrans:..." lines into the output if macro "_dump_posttrans" is defined during execution. Those lines are collected and later fed into "rpm --runposttrans". If rpm does not support it, those lines are not injected. In this case we collect and later execute the posttrans script on our own.

Definition at line 39 of file RpmPostTransCollector.h.

Constructor & Destructor Documentation

◆ RpmPostTransCollector()

zypp::target::RpmPostTransCollector::RpmPostTransCollector ( const Pathname root_r)

Default ctor.

Definition at line 407 of file RpmPostTransCollector.cc.

◆ ~RpmPostTransCollector()

zypp::target::RpmPostTransCollector::~RpmPostTransCollector ( )

Dtor.

Definition at line 411 of file RpmPostTransCollector.cc.

Member Function Documentation

◆ hasPosttransScript()

bool zypp::target::RpmPostTransCollector::hasPosttransScript ( const Pathname rpmPackage_r)

Test whether a package defines a posttrans script.

Definition at line 414 of file RpmPostTransCollector.cc.

◆ collectPosttransInfo() [1/2]

void zypp::target::RpmPostTransCollector::collectPosttransInfo ( const Pathname rpmPackage_r,
const std::vector< std::string > &  runposttrans_r 
)

Extract and remember a packages posttrans script or dump_posttrans lines for later execution.

Definition at line 417 of file RpmPostTransCollector.cc.

◆ collectPosttransInfo() [2/2]

void zypp::target::RpmPostTransCollector::collectPosttransInfo ( const std::vector< std::string > &  runposttrans_r)

Definition at line 420 of file RpmPostTransCollector.cc.

◆ executeScripts()

void zypp::target::RpmPostTransCollector::executeScripts ( rpm::RpmDb rpm_r)

Execute the remembered scripts and/or or dump_posttrans lines.

Definition at line 423 of file RpmPostTransCollector.cc.

◆ discardScripts()

void zypp::target::RpmPostTransCollector::discardScripts ( )

Discard all remembered scripts and/or or dump_posttrans lines.

Definition at line 426 of file RpmPostTransCollector.cc.

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ostream & operator<< ( std::ostream &  str,
const RpmPostTransCollector obj 
)
friend

Definition at line 429 of file RpmPostTransCollector.cc.

◆ dumpOn

std::ostream & dumpOn ( std::ostream &  str,
const RpmPostTransCollector obj 
)
friend

Definition at line 432 of file RpmPostTransCollector.cc.

◆ operator<<() [2/2]

std::ostream & operator<< ( std::ostream &  str,
const RpmPostTransCollector obj 
)
related

Stream output.

Definition at line 429 of file RpmPostTransCollector.cc.

◆ dumOn()

std::ostream & dumOn ( std::ostream &  str,
const RpmPostTransCollector obj 
)
related

Verbose stream output.

Member Data Documentation

◆ _pimpl

RW_pointer<Impl> zypp::target::RpmPostTransCollector::_pimpl
private

Implementation class.

Pointer to implementation.

Definition at line 69 of file RpmPostTransCollector.h.


The documentation for this class was generated from the following files: