appendTranslatedStringAttribute( resolvable_id, attrResObjectDelnotify(), data_r->delnotify );
}
+::_Solvable* SolvStore::appendResolvable( const data::RecordId &repository_id,
+ const data::Resolvable_Ptr &res )
+{
+ Repo *repo;
+ map<RecordId, Repo*>::const_iterator it = _pimpl->_id2repo.find(repository_id);
+ if ( it == _pimpl->_id2repo.end() )
+ {
+ // throw
+ }
+ repo = it->second;
+
+ Solvable *s = pool_id2solvable(_pimpl->_pool, repo_add_solvable(repo));
+ s->evr = str2id(_pimpl->_pool, res->edition.c_str(), 1);
+// s->provides = adddep(pool, pd, s->provides, atts, 0);
+//
+// s->name = str2id(pool, nvra.name.c_str(), 1);
+// s->arch = str2id(pool, nvra.arch.c_str(), 1);
+// s->vendor = str2id(pool, nvra.vendor.c_str(), 1);
+//
+// if (!s->arch)
+// s->arch = ARCH_NOARCH;
+
+ return s;
+}
+
+
RecordId SolvStore::appendResolvable( const RecordId &repository_id,
const Resolvable::Kind &kind,
const _NVRA &nvra,
if (it == _pimpl->_name2repoid.end())
{
_pimpl->_name2repoid[alias] = ++_pimpl->_last_repoid;
+ _pimpl->_id2repo[_pimpl->_last_repoid] = repo_create(_pimpl->_pool, alias.c_str());
}
return _pimpl->_name2repoid[alias];
}
#include "zypp/ProgressData.h"
#include "zypp/cache/Attribute.h"
+#include "satsolver/solvable.h"
+
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
const data::Packagebase_Ptr & data_r );
//@}
public:
+
/**
* Appends a resolvable to the store.
*
data::RecordId lookupOrAppendFileName( const std::string &name );
protected:
+
+ /**
+ * Appends a solvable to the store.
+ *
+ * You have to specify with \a kind of resolvable are you inserting
+ * and its \c _NVRA (name version release and architecture ).
+ * Optionaly you can pass a list of \c CapabilityImpl::Ptr
+ * as dependencies for the resolvable.
+ *
+ * You have to specify the RecordId for the repository owning
+ * this resolvable. Yuu can obtain it with
+ * \ref lookupOrAppendRepository
+ *
+ * You can create those \a deps using \ref capability::parse
+ * functions, or the build methods to create specific types
+ * of capabilities:
+ * \ref capability::buildVersioned for \c VersionedCap
+ * \ref capability::buildNamed for \c NamedCap
+ * etc.
+ *
+ * Once the resolvable is inserted, you will get back the id
+ * if it in the store. Which you can use for later adding
+ * other properties.
+ *
+ */
+ ::_Solvable* appendResolvable( const data::RecordId &repository_id,
+ const data::Resolvable_Ptr &res );
+
+ protected:
/**
* Internally used function that appends a entry in
* the capabilities table for a specific capability