Repository ResPool::reposFind( const std::string & alias_r ) const
{ return _pimpl->reposFind( alias_r ); }
+#ifdef WITHSOFTLOCKS
bool ResPool::autoSoftLocksEmpty() const
{ return _pimpl->autoSoftLocks().empty(); }
void ResPool::getActiveSoftLocks( AutoSoftLocks & activeLocks_r )
{ _pimpl->getActiveSoftLocks( activeLocks_r ); }
-
+#endif
bool ResPool::hardLockQueriesEmpty() const
{ return _pimpl->hardLockQueries().empty(); }
bool isAvailableLocale( const Locale & locale_r ) const;
//@}
+#ifdef WITHSOFTLOCKS
public:
/** \name Handle automatic soft-locks.
*
*/
void getActiveSoftLocks( AutoSoftLocks & activeLocks_r );
//@}
-
+#endif
public:
/** \name Handle hard locks (e.g set from /etc/zypp/locks).
*
return setChanged;
}
+#ifdef WITHSOFTLOCKS
public:
typedef PoolTraits::AutoSoftLocks AutoSoftLocks;
typedef PoolTraits::autoSoftLocks_iterator autoSoftLocks_iterator;
activeLocks_r.erase( *it );
}
}
-
+#endif
public:
const ContainerT & store() const
{
// remember products for buddy processing (requires clean store)
if ( s.isKind( ResKind::product ) )
addedProducts.push_back( pi );
+#ifdef WITHSOFTLOCKS
// and on the fly check for weak locks...
if ( autoSoftLockAppliesTo( s ) )
{
pi.status().setSoftLock( ResStatus::USER );
}
+#endif
if ( !addedItems )
addedItems = true;
}
mutable shared_ptr<ResPoolProxy> _poolProxy;
private:
+#ifdef WITHSOFTLOCKS
/** Set of solvable idents that should be soft locked per default. */
AutoSoftLocks _autoSoftLocks;
+#endif
/** Set of queries that define hardlocks. */
HardLockQueries _hardLockQueries;
};
/** list of known Repositories */
typedef sat::Pool::RepositoryIterator repository_iterator;
+#ifdef WITHSOFTLOCKS
/** soft locks */
typedef std::tr1::unordered_set<IdString> AutoSoftLocks;
typedef AutoSoftLocks::const_iterator autoSoftLocks_iterator;
+#endif
/** hard locks from etc/zypp/locks */
typedef std::list<PoolQuery> HardLockQueries;
satpool.setRequestedLocales( requestedLocales );
}
}
+#ifdef WITHSOFTLOCKS
{
SoftLocksFile::Data softLocks( _softLocksFile.data() );
if ( ! softLocks.empty() )
ResPool::instance().setAutoSoftLocks( softLocks );
}
}
+#endif
if ( ZConfig::instance().apply_locks_file() )
{
const HardLocksFile::Data & hardLocks( _hardLocksFile.data() );
filesystem::assert_dir( home() );
// requested locales
_requestedLocalesFile.setLocales( pool_r.getRequestedLocales() );
- // weak locks
+#ifdef WITHSOFTLOCKS
+ // weak locks
{
SoftLocksFile::Data newdata;
pool_r.getActiveSoftLocks( newdata );
_softLocksFile.setData( newdata );
}
+#endif
// hard locks
if ( ZConfig::instance().apply_locks_file() )
{