PackageGroup Package::group() const
{ return pimpl().group(); }
+ Package::Keywords Package::keywords() const
+ { return pimpl().keywords(); }
/** Don't ship it as class Url, because it might be
* in fact anything but a legal Url. */
*/
class Package : public ResObject
{
-
public:
typedef detail::PackageImplIf Impl;
typedef Package Self;
typedef TraitsType::PtrType Ptr;
typedef TraitsType::constPtrType constPtr;
+ public:
+ typedef std::set<PackageKeyword> Keywords;
+
public:
/**
* Checksum the source says this package should have
std::string packager() const;
/** */
PackageGroup group() const;
+ /** */
+ Keywords keywords() const;
/** Don't ship it as class Url, because it might be
* in fact anything but a legal Url. */
std::string url() const;
PackageGroup PackageImplIf::group() const
{ return PackageGroup(); }
+ PackageImplIf::Keywords PackageImplIf::keywords() const
+ { return std::set<PackageKeyword>(); }
+
Changelog PackageImplIf::changelog() const
{ return Changelog(); }
#include "zypp/Arch.h"
#include "zypp/Changelog.h"
#include "zypp/DiskUsage.h"
+#include "zypp/PackageKeyword.h"
#include "zypp/source/PackageDelta.h"
///////////////////////////////////////////////////////////////////
public:
typedef packagedelta::DeltaRpm DeltaRpm;
typedef packagedelta::PatchRpm PatchRpm;
+ typedef std::set<PackageKeyword> Keywords;
public:
/** \name Rpm Package Attributes. */
/** */
virtual PackageGroup group() const PURE_VIRTUAL;
/** */
+ virtual Keywords keywords() const PURE_VIRTUAL;
+ /** */
virtual Changelog changelog() const PURE_VIRTUAL;
/** */
virtual Pathname location() const PURE_VIRTUAL;
{
collectDeps( mtag_r.values, _nvrad[Dep::ENHANCES] );
}
- else if ( mtag_r.name == "Key" )
+ else if ( mtag_r.name == "Kwd" )
{
- _pkgImpl->_keywords = mtag_r.values;
+ _pkgImpl->_keywords.insert( mtag_r.values.begin(), mtag_r.values.end() );
}
else if ( mtag_r.name == "Aut" )
{
- // MultiTag is a Set but author is a list
_pkgImpl->_authors = mtag_r.values;
}
}
return _group;
}
+SuseTagsPackageImpl::Keywords SuseTagsPackageImpl::keywords() const
+{
+ return _keywords;
+}
+
Changelog SuseTagsPackageImpl::changelog() const
{
return Changelog();
/** */
virtual PackageGroup group() const;
/** */
- virtual Changelog changelog() const;
+ virtual Keywords keywords() const;
+ /** */
+ virtual Changelog changelog() const;
/** */
virtual Pathname location() const;
/** Don't ship it as class Url, because it might be
NVRA _nvra;
PackageGroup _group;
+ Keywords _keywords;
std::list<std::string> _authors;
- std::list<std::string> _keywords;
ByteCount _size;
ByteCount _archivesize;
Vendor _vendor;
_changelog(), // TODO
_type(parsed.type),
_authors(parsed.authors),
- _keywords( parsed.keywords),
+ _keywords( parsed.keywords.begin(), parsed.keywords.end() ),
_mediaNumber(str::strtonum<unsigned int>(parsed.media)),
_checksum(parsed.checksumType,
parsed.checksum),
_package_size(str::strtonum<unsigned int>(parsed.sizePackage)),
_size(str::strtonum<unsigned int>(parsed.sizeInstalled)),
_source(source_r)
-#if 0
- :
- _size_package(strtol(parsed.sizePackage.c_str(), 0, 10)),
- _size_archive(strtol(parsed.sizeArchive.c_str(), 0, 10)),
- _size_installed(strtol(parsed.sizeInstalled.c_str(), 0, 10)),
- _sourcepkg(parsed.sourcerpm),
- _dir_sizes(parsed.dirSizes),
-#endif
{
for (std::list<FileData>::const_iterator it = filelist.files.begin();
it != filelist.files.end();
}
/** */
-std::list<std::string> YUMPackageImpl::keywords() const
+YUMPackageImpl::Keywords YUMPackageImpl::keywords() const
{
return _keywords;
}
/** */
virtual std::string type() const;
/** */
- virtual std::list<std::string> keywords() const;
+ virtual Keywords keywords() const;
/** */
virtual bool installOnly() const;
/** */
Changelog _changelog;
std::string _type;
std::list<std::string> _authors;
- std::list<std::string> _keywords;
+ Keywords _keywords;
unsigned _mediaNumber;
CheckSum _checksum;
std::list<std::string> _filenames;
_group(data->tag_group()),
_changelog(data->tag_changelog()),
_type("rpm"), // FIXME in the future
-// _authors(data->authors),
-// _keywords(data->keywords),
_filenames(data->tag_filenames()),
// _disk_usage(data->diskusage),
_size(data->tag_size()),
_archivesize(data->tag_archivesize())
-#if 0
- _size_installed( strtol(parsed.sizeInstalled.c_str(), 0, 10)),
- _sourcepkg( parsed.sourcerpm),
- _dir_sizes(parsed.dirSizes),
-#endif
{
// we know we are reading english.
_description.setText(data->tag_description(), Locale("en"));
ByteCount RPMPackageImpl::archivesize() const
{ return _archivesize; }
- /** */
- std::list<std::string> RPMPackageImpl::authors() const
- { return _authors; }
-
/** */
std::list<std::string> RPMPackageImpl::filenames() const
{ return _filenames; }
std::string RPMPackageImpl::type() const
{ return _type; }
- /** */
- std::list<std::string> RPMPackageImpl::keywords() const
- { return _keywords; }
-
/** */
DiskUsage RPMPackageImpl::diskUsage() const
{ return _disk_usage; }
/** */
virtual ByteCount archivesize() const;
/** */
- virtual std::list<std::string> authors() const;
- /** */
virtual std::list<std::string> filenames() const;
/** */
virtual std::string type() const;
/** */
- virtual std::list<std::string> keywords() const;
- /** */
virtual DiskUsage diskUsage() const;
/** */
virtual Source_Ref source() const;
Changelog _changelog;
Pathname _location; // for 'local' rpms
std::string _type;
- std::list<std::string> _authors;
- std::list<std::string>_keywords;
std::list<std::string> _filenames;
DiskUsage _disk_usage;
ByteCount _size;