namespace susetags
{ /////////////////////////////////////////////////////////////////
- Pattern::Ptr parsePattern( const Pathname & file_r )
+ Pattern::Ptr parsePattern( Source_Ref source_r, const Pathname & file_r )
{
MIL << "Starting to parse pattern " << file_r << std::endl;
PatternTagFileParser p;
ERR << "Pattern " << file_r << " is broken." << std::endl;
return 0L;
}
+ // attach the source
+ p.patImpl->_source = source_r;
return p.result;
}
/**
* returns null if parse fails
*/
- Pattern::Ptr parsePattern( const Pathname & file_r );
+ Pattern::Ptr parsePattern( Source_Ref source_r, const Pathname & file_r );
/////////////////////////////////////////////////////////////////
} // namespace source
///////////////////////////////////////////////////////////////////
namespace susetags
{ /////////////////////////////////////////////////////////////////
- Selection::Ptr parseSelection( const Pathname & file_r )
+ Selection::Ptr parseSelection( Source_Ref source_r, const Pathname & file_r )
{
MIL << "Starting to parse selection " << file_r << std::endl;
SelectionTagFileParser p;
ERR << "Selection " << file_r << " is broken." << std::endl;
return 0L;
}
+ // attach the source
+ p.selImpl->_source = source_r;
return p.result;
}
#include "zypp/ZYppFactory.h"
#include "zypp/Pathname.h"
+#include "zypp/Source.h"
///////////////////////////////////////////////////////////////////
namespace zypp
ZYpp::LocaleSet _locales;
};
///////////////////////////////////////////////////////////////////
- Selection::Ptr parseSelection( const Pathname & file_r );
+ Selection::Ptr parseSelection( Source_Ref source_r, const Pathname & file_r );
/////////////////////////////////////////////////////////////////
} // namespace source
///////////////////////////////////////////////////////////////////
Pathname file = cache ? _data_dir + selfile : provideFile( _data_dir + selfile);
MIL << "Selection file to parse " << file << endl;
- Selection::Ptr sel( parseSelection( file ) );
+ Selection::Ptr sel( parseSelection( source_r, file ) );
if (sel)
{
Pathname file = cache ? _data_dir + patfile : provideFile( _data_dir + patfile);
MIL << "Pattern file to parse " << file << endl;
- Pattern::Ptr pat( parsePattern( file ) );
+ Pattern::Ptr pat( parsePattern( source_r, file ) );
if (pat)
{
SuseTagsPatternImpl::~SuseTagsPatternImpl()
{}
-
+ Source_Ref SuseTagsPatternImpl::source() const
+ { return _source; }
+
TranslatedText SuseTagsPatternImpl::summary() const
{ return _summary; }
#define ZYPP_DETAIL_SUSETAGS_PATTERNIMPL_H
#include "zypp/detail/PatternImplIf.h"
+#include "zypp/Source.h"
///////////////////////////////////////////////////////////////////
namespace zypp
SuseTagsPatternImpl();
virtual ~SuseTagsPatternImpl();
- /*
- virtual std::list<std::string> suggests() const;
- virtual std::list<std::string> recommends() const;
- virtual std::list<std::string> insnotify( const LangCode & lang = LangCode("") ) const;
- virtual std::list<std::string> delnotify( const LangCode & lang = LangCode("") ) const;
- virtual ByteCount size() const;
- virtual bool providesSources() const;
- virtual std::string instSrcLabel() const;
- virtual Vendor instSrcVendor() const;
- virtual unsigned instSrcRank() const;
- virtual std::list<std::string> inspacks( const LangCode & lang = LangCode("") ) const;
- virtual std::list<std::string> delpacks( const LangCode & lang = LangCode("") ) const;
- virtual PM::LocaleSet supportedLocales() const;
- virtual std::set<PMSelectablePtr> pureInspacks_ptrs( const LangCode & lang ) const;
- virtual std::set<PMSelectablePtr> inspacks_ptrs( const LangCode & lang ) const;
- virtual std::set<PMSelectablePtr> delpacks_ptrs( const LangCode & lang ) const;
- virtual bool isBase() const;
- virtual PMError provideSelToInstall( Pathname & path_r ) const;
- */
-
virtual TranslatedText summary() const;
virtual TranslatedText description() const;
virtual TranslatedText category() const;
virtual bool visible() const;
virtual Label order() const;
virtual Pathname icon() const;
+ virtual Source_Ref source() const;
TranslatedText _summary;
TranslatedText _description;
std::map< Locale, std::list<std::string> > _insnotify;
std::map< Locale, std::list<std::string> > _delnotify;
+ Source_Ref _source;
};
///////////////////////////////////////////////////////////////////
//else
//return std::set<std::string>();
}
-
+
+ Source_Ref SuseTagsSelectionImpl::source() const
+ {
+ return _source;
+ }
/////////////////////////////////////////////////////////////////
} // namespace detail
///////////////////////////////////////////////////////////////////
#define ZYPP_DETAIL_SUSETAGS_SELECTIONIMPL_H
#include "zypp/detail/SelectionImplIf.h"
+#include "zypp/Source.h"
///////////////////////////////////////////////////////////////////
namespace zypp
SuseTagsSelectionImpl();
virtual ~SuseTagsSelectionImpl();
- /*
- virtual std::list<std::string> suggests() const;
- virtual std::list<std::string> recommends() const;
- virtual std::list<std::string> insnotify( const LangCode & lang = LangCode("") ) const;
- virtual std::list<std::string> delnotify( const LangCode & lang = LangCode("") ) const;
- virtual ByteCount size() const;
- virtual bool providesSources() const;
- virtual std::string instSrcLabel() const;
- virtual Vendor instSrcVendor() const;
- virtual unsigned instSrcRank() const;
- virtual std::list<std::string> inspacks( const LangCode & lang = LangCode("") ) const;
- virtual std::list<std::string> delpacks( const LangCode & lang = LangCode("") ) const;
- virtual PM::LocaleSet supportedLocales() const;
- virtual std::set<PMSelectablePtr> pureInspacks_ptrs( const LangCode & lang ) const;
- virtual std::set<PMSelectablePtr> inspacks_ptrs( const LangCode & lang ) const;
- virtual std::set<PMSelectablePtr> delpacks_ptrs( const LangCode & lang ) const;
- virtual bool isBase() const;
- virtual PMError provideSelToInstall( Pathname & path_r ) const;
- */
-
virtual TranslatedText summary() const;
virtual TranslatedText description() const;
virtual Label category() const;
virtual const std::set<std::string> suggests() const PURE_VIRTUAL;
virtual const std::set<std::string> recommends() const PURE_VIRTUAL;
virtual const std::set<std::string> install_packages( const Locale & lang = Locale("") ) const;
-
+ virtual Source_Ref source() const;
+
TranslatedText _summary;
std::string _parser_version;
std::string _name;
std::map< Locale, std::set<std::string> > _inspacks;
std::map< Locale, std::set<std::string> > _delpacks;
+ Source_Ref _source;
};
///////////////////////////////////////////////////////////////////