std::list<Package::Ptr> result;
zypp::Source_Ref _source;
+ zypp::source::susetags::SuseTagsImpl::Ptr _sourceImpl;
shared_ptr<source::susetags::SuseTagsPackageImpl> pkgImpl;
NVRAD nvrad;
if ( howmany >= 2 )
{
pkgImpl->_media_number = str::strtonum<unsigned int>(words[0]);
- pkgImpl->_location = Pathname("/suse/" + nvrad.arch.asString() + "/" + words[1]);
+ pkgImpl->_location = _sourceImpl->sourceDir(nvrad) + words[1];
}
else
{
#include "zypp/Pathname.h"
#include "zypp/Package.h"
+#include "zypp/source/susetags/SuseTagsImpl.h"
///////////////////////////////////////////////////////////////////
namespace zypp
/** \deprecated Just temporary.
* \throws ParseException and others.
*/
- std::list<Package::Ptr> parsePackages( Source_Ref source_r, const Pathname & file_r );
+ std::list<Package::Ptr> parsePackages( Source_Ref source_r, SuseTagsImpl::Ptr, Pathname & file_r );
/////////////////////////////////////////////////////////////////
} // namespace susetags
#warning We use suse instead of <DATADIR> for now
Pathname p = provideFile(_path + "suse/setup/descr/packages");
DBG << "Going to parse " << p << endl;
- std::list<Package::Ptr> content( parsePackages( source_r, p ) );
+ std::list<Package::Ptr> content( parsePackages( source_r, this, p ) );
_store.insert( content.begin(), content.end() );
DBG << "SuseTagsImpl (fake) from " << p << ": "
<< content.size() << " packages" << endl;
//
SuseTagsImpl::~SuseTagsImpl()
{}
+
+ Pathname SuseTagsImpl::sourceDir( const NVRAD& nvrad )
+ {
+#warning Not using <DATADIR>
+ return Pathname( "/suse/" + nvrad.arch.asString() + "/");
+ }
///////////////////////////////////////////////////////////////////
//
class SuseTagsImpl : public SourceImpl
{
public:
+
+ typedef intrusive_ptr<SuseTagsImpl> Ptr;
+
/** \deprecated Interim ctor for testing
* \throw EXCEPTION on parse error
*/
~SuseTagsImpl();
virtual void createResolvables(Source_Ref source_r);
+
+ Pathname sourceDir( const NVRAD& nvrad );
public:
/** Stream output. */