IMPL_PTR_TYPE(Product);
IMPL_PTR_TYPE(Packagebase);
IMPL_PTR_TYPE(Package);
-IMPL_PTR_TYPE(Sourcepackage);
+IMPL_PTR_TYPE(SrcPackage);
std::ostream & ResObject::dumpOn( std::ostream & str ) const
{
- str << "[ " << name << " " << edition << " ]";
+ str << "[ " << name << " " << edition << " " << arch << " ]";
return str;
// << " provides: " << provides << endl
// << " conflicts: " << conflicts << endl
#include "zypp/capability/CapabilityImpl.h"
#include "zypp/Pathname.h"
+#include "zypp/NVR.h"
#include "zypp/Edition.h"
#include "zypp/ByteCount.h"
#include "zypp/Arch.h"
namespace data
{
- typedef std::list<capability::CapabilityImpl::Ptr> DependencyList;
+ typedef std::set<capability::CapabilityImpl::Ptr> DependencyList;
typedef std::map<zypp::Dep, DependencyList> Dependencies;
///////////////////////////////////////////////////////////////////
class Resolvable : public base::ReferenceCounted, private base::NonCopyable
{
public:
- Resolvable()
- {};
+ Resolvable()
+ {};
- std::string name;
- Edition edition;
- Arch arch;
+ std::string name;
+ Edition edition;
+ Arch arch;
- Dependencies deps;
+ Dependencies deps;
};
///////////////////////////////////////////////////////////////////
: source_media_nr(1), install_only(false)
{}
-
TranslatedText summary;
TranslatedText description;
- std::string insnotify;
- std::string delnotify;
+ TranslatedText insnotify;
+ TranslatedText delnotify;
- std::string license_to_confirm;
+ TranslatedText license_to_confirm;
std::string vendor;
/** Installed size. \see zypp::ResObject::size() */
public:
Pattern()
- : user_visible(true)
+ : is_default(false), user_visible(true)
{};
- std::string default_;
+ bool is_default;
bool user_visible;
TranslatedText category;
std::string icon;
+ std::string order;
std::string script;
+
+ DependencyList includes;
+ DependencyList extends;
};
///////////////////////////////////////////////////////////////////
{
public:
Product() {};
- ~Product() {};
std::string type;
std::string vendor;
class Packagebase : public ResObject
{
public:
- Packagebase() {};
- ~Packagebase() {};
-
+ enum PackageType { BIN, SRC };
+ virtual PackageType packageType() const = 0;
+ public:
std::string type;
CheckSum checksum;
// changlelog?
* Data Object for Package resolvable
*/
struct Package : public Packagebase
- {};
+ {
+ virtual PackageType packageType() const { return BIN; }
+
+ /** NVR of the corresponding SrcPackage. */
+ shared_ptr<NVR> srcPackageIdent;
+ };
- DEFINE_PTR_TYPE(Sourcepackage);
+ DEFINE_PTR_TYPE(SrcPackage);
/**
- * Data Object for Sourcepackage resolvable
+ * Data Object for SrcPackage resolvable
*/
- struct Sourcepackage : public Packagebase
- {};
+ struct SrcPackage : public Packagebase
+ {
+ virtual PackageType packageType() const { return SRC; }
+ };
///////////////////////////////////////////////////////////////////
template<class _Res> class SpecificData;
if (reader_r->name() == "packager")
{
_package->packager = reader_r.nodeText().asString();
-// DBG << "packager: " << _package->packager << endl;
+// DBG << "packager: " << _package->packager << endl;
return true;
}
<< reader_r->getAttribute("name").asString()
<< " " << edition << endl;
*/
- _package->deps[_dtype].push_back(
+ _package->deps[_dtype].insert(
zypp::capability::parse(
ResTraits<Package>::kind,
reader_r->getAttribute("name").asString(),
_expect_rpm_entry = true;
return true;
}
-
+
if (reader_r->name() == "file")
{
// TODO figure out how to read files