libzypp  17.24.2
zypp::VendorAttr Class Reference

Definition of vendor equivalence. More...

#include <VendorAttr.h>

Classes

class  Impl
 VendorAttr implementation. More...
 

Public Types

typedef std::vector< IdStringVendorList
 Implementation class. More...
 

Public Member Functions

 VendorAttr ()
 Ctor providing the default set. More...
 
 VendorAttr (const Pathname &initial_r)
 Ctor reading the initial_r definitions from a dir or file. More...
 
 ~VendorAttr ()
 Dtor. More...
 
bool addVendorDirectory (const Pathname &dirname_r)
 Adding new equivalent vendors described in a directory. More...
 
bool addVendorFile (const Pathname &filename_r)
 Adding new equivalent vendors described in a file. More...
 
template<class TContainer >
void addVendorList (const TContainer &container_r)
 Adding a new equivalent vendor set from string container (via C_Str) More...
 
bool equivalent (const Vendor &lVendor, const Vendor &rVendor) const
 Return whether two vendor strings should be treated as the same vendor. More...
 
bool equivalent (IdString lVendor, IdString rVendor) const
 
bool equivalent (sat::Solvable lVendor, sat::Solvable rVendor) const
 
bool equivalent (const PoolItem &lVendor, const PoolItem &rVendor) const
 

Static Public Member Functions

static const VendorAttrinstance ()
 (Pseudo)Singleton, mapped to the current Target::vendorAttr settings or to noTargetInstance. More...
 
static VendorAttrnoTargetInstance ()
 Singleton, settings used if no Target is active. More...
 

Private Member Functions

void _addVendorList (VendorList &&list_r)
 

Private Attributes

RWCOW_pointer< Impl_pimpl
 Pointer to implementation. More...
 

Friends

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

Related Functions

(Note that these are not member functions.)

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

Detailed Description

Definition of vendor equivalence.

Packages with equivalent vendor strings may replace themselves without creating a solver error.

Per default vendor strings starting with "suse" are treated as being equivalent. This may be tuned by providing customized vendor description files in /etc/zypp/vendors.d.

See also
Solver - Vendor protection

Definition at line 46 of file VendorAttr.h.

Member Typedef Documentation

◆ VendorList

typedef std::vector<IdString> zypp::VendorAttr::VendorList

Implementation class.

Definition at line 115 of file VendorAttr.h.

Constructor & Destructor Documentation

◆ VendorAttr() [1/2]

zypp::VendorAttr::VendorAttr ( )

Ctor providing the default set.

Definition at line 215 of file VendorAttr.cc.

◆ VendorAttr() [2/2]

zypp::VendorAttr::VendorAttr ( const Pathname initial_r)

Ctor reading the initial_r definitions from a dir or file.

Definition at line 222 of file VendorAttr.cc.

◆ ~VendorAttr()

zypp::VendorAttr::~VendorAttr ( )

Dtor.

Definition at line 230 of file VendorAttr.cc.

Member Function Documentation

◆ instance()

const VendorAttr & zypp::VendorAttr::instance ( )
static

(Pseudo)Singleton, mapped to the current Target::vendorAttr settings or to noTargetInstance.

Definition at line 203 of file VendorAttr.cc.

◆ noTargetInstance()

VendorAttr & zypp::VendorAttr::noTargetInstance ( )
static

Singleton, settings used if no Target is active.

The instance is initialized with the settings found in the system below /. The active Targets settings can be changed via Target::vendorAttr.

Definition at line 209 of file VendorAttr.cc.

◆ addVendorDirectory()

bool zypp::VendorAttr::addVendorDirectory ( const Pathname dirname_r)

Adding new equivalent vendors described in a directory.

Definition at line 233 of file VendorAttr.cc.

◆ addVendorFile()

bool zypp::VendorAttr::addVendorFile ( const Pathname filename_r)

Adding new equivalent vendors described in a file.

Definition at line 250 of file VendorAttr.cc.

◆ addVendorList()

template<class TContainer >
void zypp::VendorAttr::addVendorList ( const TContainer &  container_r)
inline

Adding a new equivalent vendor set from string container (via C_Str)

Note
The container must own the strings returned by the iterator.

Definition at line 93 of file VendorAttr.h.

◆ equivalent() [1/4]

bool zypp::VendorAttr::equivalent ( const Vendor lVendor,
const Vendor rVendor 
) const

Return whether two vendor strings should be treated as the same vendor.

Usually the solver is allowed to automatically select a package of an equivalent vendor when updating. Replacing a package with one of a different vendor usually must be confirmed by the user.

Definition at line 295 of file VendorAttr.cc.

◆ equivalent() [2/4]

bool zypp::VendorAttr::equivalent ( IdString  lVendor,
IdString  rVendor 
) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 292 of file VendorAttr.cc.

◆ equivalent() [3/4]

bool zypp::VendorAttr::equivalent ( sat::Solvable  lVendor,
sat::Solvable  rVendor 
) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 298 of file VendorAttr.cc.

◆ equivalent() [4/4]

bool zypp::VendorAttr::equivalent ( const PoolItem lVendor,
const PoolItem rVendor 
) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 301 of file VendorAttr.cc.

◆ _addVendorList()

void zypp::VendorAttr::_addVendorList ( VendorList &&  list_r)
private

Definition at line 275 of file VendorAttr.cc.

Friends And Related Function Documentation

◆ operator<< [1/2]

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

Definition at line 306 of file VendorAttr.cc.

◆ operator<<() [2/2]

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

Stream output

Definition at line 306 of file VendorAttr.cc.

Member Data Documentation

◆ _pimpl

RWCOW_pointer<Impl> zypp::VendorAttr::_pimpl
private

Pointer to implementation.

Definition at line 118 of file VendorAttr.h.


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