libzypp 17.37.3
zypp::target::RpmPostTransCollector Class Reference

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

#include <zypp/target/RpmPostTransCollector.h>

Classes

class  Impl
 RpmPostTransCollector implementation. More...
 

Public Member Functions

 RpmPostTransCollector (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 Symbols

(Note that these are not member symbols.)

std::ostream & operator<< (std::ostream &str, const RpmPostTransCollector::Impl &obj)
 Stream output.
 
std::ostream & dumpOn (std::ostream &str, const RpmPostTransCollector::Impl &obj)
 Verbose stream output.
 
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 ( Pathname root_r)

Default ctor.

Definition at line 414 of file RpmPostTransCollector.cc.

◆ ~RpmPostTransCollector()

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

Dtor.

Definition at line 418 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 421 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 424 of file RpmPostTransCollector.cc.

◆ collectPosttransInfo() [2/2]

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

Definition at line 427 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 430 of file RpmPostTransCollector.cc.

◆ discardScripts()

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

Discard all remembered scripts and/or or dump_posttrans lines.

Definition at line 433 of file RpmPostTransCollector.cc.

Friends And Related Symbol Documentation

◆ operator<< [1/3]

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

Definition at line 436 of file RpmPostTransCollector.cc.

◆ dumpOn [1/2]

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

Definition at line 439 of file RpmPostTransCollector.cc.

◆ operator<<() [2/3]

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

Stream output.

Definition at line 436 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: