Author: mlandres
Date: Thu Mar 20 18:58:21 2008
New Revision: 9245
URL: http://svn.opensuse.org/viewcvs/zypp?rev=9245&view=rev
Log:
backup while cleaning up
Added:
trunk/libzypp/zypp/Vendor.h
Removed:
trunk/libzypp/zypp/NeedAType.h
Modified:
trunk/libzypp/zypp/CMakeLists.txt
trunk/libzypp/zypp/Package.cc
trunk/libzypp/zypp/Package.h
trunk/libzypp/zypp/Pattern.cc
trunk/libzypp/zypp/Pattern.h
trunk/libzypp/zypp/Product.cc
trunk/libzypp/zypp/Product.h
trunk/libzypp/zypp/Repository.h
trunk/libzypp/zypp/ResObject.cc
trunk/libzypp/zypp/ResObject.h
trunk/libzypp/zypp/VendorAttr.h
trunk/libzypp/zypp/sat/SolvAttr.cc
trunk/libzypp/zypp/sat/SolvAttr.h
trunk/libzypp/zypp/sat/Solvable.cc
trunk/libzypp/zypp/sat/Solvable.h
trunk/libzypp/zypp/target/CommitPackageCacheReadAhead.cc
trunk/libzypp/zypp/ui/PatternContentsImpl.cc
trunk/libzypp/zypp/ui/UserWantedPackages.cc
Modified: trunk/libzypp/zypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/CMakeLists.txt?rev=9245&r1=9244&r2=9245&view=diff
==============================================================================
--- trunk/libzypp/zypp/CMakeLists.txt (original)
+++ trunk/libzypp/zypp/CMakeLists.txt Thu Mar 20 18:58:21 2008
@@ -121,7 +121,7 @@
MediaSetAccess.h
Message.h
NameKindProxy.h
- NeedAType.h
+ Vendor.h
NVRAD.h
NVRA.h
NVR.h
Modified: trunk/libzypp/zypp/Package.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Package.cc?rev=9245&r1=9244&r2=9245&view=diff
==============================================================================
--- trunk/libzypp/zypp/Package.cc (original)
+++ trunk/libzypp/zypp/Package.cc Thu Mar 20 18:58:21 2008
@@ -55,15 +55,15 @@
{ return lookupStrAttribute( sat::SolvAttr::distribution ); }
/** */
- Label Package::license() const
- { return lookupStrAttribute( sat::SolvAttr::eula ); }
+ std::string Package::license() const
+ { return lookupStrAttribute( sat::SolvAttr::license ); }
/** */
std::string Package::packager() const
{ return lookupStrAttribute( sat::SolvAttr::packager ); }
/** */
- PackageGroup Package::group() const
+ std::string Package::group() const
{ return lookupStrAttribute( sat::SolvAttr::group ); }
#warning DUMMY keywords
@@ -77,28 +77,8 @@
{ return string(); }
/** */
- std::string Package::os() const
- { return lookupStrAttribute( sat::SolvAttr::os ); }
-
- /** */
- Text Package::prein() const
- { return lookupStrAttribute( sat::SolvAttr::prein); }
-
- /** */
- Text Package::postin() const
- { return lookupStrAttribute( sat::SolvAttr::postin); }
-
- /** */
- Text Package::preun() const
- { return lookupStrAttribute( sat::SolvAttr::preun); }
-
- /** */
- Text Package::postun() const
- { return lookupStrAttribute( sat::SolvAttr::postun); }
-
- /** */
ByteCount Package::sourcesize() const
- { return lookupNumAttribute( sat::SolvAttr::sourcesize); }
+ { return lookupNumAttribute( sat::SolvAttr::sourcesize ); }
/** */
#warning DUMMY authors
Modified: trunk/libzypp/zypp/Package.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Package.h?rev=9245&r1=9244&r2=9245&view=diff
==============================================================================
--- trunk/libzypp/zypp/Package.h (original)
+++ trunk/libzypp/zypp/Package.h Thu Mar 20 18:58:21 2008
@@ -48,27 +48,17 @@
/** */
std::string distribution() const;
/** */
- Label license() const;
+ std::string license() const;
/** */
std::string packager() const;
/** */
- PackageGroup group() const;
+ std::string 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;
- /** */
- std::string os() const;
- /** */
- Text prein() const;
- /** */
- Text postin() const;
- /** */
- Text preun() const;
- /** */
- Text postun() const;
- /** */
+ /** Size of corresponding the source package. */
ByteCount sourcesize() const;
/** */
std::liststd::string authors() const;
@@ -86,17 +76,30 @@
Edition sourcePkgEdition() const;
/**
- * Checksum the source says this package should have
- * \deprecated Use location().checksum()
+ * Checksum the source says this package should have.
+ * \see \ref location
*/
- ZYPP_DEPRECATED CheckSum checksum() const
+ CheckSum checksum() const
{ return location().checksum(); }
- /**
- * \short Location of the resolvable in the repository
+ /** Location of the resolvable in the repository.
+ * \ref OnMediaLocation conatins all information required to
+ * retrieve the packge (url, checksum, etc.).
*/
OnMediaLocation location() const;
+
+ /** \deprecated no metadata always empty */
+ ZYPP_DEPRECATED std::string os() const { return std::string(); }
+ /** \deprecated no metadata always empty */
+ ZYPP_DEPRECATED std::string prein() const { return std::string(); }
+ /** \deprecated no metadata always empty */
+ ZYPP_DEPRECATED std::string postin() const { return std::string(); }
+ /** \deprecated no metadata always empty */
+ ZYPP_DEPRECATED std::string preun() const { return std::string(); }
+ /** \deprecated no metadata always empty */
+ ZYPP_DEPRECATED std::string postun() const { return std::string(); }
+
protected:
friend Ptr make<Self>( const sat::Solvable & solvable_r );
/** Ctor */
Modified: trunk/libzypp/zypp/Pattern.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Pattern.cc?rev=9245&r1=9244&r2=9245&view=diff
==============================================================================
--- trunk/libzypp/zypp/Pattern.cc (original)
+++ trunk/libzypp/zypp/Pattern.cc Thu Mar 20 18:58:21 2008
@@ -48,8 +48,8 @@
bool Pattern::userVisible() const
{ return lookupBoolAttribute( sat::SolvAttr::isvisible ); }
/** */
- std::string Pattern::category() const
- { return lookupStrAttribute( sat::SolvAttr::category ); }
+ std::string Pattern::category( const Locale & lang_r ) const
+ { return lookupStrAttribute( sat::SolvAttr::category, lang_r ); }
/** */
Pathname Pattern::icon() const
{ return lookupStrAttribute( sat::SolvAttr::icon ); }
@@ -57,13 +57,13 @@
Pathname Pattern::script() const
{ return lookupStrAttribute( sat::SolvAttr::script ); }
- Label Pattern::order() const
- { return Label(); }
+ std::string Pattern::order() const
+ { return lookupStrAttribute( sat::SolvAttr::order ); }
- std::setstd::string Pattern::install_packages( const Locale & lang ) const
- {
#warning implement PATTERN::INSTALL_PACKAGES
#if 0
+ std::setstd::string Pattern::install_packages( const Locale & lang ) const
+ {
- static void copycaps( std::setstd::string & out, const CapSet & in)
- {
- for (CapSet::const_iterator it = in.begin(); it != in.end(); ++it) {
@@ -87,9 +87,9 @@
- }
-
-
-#endif
return std::setstd::string();
}
+#endif
#warning implement PATTERN::INSTALL_PACKAGES
const Capabilities & Pattern::includes() const
Modified: trunk/libzypp/zypp/Pattern.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Pattern.h?rev=9245&r1=9244&r2=9245&view=diff
==============================================================================
--- trunk/libzypp/zypp/Pattern.h (original)
+++ trunk/libzypp/zypp/Pattern.h Thu Mar 20 18:58:21 2008
@@ -41,16 +41,13 @@
/** */
bool userVisible() const;
/** */
- std::string category() const;
+ std::string category( const Locale & lang_r = Locale() ) const;
/** */
Pathname icon() const;
/** */
Pathname script() const;
/** */
- Label order() const;
-
- /** \deprecated AFAIK unused old Selection interface method. */
- std::setstd::string install_packages( const Locale & lang = Locale("") ) const ZYPP_DEPRECATED;
+ std::string order() const;
/** Ui hint. */
const Capabilities & includes() const;
Modified: trunk/libzypp/zypp/Product.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Product.cc?rev=9245&r1=9244&r2=9245&view=diff
==============================================================================
--- trunk/libzypp/zypp/Product.cc (original)
+++ trunk/libzypp/zypp/Product.cc Thu Mar 20 18:58:21 2008
@@ -40,39 +40,42 @@
// Package interface forwarded to implementation
//
///////////////////////////////////////////////////////////////////
-
+#warning DUMMY type
std::string Product::type() const
{ return std::string(); }
- Label Product::vendor() const
- { return Label(); }
-
+#warning DUMMY releaseNotesUrl
Url Product::releaseNotesUrl() const
{ return Url(); }
+#warning DUMMY updateUrls
std::list<Url> Product::updateUrls() const
{ return std::list<Url>(); }
+#warning DUMMY extraUrls
std::list<Url> Product::extraUrls() const
{ return std::list<Url>(); }
+#warning DUMMY optionalUrls
std::list<Url> Product::optionalUrls() const
{ return std::list<Url>(); }
+#warning DUMMY flags
std::liststd::string Product::flags() const
{ return std::liststd::string(); }
- /** */
- Label Product::shortName() const
- { return Label(); }
-
- /** */
- Label Product::longName() const
- { return summary(); }
+#warning DUMMY shortName
+ std::string Product::shortName() const
+ { return std::string(); }
+
+ std::string Product::longName( const Locale & lang_r ) const
+ { return summary( lang_r ); }
+#warning DUMMY distributionName
std::string Product::distributionName() const
{ return std::string(); }
+#warning DUMMY distributionEdition
Edition Product::distributionEdition() const
{ return Edition(); }
Modified: trunk/libzypp/zypp/Product.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Product.h?rev=9245&r1=9244&r2=9245&view=diff
==============================================================================
--- trunk/libzypp/zypp/Product.h (original)
+++ trunk/libzypp/zypp/Product.h Thu Mar 20 18:58:21 2008
@@ -41,9 +41,6 @@
/** Get the product type (base, add-on) */
std::string type() const;
- /** Get the vendor of the product */
- Label vendor() const;
-
/** The URL to download the release notes for this product */
Url releaseNotesUrl() const;
@@ -69,11 +66,11 @@
/** The product flags */
std::liststd::string flags() const;
- /** */
- Label shortName() const;
+ /** Untranslated short name like <tt>SLES 10</tt>*/
+ std::string shortName() const;
- /** */
- Label longName() const;
+ /** Translated long name like <tt>SUSE Linux Enterprise Server 10</tt>*/
+ std::string longName( const Locale & lang_r = Locale() ) const;
/** Vendor specific distribution id. */
std::string distributionName() const;
Modified: trunk/libzypp/zypp/Repository.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Repository.h?rev=9245&r1=9244&r2=9245&view=diff
==============================================================================
--- trunk/libzypp/zypp/Repository.h (original)
+++ trunk/libzypp/zypp/Repository.h Thu Mar 20 18:58:21 2008
@@ -29,20 +29,21 @@
//
/** */
class Repository : protected sat::detail::PoolMember,
- private base::SafeBool<Repository>
+ private base::SafeBool<Repository>
{
public:
typedef filter_iterator SolvableIterator;
typedef sat::detail::size_type size_type;
+ typedef sat::detail::RepoIdType IdType;
public:
/** Default ctor creates \ref noRepository.*/
Repository()
- : _id( sat::detail::noRepoId ) {}
+ : _id( sat::detail::noRepoId ) {}
/** \ref PoolImpl ctor. */
- explicit Repository( sat::detail::RepoIdType id_r )
- : _id( id_r ) {}
+ explicit Repository( IdType id_r )
+ : _id( id_r ) {}
public:
/** Represents no \ref Repository. */
@@ -106,9 +107,9 @@
void addSolv( const Pathname & file_r );
/** Add \c count_r new empty \ref Solvable to this \ref Repository. */
- sat::detail::SolvableIdType addSolvables( unsigned count_r );
+ sat::Solvable::IdType addSolvables( unsigned count_r );
/** \overload Add only one new \ref Solvable. */
- sat::detail::SolvableIdType addSolvable()
+ sat::Solvable::IdType addSolvable()
{ return addSolvables( 1 ); }
//@}
@@ -116,12 +117,12 @@
/** Expert backdoor. */
::_Repo * get() const;
/** Expert backdoor. */
- sat::detail::RepoIdType id() const { return _id; }
+ IdType id() const { return _id; }
private:
friend base::SafeBool<Repository>::operator bool_type() const;
bool boolTest() const { return get(); }
private:
- sat::detail::RepoIdType _id;
+ IdType _id;
};
///////////////////////////////////////////////////////////////////
@@ -138,7 +139,7 @@
/** \relates Repository */
inline bool operator<( const Repository & lhs, const Repository & rhs )
- { return lhs.get() < rhs.get(); }
+ { return lhs.get() < rhs.get(); }
///////////////////////////////////////////////////////////////////
//
Modified: trunk/libzypp/zypp/ResObject.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResObject.cc?rev=9245&r1=9244&r2=9245&view=diff
==============================================================================
--- trunk/libzypp/zypp/ResObject.cc (original)
+++ trunk/libzypp/zypp/ResObject.cc Thu Mar 20 18:58:21 2008
@@ -59,23 +59,23 @@
//
///////////////////////////////////////////////////////////////////
- Text ResObject::summary() const
- { return lookupStrAttribute( sat::SolvAttr::summary ); }
+ std::string ResObject::summary( const Locale & lang_r ) const
+ { return lookupStrAttribute( sat::SolvAttr::summary, lang_r ); }
- Text ResObject::description() const
- { return lookupStrAttribute( sat::SolvAttr::description ); }
+ std::string ResObject::description( const Locale & lang_r ) const
+ { return lookupStrAttribute( sat::SolvAttr::description, lang_r ); }
- Text ResObject::insnotify() const
- { return lookupStrAttribute( sat::SolvAttr::insnotify ); }
+ std::string ResObject::insnotify( const Locale & lang_r ) const
+ { return lookupStrAttribute( sat::SolvAttr::insnotify, lang_r ); }
- Text ResObject::delnotify() const
- { return lookupStrAttribute( sat::SolvAttr::delnotify ); }
+ std::string ResObject::delnotify( const Locale & lang_r ) const
+ { return lookupStrAttribute( sat::SolvAttr::delnotify, lang_r ); }
- License ResObject::licenseToConfirm() const
- { return lookupStrAttribute( sat::SolvAttr::eula ); }
+ std::string ResObject::licenseToConfirm( const Locale & lang_r ) const
+ { return lookupStrAttribute( sat::SolvAttr::eula, lang_r ); }
- ByteCount ResObject::size() const
- { return ByteCount( lookupNumAttribute( sat::SolvAttr::size ), ByteCount::K ); }
+ ByteCount ResObject::installsize() const
+ { return ByteCount( lookupNumAttribute( sat::SolvAttr::installsize ), ByteCount::K ); }
ByteCount ResObject::downloadSize() const
{ return ByteCount( lookupNumAttribute( sat::SolvAttr::downloadsize ), ByteCount::K ); }
@@ -87,13 +87,11 @@
bool ResObject::installOnly() const
{ return false; }
-#warning DUMMY
Date ResObject::buildtime() const
- { return Date(); }
+ { return Date( lookupNumAttribute( sat::SolvAttr::buildtime ) ); }
-#warning DUMMY installtime
Date ResObject::installtime() const
- { return Date(); }
+ { return Date( lookupNumAttribute( sat::SolvAttr::installtime ) ); }
#warning DUMMY diskusage
const DiskUsage & ResObject::diskusage() const
Modified: trunk/libzypp/zypp/ResObject.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResObject.h?rev=9245&r1=9244&r2=9245&view=diff
==============================================================================
--- trunk/libzypp/zypp/ResObject.h (original)
+++ trunk/libzypp/zypp/ResObject.h Thu Mar 20 18:58:21 2008
@@ -15,14 +15,16 @@
#include "zypp/base/Deprecated.h"
#include "zypp/Resolvable.h"
-#include "zypp/NeedAType.h"
#include "zypp/Date.h"
+#include "zypp/Locale.h"
+#include "zypp/Vendor.h"
#include "zypp/ByteCount.h"
#include "zypp/DiskUsage.h"
-#include "zypp/TranslatedText.h"
#include "zypp/OnMediaLocation.h"
#include "zypp/Repository.h"
+#include "zypp/TranslatedText.h"
+
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
@@ -67,12 +69,12 @@
* \short Short text describing the resolvable.
* This attribute is usually displayed in columns.
*/
- Text summary() const;
+ std::string summary( const Locale & lang_r = Locale() ) const;
/**
* \short Long text describing the resolvable.
*/
- Text description() const;
+ std::string description( const Locale & lang_r = Locale() ) const;
/**
* \short Installation Notification
@@ -80,7 +82,7 @@
* This text can be used to tell the user some notes
* When he selects the resovable for installation.
*/
- Text insnotify() const;
+ std::string insnotify( const Locale & lang_r = Locale() ) const;
/**
* \short De-Installation Notification
@@ -88,7 +90,7 @@
* This text can be used to tell the user some notes
* When he selects the resovable for deinstall.
*/
- Text delnotify() const;
+ std::string delnotify( const Locale & lang_r = Locale() ) const;
/**
* \short License or agreement to accept
@@ -96,7 +98,7 @@
* Agreement, warning or license the user should
* accept before installing the resolvable.
*/
- Text licenseToConfirm() const;
+ std::string licenseToConfirm( const Locale & lang_r = Locale() ) const;
/**
* \short Vendor
@@ -107,7 +109,10 @@
{ return Resolvable::vendor().asString(); }
/** Installed size. */
- ByteCount size() const;
+ ByteCount installsize() const;
+ /** \deprecated Use installsize which is more precise. */
+ ZYPP_DEPRECATED ByteCount size() const
+ { return installsize(); }
/** Size of the rpm package. */
ByteCount downloadSize() const;
Added: trunk/libzypp/zypp/Vendor.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Vendor.h?rev=9245&view=auto
==============================================================================
--- trunk/libzypp/zypp/Vendor.h (added)
+++ trunk/libzypp/zypp/Vendor.h Thu Mar 20 18:58:21 2008
@@ -0,0 +1,29 @@
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/Vendor.h
+ *
+*/
+#ifndef ZYPP_VENDOR_H
+#define ZYPP_VENDOR_H
+
+#include <string>
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+
+ typedef std::string Vendor;
+
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+
+#include "VendorAttr.h"
+
+#endif // ZYPP_VENDOR_H
Modified: trunk/libzypp/zypp/VendorAttr.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/VendorAttr.h?rev=9245&r1=9244&r2=9245&view=diff
==============================================================================
--- trunk/libzypp/zypp/VendorAttr.h (original)
+++ trunk/libzypp/zypp/VendorAttr.h Thu Mar 20 18:58:21 2008
@@ -16,8 +16,8 @@
#include <string>
#include "zypp/base/NonCopyable.h"
-#include "zypp/NeedAType.h"
#include "zypp/PathInfo.h"
+#include "zypp/Vendor.h"
///////////////////////////////////////////////////////////////////
namespace zypp {
@@ -37,7 +37,7 @@
/**
* Adding new equivalent vendors described in a file
**/
- bool addVendorFile( const Pathname & filename) const;
+ bool addVendorFile( const Pathname & filename) const;
/** Return whether two vendor strings shold be treated as the same vendor.
* Usually the solver is allowed to automatically select a package of an
Modified: trunk/libzypp/zypp/sat/SolvAttr.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/SolvAttr.cc?rev=9245&r1=9244&r2=9245&view=diff
==============================================================================
--- trunk/libzypp/zypp/sat/SolvAttr.cc (original)
+++ trunk/libzypp/zypp/sat/SolvAttr.cc Thu Mar 20 18:58:21 2008
@@ -9,10 +9,14 @@
/** \file zypp/SolvAttr.cc
*
*/
+extern "C"
+{
+#include
+}
+
#include <iostream>
#include "zypp/base/String.h"
-
#include "zypp/sat/SolvAttr.h"
using std::endl;
@@ -25,44 +29,54 @@
const SolvAttr SolvAttr::noAttr;
-#warning use predefined Ids from libsatsolver.
- const SolvAttr SolvAttr::summary ( "solvable:summary" );
- const SolvAttr SolvAttr::description ( "solvable:description" );
- const SolvAttr SolvAttr::insnotify ( "solvable:messageins" );
- const SolvAttr SolvAttr::delnotify ( "solvable:messagedel" );
- const SolvAttr SolvAttr::vendor ( "solvable:vendor" );
- const SolvAttr SolvAttr::license ( "solvable:license" );
- const SolvAttr SolvAttr::size ( "solvable:installsize" );
- const SolvAttr SolvAttr::downloadsize ( "solvable:downloadsize" );
+#warning STILL ATTRIBUTES HERE WHICH ARE NOT PROVIDED BY SOLV FILES
+// At least the ones that do nat have a satsolver/knownid.
+
+ const SolvAttr SolvAttr::summary ( SOLVABLE_SUMMARY ); // translated
+ const SolvAttr SolvAttr::description ( SOLVABLE_DESCRIPTION ); // translated
+ const SolvAttr SolvAttr::insnotify ( SOLVABLE_MESSAGEINS ); // translated
+ const SolvAttr SolvAttr::delnotify ( SOLVABLE_MESSAGEDEL ); // translated
+ const SolvAttr SolvAttr::eula ( SOLVABLE_EULA ); // translated
+ const SolvAttr SolvAttr::installtime ( SOLVABLE_INSTALLTIME );
+ const SolvAttr SolvAttr::buildtime ( SOLVABLE_BUILDTIME );
+ const SolvAttr SolvAttr::installsize ( SOLVABLE_INSTALLSIZE );
+ const SolvAttr SolvAttr::downloadsize ( SOLVABLE_DOWNLOADSIZE );
+ const SolvAttr SolvAttr::diskusage ( SOLVABLE_DISKUSAGE );
//package
- const SolvAttr SolvAttr::medianr ( "solvable:medianr" );
- const SolvAttr SolvAttr::mediafile ( "solvable:mediafile" );
- const SolvAttr SolvAttr::mediadir ( "solvable:mediadir" );
- const SolvAttr SolvAttr::eula ( "solvable:eula" );
+ const SolvAttr SolvAttr::medianr ( SOLVABLE_MEDIANR );
+ const SolvAttr SolvAttr::mediafile ( SOLVABLE_MEDIAFILE );
+ const SolvAttr SolvAttr::mediadir ( SOLVABLE_MEDIADIR );
const SolvAttr SolvAttr::changelog ( "changelog" );
const SolvAttr SolvAttr::buildhost ( "buildhost" );
const SolvAttr SolvAttr::distribution ( "distribution" );
+ const SolvAttr SolvAttr::license ( SOLVABLE_LICENSE );
const SolvAttr SolvAttr::packager ( "packager" );
- const SolvAttr SolvAttr::group ( "solvable:group" );
- const SolvAttr SolvAttr::keywords ( "solvable:keywords" );
- const SolvAttr SolvAttr::os ( "os" );
- const SolvAttr SolvAttr::prein ( "prein" );
- const SolvAttr SolvAttr::postin ( "postin" );
- const SolvAttr SolvAttr::preun ( "preun" );
- const SolvAttr SolvAttr::postun ( "postun" );
+ const SolvAttr SolvAttr::group ( SOLVABLE_GROUP );
+ const SolvAttr SolvAttr::keywords ( SOLVABLE_KEYWORDS );
const SolvAttr SolvAttr::sourcesize ( "sourcesize" );
- const SolvAttr SolvAttr::authors ( "solvable:authors" );
+ const SolvAttr SolvAttr::authors ( SOLVABLE_AUTHORS );
const SolvAttr SolvAttr::filenames ( "filenames" );
const SolvAttr SolvAttr::srcpkgname ( "srcpkgname" );
const SolvAttr SolvAttr::srcpkgedition( "srcpkgedition" );
+ const SolvAttr SolvAttr::filelist ( SOLVABLE_FILELIST );
+ const SolvAttr SolvAttr::sourcearch ( SOLVABLE_SOURCEARCH );
+ const SolvAttr SolvAttr::sourcename ( SOLVABLE_SOURCENAME );
+ const SolvAttr SolvAttr::sourceevr ( SOLVABLE_SOURCEEVR );
+ const SolvAttr SolvAttr::headerend ( SOLVABLE_HEADEREND );
+
+ // patch
+ const SolvAttr SolvAttr::patchcategory( SOLVABLE_PATCHCATEGORY );
//pattern
- const SolvAttr SolvAttr::isvisible ( "solvable:isvisible" );
- const SolvAttr SolvAttr::icon ( "icon" );
+ const SolvAttr SolvAttr::isvisible ( SOLVABLE_ISVISIBLE );
+ const SolvAttr SolvAttr::icon ( SOLVABLE_ICON );
+ const SolvAttr SolvAttr::order ( SOLVABLE_ORDER );
const SolvAttr SolvAttr::isdefault ( "isdefault" );
- const SolvAttr SolvAttr::category ( "solvable:category" ); // FIXME translate
+ const SolvAttr SolvAttr::category ( SOLVABLE_CATEGORY ); // translated
const SolvAttr SolvAttr::script ( "script" );
+ const SolvAttr SolvAttr::includes ( SOLVABLE_INCLUDES );
+ const SolvAttr SolvAttr::extends ( SOLVABLE_EXTENDS );
} // namespace sat
/////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/sat/SolvAttr.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/SolvAttr.h?rev=9245&r1=9244&r2=9245&view=diff
==============================================================================
--- trunk/libzypp/zypp/sat/SolvAttr.h (original)
+++ trunk/libzypp/zypp/sat/SolvAttr.h Thu Mar 20 18:58:21 2008
@@ -43,39 +43,47 @@
static const SolvAttr description;
static const SolvAttr insnotify;
static const SolvAttr delnotify;
- static const SolvAttr vendor;
- static const SolvAttr license;
- static const SolvAttr size;
+ static const SolvAttr eula;
+ static const SolvAttr installtime;
+ static const SolvAttr buildtime;
+ static const SolvAttr installsize;
static const SolvAttr downloadsize;
+ static const SolvAttr diskusage;
//package
static const SolvAttr mediadir;
static const SolvAttr medianr;
static const SolvAttr mediafile;
- static const SolvAttr eula;
static const SolvAttr changelog;
static const SolvAttr buildhost;
static const SolvAttr distribution;
+ static const SolvAttr license;
static const SolvAttr packager;
static const SolvAttr group;
static const SolvAttr keywords;
- static const SolvAttr os;
- static const SolvAttr prein;
- static const SolvAttr postin;
- static const SolvAttr preun;
- static const SolvAttr postun;
static const SolvAttr sourcesize;
static const SolvAttr authors;
static const SolvAttr filenames;
static const SolvAttr srcpkgname;
static const SolvAttr srcpkgedition;
+ static const SolvAttr filelist;
+ static const SolvAttr sourcearch;
+ static const SolvAttr sourcename;
+ static const SolvAttr sourceevr;
+ static const SolvAttr headerend;
+
+ // patch
+ static const SolvAttr patchcategory;
// patern
static const SolvAttr isvisible;
static const SolvAttr icon;
+ static const SolvAttr order;
static const SolvAttr isdefault;
static const SolvAttr category;
static const SolvAttr script;
+ static const SolvAttr includes;
+ static const SolvAttr extends;
//@}
Modified: trunk/libzypp/zypp/sat/Solvable.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/Solvable.cc?rev=9245&r1=9244&r2=9245&view=diff
==============================================================================
--- trunk/libzypp/zypp/sat/Solvable.cc (original)
+++ trunk/libzypp/zypp/sat/Solvable.cc Thu Mar 20 18:58:21 2008
@@ -77,9 +77,15 @@
{
NO_SOLVABLE_RETURN( std::string() );
const char *s = ::repo_lookup_str( _solvable, attr.idStr().id() );
- return s ? s : std::string();
+ return s ? s : std::string();
}
+ std::string Solvable::lookupStrAttribute( const SolvAttr & attr, const Locale & lang_r ) const
+ {
+#warning FIX RETRIEVIENG TRANSLATIONS
+ return lookupStrAttribute( attr );
+ }
+
unsigned Solvable::lookupNumAttribute( const SolvAttr & attr ) const
{
NO_SOLVABLE_RETURN( 0 );
Modified: trunk/libzypp/zypp/sat/Solvable.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/Solvable.h?rev=9245&r1=9244&r2=9245&view=diff
==============================================================================
--- trunk/libzypp/zypp/sat/Solvable.h (original)
+++ trunk/libzypp/zypp/sat/Solvable.h Thu Mar 20 18:58:21 2008
@@ -56,12 +56,15 @@
private base::SafeBool<Solvable>
{
public:
+ typedef sat::detail::SolvableIdType IdType;
+
+ public:
/** Default ctor creates \ref nosolvable.*/
Solvable()
: _id( detail::noSolvableId ) {}
/** \ref PoolImpl ctor. */
- explicit Solvable( detail::SolvableIdType id_r )
+ explicit Solvable( IdType id_r )
: _id( id_r ) {}
public:
@@ -84,6 +87,15 @@
* or an empty string if it does not exists.
*/
std::string lookupStrAttribute( const SolvAttr & attr ) const;
+ /** \overload Trying to look up a translated string attribute.
+ *
+ * Passing an empty \ref Locale will return the string for the
+ * current default locale (\see \ref ZConfig::defaultTextLocale).
+ *
+ * Returns the translation for \c lang_r considering all fallback
+ * locales. Returns an empty string if no translation is available.
+ */
+ std::string lookupStrAttribute( const SolvAttr & attr, const Locale & lang_r ) const;
/**
* returns the numeric attribute value for \ref attr
@@ -172,12 +184,12 @@
/** Expert backdoor. */
::_Solvable * get() const;
/** Expert backdoor. */
- detail::SolvableIdType id() const { return _id; }
+ IdType id() const { return _id; }
private:
friend base::SafeBool<Solvable>::operator bool_type() const;
bool boolTest() const { return get(); }
private:
- detail::SolvableIdType _id;
+ IdType _id;
};
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/target/CommitPackageCacheReadAhead.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/target/CommitPackageCacheReadAhead.cc?rev=9245&r1=9244&r2=9245&view=diff
==============================================================================
--- trunk/libzypp/zypp/target/CommitPackageCacheReadAhead.cc (original)
+++ trunk/libzypp/zypp/target/CommitPackageCacheReadAhead.cc Thu Mar 20 18:58:21 2008
@@ -160,7 +160,7 @@
ManagedFile fromSource( sourceProvidePackage( it->first ) );
// copy it to the cachedir
- std::string destName( str::form( "S%lu_%u_%s",
+ std::string destName( str::form( "S%p_%u_%s",
it->first->repository().id(),
it->first->mediaNr(),
fromSource.value().basename().c_str() ) );
Modified: trunk/libzypp/zypp/ui/PatternContentsImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ui/PatternContentsImpl.cc?rev=9245&r1=9244&r2=9245&view=diff
==============================================================================
--- trunk/libzypp/zypp/ui/PatternContentsImpl.cc (original)
+++ trunk/libzypp/zypp/ui/PatternContentsImpl.cc Thu Mar 20 18:58:21 2008
@@ -40,7 +40,9 @@
void operator()( const Pattern::constPtr & pattern )
{
- std::setstd::string s( pattern->install_packages() );
+#warning NEEDS FIX
+// std::setstd::string s( pattern->install_packages() );
+ std::setstd::string s;
_result->insert( s.begin(), s.end() );
}
Modified: trunk/libzypp/zypp/ui/UserWantedPackages.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ui/UserWantedPackages.cc?rev=9245&r1=9244&r2=9245&view=diff
==============================================================================
--- trunk/libzypp/zypp/ui/UserWantedPackages.cc (original)
+++ trunk/libzypp/zypp/ui/UserWantedPackages.cc Thu Mar 20 18:58:21 2008
@@ -129,7 +129,8 @@
DBG << (*it)->theObj()->kind().asString()
<< " will be transacted: \"" << pkgSet->name() << "\"" << endl;
- set<string> setPkgs = pkgSet->install_packages();
+#warning NEEDS FIX
+ set<string> setPkgs;// = pkgSet->install_packages();
pkgNames.insert( setPkgs.begin(), setPkgs.end() );
}
}
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org