leave the old one as is, but deprecate it.
Target_Ptr ZYpp::target() const
{ return _pimpl->target(); }
- void ZYpp::initTarget(const Pathname & root)
- { _pimpl->initTarget(root); }
+ void ZYpp::initTarget(const Pathname & root, bool commit_only )
+ { _pimpl->initTarget(root, commit_only); }
+
+ void ZYpp::initializeTarget(const Pathname & root)
+ { _pimpl->initializeTarget(root); }
void ZYpp::finishTarget()
{ _pimpl->finishTarget(); }
/**
* \throws Exception
+ * just init the target, dont populate store or pool
*/
- void initTarget(const Pathname & root);
+ void initializeTarget(const Pathname & root);
/**
* \throws Exception
+ * if commit_only == true, just init the target, dont populate store or pool
+ */
+ ZYPP_DEPRECATED void initTarget(const Pathname & root, bool commit_only = false);
+
+ /**
+ * \throws Exception
*/
void finishTarget();
return _target;
}
- void ZYppImpl::initTarget(const Pathname & root)
+ void ZYppImpl::initializeTarget(const Pathname & root)
{
MIL << "initTarget( " << root << endl;
if (_target) {
_target = new Target( root );
_target->enableStorage( root );
}
+
+ void ZYppImpl::initTarget(const Pathname & root, bool commit_only)
+ {
+ MIL << "initTarget( " << root << ", " << commit_only << ")" << endl;
+ if (_target) {
+ if (_target->root() == root) {
+ MIL << "Repeated call to initTarget()" << endl;
+ return;
+ }
+ removeInstalledResolvables( );
+ }
+ _target = new Target( root );
+ _target->enableStorage( root );
+ if (!commit_only)
+ {
+ _target->enableStorage( root );
+ addResolvables( _target->resolvables(), true );
+ }
+ }
+
void ZYppImpl::finishTarget()
{
/**
* \throws Exception
+ * true, just init the target, dont populate store or pool
+ */
+ void initializeTarget(const Pathname & root);
+
+ /**
+ * \throws Exception
* if commit_only == true, just init the target, dont populate store or pool
*/
- void initTarget(const Pathname & root);
-
+ ZYPP_DEPRECATED void initTarget(const Pathname & root, bool commit_only);
+
/**
* \throws Exception
*/