#include <VendorAttr.h>
Public Types | |
typedef std::vector< std::string > | VendorList |
Public Member Functions | |
bool | addVendorDirectory (const Pathname &dirname) const |
Adding new equivalent vendors described in a directory. | |
bool | addVendorFile (const Pathname &filename) const |
Adding new equivalent vendors described in a file. | |
template<class _Iterator > | |
void | addVendorList (_Iterator begin, _Iterator end) const |
Adding new equivalent vendor set from list. | |
bool | equivalent (const Vendor &lVendor, const Vendor &rVendor) const |
Return whether two vendor strings shold be treated as the same vendor. | |
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 VendorAttr & | instance () |
Singleton. | |
Private Member Functions | |
VendorAttr () | |
void | _addVendorList (VendorList &) const |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const VendorAttr &obj) |
Packages with equivalment vendor strings may replace themself without creating a solver error.
Per default vendor strings starting with "suse' or \c 'opensuse"
are treated equivalent. This may be changed by providing customized vendor description files in /etc/zypp/vendors
.d.
Definition at line 41 of file VendorAttr.h.
typedef std::vector<std::string> zypp::VendorAttr::VendorList |
Definition at line 44 of file VendorAttr.h.
zypp::VendorAttr::VendorAttr | ( | ) | [private] |
Definition at line 124 of file VendorAttr.cc.
References addVendorDirectory(), zypp::ZConfig::instance(), and MIL.
const VendorAttr & zypp::VendorAttr::instance | ( | ) | [static] |
Singleton.
Definition at line 118 of file VendorAttr.cc.
Referenced by zypp::ui::Selectable::Impl::defaultCandidate(), zypp::solver::detail::LookForUpdate::operator()(), zypp::ui::Selectable::Impl::updateCandidateObj(), and zypp::solver::detail::vendorCheck().
bool zypp::VendorAttr::addVendorDirectory | ( | const Pathname & | dirname | ) | const |
Adding new equivalent vendors described in a directory.
Definition at line 263 of file VendorAttr.cc.
References addVendorFile(), MIL, zypp::parser::IniDict::read(), and zypp::filesystem::readdir().
Referenced by VendorAttr().
bool zypp::VendorAttr::addVendorFile | ( | const Pathname & | filename | ) | const |
Adding new equivalent vendors described in a file.
Definition at line 220 of file VendorAttr.cc.
References _addVendorList(), zypp::parser::IniDict::entriesBegin(), zypp::parser::IniDict::entriesEnd(), MIL, zypp::parser::IniDict::read(), zypp::parser::IniDict::sectionsBegin(), zypp::parser::IniDict::sectionsEnd(), and zypp::str::split().
Referenced by addVendorDirectory().
void zypp::VendorAttr::addVendorList | ( | _Iterator | begin, | |
_Iterator | end | |||
) | const [inline] |
Adding new equivalent vendor set from list.
Definition at line 63 of file VendorAttr.h.
References _addVendorList().
Return whether two vendor strings shold 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 301 of file VendorAttr.cc.
Referenced by zypp::ui::Selectable::Impl::defaultCandidate(), equivalent(), zypp::solver::detail::LookForUpdate::operator()(), and zypp::solver::detail::vendorCheck().
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 294 of file VendorAttr.cc.
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 305 of file VendorAttr.cc.
References equivalent(), and zypp::sat::Solvable::vendor().
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 308 of file VendorAttr.cc.
References equivalent(), zypp::PoolItem::satSolvable(), and zypp::sat::Solvable::vendor().
void zypp::VendorAttr::_addVendorList | ( | VendorList & | vendorList_r | ) | const [private] |
Definition at line 178 of file VendorAttr.cc.
References for_, zypp::str::toLower(), and WAR.
Referenced by addVendorFile(), and addVendorList().
std::ostream & operator<< | ( | std::ostream & | str, | |
const VendorAttr & | obj | |||
) | [related] |
Stream output
Definition at line 313 of file VendorAttr.cc.