Zypp Commits
Threads by month
- ----- 2024 -----
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
May 2007
- 8 participants
- 191 discussions
[zypp-commit] r5655 - in /trunk/libzypp: devel/devel.dmacvicar/CachedSource_tp.cc devel/devel.dmacvicar/RepositoryManager_tp.cc zypp/Url.cc zypp/Url.h zypp2/RepoInfo.cc zypp2/RepoManager.cc
by dmacvicar@svn.opensuse.org 31 May '07
by dmacvicar@svn.opensuse.org 31 May '07
31 May '07
Author: dmacvicar
Date: Thu May 31 18:17:48 2007
New Revision: 5655
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5655&view=rev
Log:
- add operator < to use Url in std::set
- First repomanager that can list repos from /etc/repos.d ;-)
Modified:
trunk/libzypp/devel/devel.dmacvicar/CachedSource_tp.cc
trunk/libzypp/devel/devel.dmacvicar/RepositoryManager_tp.cc
trunk/libzypp/zypp/Url.cc
trunk/libzypp/zypp/Url.h
trunk/libzypp/zypp2/RepoInfo.cc
trunk/libzypp/zypp2/RepoManager.cc
Modified: trunk/libzypp/devel/devel.dmacvicar/CachedSource_tp.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.dmacvicar/Ca…
==============================================================================
--- trunk/libzypp/devel/devel.dmacvicar/CachedSource_tp.cc (original)
+++ trunk/libzypp/devel/devel.dmacvicar/CachedSource_tp.cc Thu May 31 18:17:48 2007
@@ -11,13 +11,13 @@
#include "zypp/detail/PackageImplIf.h"
#include "zypp/Package.h"
#include "zypp2/RepositoryFactory.h"
-#include "zypp2/repository/cached/CachedRepositoryImpl.h"
+#include "zypp2/repo/cached/RepoImpl.h"
#include "zypp/data/ResolvableData.h"
using namespace std;
using namespace zypp;
-using namespace zypp::repository;
-using namespace zypp::repository::cached;
+using namespace zypp::repo;
+using namespace zypp::repo::cached;
int main(int argc, char **argv)
Modified: trunk/libzypp/devel/devel.dmacvicar/RepositoryManager_tp.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.dmacvicar/Re…
==============================================================================
--- trunk/libzypp/devel/devel.dmacvicar/RepositoryManager_tp.cc (original)
+++ trunk/libzypp/devel/devel.dmacvicar/RepositoryManager_tp.cc Thu May 31 18:17:48 2007
@@ -12,13 +12,13 @@
#include "zypp/detail/PackageImplIf.h"
#include "zypp/Package.h"
#include "zypp2/RepositoryFactory.h"
-#include "zypp2/RepositoryInfo.h"
+#include "zypp2/RepoInfo.h"
-#include "zypp2/repository/cached/CachedRepositoryImpl.h"
+#include "zypp2/repo/cached/RepoImpl.h"
#include "zypp/data/ResolvableData.h"
-#include "zypp2/RepositoryManager.h"
-#include "zypp2/RepositoryInfo.h"
+#include "zypp2/RepoManager.h"
+#include "zypp2/RepoInfo.h"
using namespace std;
@@ -34,10 +34,10 @@
Pathname dbpath = Pathname(getenv("PWD"));
- RepositoryManager manager;
- RepositoryInfoList repos = manager.knownRepositories();
+ RepoManager manager;
+ RepoInfoList repos = manager.knownRepositories();
- for ( RepositoryInfoList::const_iterator it = repos.begin(); it != repos.end(); ++it )
+ for ( RepoInfoList::const_iterator it = repos.begin(); it != repos.end(); ++it )
{
cout << *it << endl;
}
Modified: trunk/libzypp/zypp/Url.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Url.cc?rev=5655&r1=…
==============================================================================
--- trunk/libzypp/zypp/Url.cc (original)
+++ trunk/libzypp/zypp/Url.cc Thu May 31 18:17:48 2007
@@ -783,6 +783,10 @@
return str << url.asString();
}
+ bool operator<( const Url &lhs, const Url &rhs )
+ {
+ return (lhs.asString() < rhs.asString());
+ }
////////////////////////////////////////////////////////////////////
} // namespace zypp
Modified: trunk/libzypp/zypp/Url.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Url.h?rev=5655&r1=5…
==============================================================================
--- trunk/libzypp/zypp/Url.h (original)
+++ trunk/libzypp/zypp/Url.h Thu May 31 18:17:48 2007
@@ -772,6 +772,11 @@
std::ostream & operator<<( std::ostream & str, const Url & url );
+ /**
+ * needed for std::set
+ */
+ bool operator<( const Url &lhs, const Url &rhs );
+
////////////////////////////////////////////////////////////////////
} // namespace zypp
//////////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp2/RepoInfo.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/RepoInfo.cc?rev=56…
==============================================================================
--- trunk/libzypp/zypp2/RepoInfo.cc (original)
+++ trunk/libzypp/zypp2/RepoInfo.cc Thu May 31 18:17:48 2007
@@ -162,7 +162,14 @@
{
str << "--------------------------------------" << std::endl;
str << "- alias : " << alias() << std::endl;
- //str << "- url : " << baseUrl() << std::endl;
+ std::set<Url> url_set(urls());
+ for ( std::set<Url>::const_iterator it = url_set.begin();
+ it != url_set.end();
+ ++it )
+ {
+ str << "- url : " << *it << std::endl;
+ }
+
str << "- type : " << type() << std::endl;
str << "- enabled : " << enabled() << std::endl;
str << "- autorefresh : " << autorefresh() << std::endl;
@@ -170,6 +177,11 @@
return str;
}
+ std::ostream & operator<<( std::ostream & str, const RepoInfo & obj )
+ {
+ return obj.dumpOn(str);
+ }
+
/////////////////////////////////////////////////////////////////
} // namespace zypp2
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp2/RepoManager.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/RepoManager.cc?rev…
==============================================================================
--- trunk/libzypp/zypp2/RepoManager.cc (original)
+++ trunk/libzypp/zypp2/RepoManager.cc Thu May 31 18:17:48 2007
@@ -44,7 +44,7 @@
++it )
{
- MIL << (*it).first << endl;
+ //MIL << (*it).first << endl;
if (it->first == "name" )
info.setName(it-> second);
else if ( it->first == "enabled" )
@@ -54,22 +54,10 @@
}
// add it to the list.
+ repos.push_back(info);
}
-// dictionary *d = iniparser_new(file.c_str());
-//
-// if ( d == NULL )
-// ZYPP_THROW(Exception("Failed creating dictionary"));
-//
-// int n = iniparser_getnsec(d);
-// MIL << n << endl;
-//
-// for ( int i = 0; i < n; i++ )
-// {
-// MIL << iniparser_getsecname(d, i) << endl;
-//
-// }
- return std::list<RepoInfo>();
+ return repos;
}
static std::list<RepoInfo> repositories_in_path( const Pathname &dir )
@@ -90,9 +78,7 @@
std::list<RepoInfo> RepoManager::knownRepositories()
{
-
-
- return std::list<RepoInfo>();
+ return repositories_in_path("/etc/zypp/repos.d");
}
} // ns zypp
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r5654 - in /trunk/libzypp/zypp2: ./ repo/memory/
by dmacvicar@svn.opensuse.org 31 May '07
by dmacvicar@svn.opensuse.org 31 May '07
31 May '07
Author: dmacvicar
Date: Thu May 31 18:00:01 2007
New Revision: 5654
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5654&view=rev
Log:
clean more class names
move data not belonging to RepoInfo to
RepoStatus, like the checksum or timestamp.
Added:
trunk/libzypp/zypp2/repo/memory/PackageImpl.cc
- copied, changed from r5651, trunk/libzypp/zypp2/repo/memory/DPackageImpl.cc
trunk/libzypp/zypp2/repo/memory/PackageImpl.h
- copied unchanged from r5651, trunk/libzypp/zypp2/repo/memory/DPackageImpl.h
trunk/libzypp/zypp2/repo/memory/PatternImpl.cc
- copied, changed from r5651, trunk/libzypp/zypp2/repo/memory/DPatternImpl.cc
trunk/libzypp/zypp2/repo/memory/PatternImpl.h
- copied unchanged from r5651, trunk/libzypp/zypp2/repo/memory/DPatternImpl.h
trunk/libzypp/zypp2/repo/memory/ProductImpl.cc
- copied, changed from r5651, trunk/libzypp/zypp2/repo/memory/DProductImpl.cc
trunk/libzypp/zypp2/repo/memory/ProductImpl.h
- copied unchanged from r5651, trunk/libzypp/zypp2/repo/memory/DProductImpl.h
trunk/libzypp/zypp2/repo/memory/SrcPackageImpl.cc
- copied, changed from r5651, trunk/libzypp/zypp2/repo/memory/DSrcPackageImpl.cc
trunk/libzypp/zypp2/repo/memory/SrcPackageImpl.h
- copied unchanged from r5651, trunk/libzypp/zypp2/repo/memory/DSrcPackageImpl.h
Removed:
trunk/libzypp/zypp2/repo/memory/DPackageImpl.cc
trunk/libzypp/zypp2/repo/memory/DPackageImpl.h
trunk/libzypp/zypp2/repo/memory/DPatternImpl.cc
trunk/libzypp/zypp2/repo/memory/DPatternImpl.h
trunk/libzypp/zypp2/repo/memory/DProductImpl.cc
trunk/libzypp/zypp2/repo/memory/DProductImpl.h
trunk/libzypp/zypp2/repo/memory/DSrcPackageImpl.cc
trunk/libzypp/zypp2/repo/memory/DSrcPackageImpl.h
Modified:
trunk/libzypp/zypp2/CMakeLists.txt
trunk/libzypp/zypp2/RepoInfo.cc
trunk/libzypp/zypp2/RepoInfo.h
trunk/libzypp/zypp2/RepoManager.cc
trunk/libzypp/zypp2/RepoStatus.cc
trunk/libzypp/zypp2/RepoStatus.h
Modified: trunk/libzypp/zypp2/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/CMakeLists.txt?rev…
==============================================================================
--- trunk/libzypp/zypp2/CMakeLists.txt (original)
+++ trunk/libzypp/zypp2/CMakeLists.txt Thu May 31 18:00:01 2007
@@ -94,17 +94,17 @@
)
SET( zypp2_repository_data_SRCS
- repo/memory/DPackageImpl.cc
- repo/memory/DPatternImpl.cc
- repo/memory/DProductImpl.cc
- repo/memory/DSrcPackageImpl.cc
+ repo/memory/PackageImpl.cc
+ repo/memory/PatternImpl.cc
+ repo/memory/ProductImpl.cc
+ repo/memory/SrcPackageImpl.cc
)
SET( zypp2_repository_data_HEADERS
- repo/memory/DPackageImpl.h
- repo/memory/DPatternImpl.h
- repo/memory/DProductImpl.h
- repo/memory/DSrcPackageImpl.h
+ repo/memory/PackageImpl.h
+ repo/memory/PatternImpl.h
+ repo/memory/ProductImpl.h
+ repo/memory/SrcPackageImpl.h
)
SET( zypp2_parser_susetags_SRCS
Modified: trunk/libzypp/zypp2/RepoInfo.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/RepoInfo.cc?rev=56…
==============================================================================
--- trunk/libzypp/zypp2/RepoInfo.cc (original)
+++ trunk/libzypp/zypp2/RepoInfo.cc Thu May 31 18:00:01 2007
@@ -37,13 +37,10 @@
boost::tribool enabled;
boost::tribool autorefresh;
std::string type;
- Url baseurl;
+ Url mirrorlist_url;
std::set<Url> urls;
- Pathname path;
std::string alias;
std::string name;
- CheckSum checksum;
- Date timestamp;
public:
/** Offer default Impl. */
@@ -104,15 +101,15 @@
return *this;
}
- RepoInfo & RepoInfo::setBaseUrl( const Url &url )
+ RepoInfo & RepoInfo::setMirrorListUrl( const Url &url )
{
- _pimpl->baseurl = url;
+ _pimpl->mirrorlist_url = url;
return *this;
}
- RepoInfo & RepoInfo::setPath( const Pathname &p )
+ RepoInfo & RepoInfo::addBaseUrl( const Url &url )
{
- _pimpl->path = p;
+ _pimpl->urls.insert(url);
return *this;
}
@@ -134,45 +131,23 @@
return *this;
}
- RepoInfo & RepoInfo::setChecksum( const CheckSum &checksum )
- {
- _pimpl->checksum = checksum;
- return *this;
- }
-
- RepoInfo & RepoInfo::setTimestamp( const Date ×tamp )
- {
- _pimpl->timestamp = timestamp;
- return *this;
- }
-
tribool RepoInfo::enabled() const
{ return _pimpl->enabled; }
tribool RepoInfo::autorefresh() const
{ return _pimpl->autorefresh; }
-
- Pathname RepoInfo::path() const
- { return _pimpl->path; }
-
std::string RepoInfo::alias() const
{ return _pimpl->alias; }
std::string RepoInfo::name() const
{ return _pimpl->name; }
- CheckSum RepoInfo::checksum() const
- { return _pimpl->checksum; }
-
- Date RepoInfo::timestamp() const
- { return _pimpl->timestamp; }
-
std::string RepoInfo::type() const
{ return _pimpl->type; }
- Url RepoInfo::baseUrl() const
- { return _pimpl->baseurl; }
+ Url RepoInfo::mirrorListUrl() const
+ { return _pimpl->mirrorlist_url; }
std::set<Url> RepoInfo::urls() const
{ return _pimpl->urls; }
@@ -187,11 +162,11 @@
{
str << "--------------------------------------" << std::endl;
str << "- alias : " << alias() << std::endl;
- str << "- url : " << baseUrl() << std::endl;
+ //str << "- url : " << baseUrl() << std::endl;
str << "- type : " << type() << std::endl;
str << "- enabled : " << enabled() << std::endl;
str << "- autorefresh : " << autorefresh() << std::endl;
- str << "- path : " << path() << std::endl;
+ //str << "- path : " << path() << std::endl;
return str;
}
Modified: trunk/libzypp/zypp2/RepoInfo.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/RepoInfo.h?rev=565…
==============================================================================
--- trunk/libzypp/zypp2/RepoInfo.h (original)
+++ trunk/libzypp/zypp2/RepoInfo.h Thu May 31 18:00:01 2007
@@ -20,8 +20,6 @@
#include <boost/logic/tribool.hpp>
#include "zypp/Pathname.h"
#include "zypp/Url.h"
-#include "zypp/CheckSum.h"
-#include "zypp/Date.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -87,15 +85,16 @@
* the base url is http://updates.novell.com/10.2
*
* This can't be empty in order the repository to be valid
+ * unless the download of the mirror list succeeds and it
+ * contains a valid url.
*/
- Url baseUrl() const;
+ std::set<Url> urls() const;
/**
- * Urls is a list of Urls where this repository
- * is located.
+ * Url of a file which contains a list of Urls
* If empty, the base url will be used.
*/
- std::set<Url> urls() const;
+ Url mirrorListUrl() const;
typedef std::set<Url>::const_iterator urls_const_iterator;
@@ -110,12 +109,6 @@
urls_const_iterator urlsEnd() const;
/**
- * Path on the url where the repository root
- * is located.
- */
- Pathname path() const;
-
- /**
* If enabled is false, then this repository must be ignored as if does
* not exists, except when checking for duplicate alias.
*/
@@ -141,27 +134,18 @@
* ie: "SUSE Linux 10.2 updates"
*/
std::string name() const;
-
- /**
- * Checksum of the repository.
- * Usually the checksum of the index, but any
- * checksum that changes when the repository changes
- * in any way is sufficient.
- */
- CheckSum checksum() const;
-
+
/**
- * timestamp of the repository. If the repository
- * changes, it has to be updated as well with the
- * new timestamp.
+ * Add a base url. \see baseUrl
+ * \param url The base url for the repository.
*/
- Date timestamp() const;
+ RepoInfo & addBaseUrl( const Url &url );
/**
- * Set the base url. \see baseUrl
- * \param url The base url for the repository.
+ * Set mirror list url. \see mirrorListUrl
+ * \param url The base url for the list
*/
- RepoInfo & setBaseUrl( const Url &url );
+ RepoInfo & setMirrorListUrl( const Url &url );
/**
* enable or disable the repository \see enabled
@@ -176,12 +160,6 @@
RepoInfo & setAutorefresh( boost::tribool autorefresh );
/**
- * set the repository path \see path
- * \param p
- */
- RepoInfo & setPath( const Pathname &p );
-
- /**
* set the repository alias \see alias
* \param alias
*/
@@ -198,19 +176,7 @@
* \param name
*/
RepoInfo & setName( const std::string &name );
-
- /**
- * set the repository checksum \see checksum
- * \param checksum
- */
- RepoInfo & setChecksum( const CheckSum &checksum );
-
- /**
- * set the repository timestamp \see timestamp
- * \param timestamp
- */
- RepoInfo & setTimestamp( const Date ×tamp );
-
+
std::ostream & dumpOn( std::ostream & str ) const;
class Impl;
Modified: trunk/libzypp/zypp2/RepoManager.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/RepoManager.cc?rev…
==============================================================================
--- trunk/libzypp/zypp2/RepoManager.cc (original)
+++ trunk/libzypp/zypp2/RepoManager.cc Thu May 31 18:00:01 2007
@@ -37,14 +37,23 @@
MIL << (*its) << endl;
RepoInfo info;
-
+ info.setAlias(*its);
+
for ( IniDict::entry_const_iterator it = dict.entriesBegin(*its);
it != dict.entriesEnd(*its);
++it )
{
MIL << (*it).first << endl;
+ if (it->first == "name" )
+ info.setName(it-> second);
+ else if ( it->first == "enabled" )
+ info.setEnabled( it->second == "1" );
+ else if ( it->first == "baseurl" )
+ info.addBaseUrl( Url(it->second) );
}
+
+ // add it to the list.
}
// dictionary *d = iniparser_new(file.c_str());
Modified: trunk/libzypp/zypp2/RepoStatus.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/RepoStatus.cc?rev=…
==============================================================================
--- trunk/libzypp/zypp2/RepoStatus.cc (original)
+++ trunk/libzypp/zypp2/RepoStatus.cc Thu May 31 18:00:01 2007
@@ -13,6 +13,7 @@
//#include "zypp/base/Logger.h"
#include "zypp2/RepoStatus.h"
+
using std::endl;
///////////////////////////////////////////////////////////////////
@@ -28,6 +29,10 @@
{
public:
+
+ CheckSum checksum;
+ Date timestamp;
+
/** Offer default Impl. */
static shared_ptr<Impl> nullimpl()
{
@@ -72,6 +77,24 @@
RepoStatus::~RepoStatus()
{}
+ RepoStatus & RepoStatus::setChecksum( const CheckSum &checksum )
+ {
+ _pimpl->checksum = checksum;
+ return *this;
+ }
+
+ RepoStatus & RepoStatus::setTimestamp( const Date ×tamp )
+ {
+ _pimpl->timestamp = timestamp;
+ return *this;
+ }
+
+ CheckSum RepoStatus::checksum() const
+ { return _pimpl->checksum; }
+
+ Date RepoStatus::timestamp() const
+ { return _pimpl->timestamp; }
+
/******************************************************************
**
** FUNCTION NAME : operator<<
Modified: trunk/libzypp/zypp2/RepoStatus.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/RepoStatus.h?rev=5…
==============================================================================
--- trunk/libzypp/zypp2/RepoStatus.h (original)
+++ trunk/libzypp/zypp2/RepoStatus.h Thu May 31 18:00:01 2007
@@ -14,6 +14,8 @@
#include <iosfwd>
#include "zypp/base/PtrTypes.h"
+#include "zypp/CheckSum.h"
+#include "zypp/Date.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -23,12 +25,48 @@
//
// CLASS NAME : RepoStatus
//
- /** */
+ /**
+ * \short Local facts about a repository
+ * This class represents the status of a
+ * repository on the system.
+ *
+ * Anything that is not provided on the metadata
+ * files, like the timestamp of the downloaded
+ * metadata, and its checksum.
+ */
class RepoStatus
{
friend std::ostream & operator<<( std::ostream & str, const RepoStatus & obj );
public:
+
+ /**
+ * Checksum of the repository.
+ * Usually the checksum of the index, but any
+ * checksum that changes when the repository changes
+ * in any way is sufficient.
+ */
+ CheckSum checksum() const;
+
+ /**
+ * timestamp of the repository. If the repository
+ * changes, it has to be updated as well with the
+ * new timestamp.
+ */
+ Date timestamp() const;
+
+ /**
+ * set the repository checksum \see checksum
+ * \param checksum
+ */
+ RepoStatus & setChecksum( const CheckSum &checksum );
+
+ /**
+ * set the repository timestamp \see timestamp
+ * \param timestamp
+ */
+ RepoStatus & setTimestamp( const Date ×tamp );
+
/** Implementation */
class Impl;
Copied: trunk/libzypp/zypp2/repo/memory/PackageImpl.cc (from r5651, trunk/libzypp/zypp2/repo/memory/DPackageImpl.cc)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/memory/Packag…
==============================================================================
--- trunk/libzypp/zypp2/repo/memory/DPackageImpl.cc (original)
+++ trunk/libzypp/zypp2/repo/memory/PackageImpl.cc Thu May 31 18:00:01 2007
@@ -10,7 +10,7 @@
*
*/
-#include "zypp2/repo/memory/DPackageImpl.h"
+#include "zypp2/repo/memory/PackageImpl.h"
using namespace std;
Copied: trunk/libzypp/zypp2/repo/memory/PatternImpl.cc (from r5651, trunk/libzypp/zypp2/repo/memory/DPatternImpl.cc)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/memory/Patter…
==============================================================================
--- trunk/libzypp/zypp2/repo/memory/DPatternImpl.cc (original)
+++ trunk/libzypp/zypp2/repo/memory/PatternImpl.cc Thu May 31 18:00:01 2007
@@ -9,7 +9,7 @@
/** \file zypp2/repository/memory/PatternImpl.cc
*
*/
-#include "zypp2/repo/memory/DPatternImpl.h"
+#include "zypp2/repo/memory/PatternImpl.h"
using namespace std;
Copied: trunk/libzypp/zypp2/repo/memory/ProductImpl.cc (from r5651, trunk/libzypp/zypp2/repo/memory/DProductImpl.cc)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/memory/Produc…
==============================================================================
--- trunk/libzypp/zypp2/repo/memory/DProductImpl.cc (original)
+++ trunk/libzypp/zypp2/repo/memory/ProductImpl.cc Thu May 31 18:00:01 2007
@@ -9,7 +9,7 @@
/** \file zypp2/repo/memory/ProductImpl.cc
*
*/
-#include "zypp2/repo/memory/DProductImpl.h"
+#include "zypp2/repo/memory/ProductImpl.h"
using namespace std;
Copied: trunk/libzypp/zypp2/repo/memory/SrcPackageImpl.cc (from r5651, trunk/libzypp/zypp2/repo/memory/DSrcPackageImpl.cc)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/memory/SrcPac…
==============================================================================
--- trunk/libzypp/zypp2/repo/memory/DSrcPackageImpl.cc (original)
+++ trunk/libzypp/zypp2/repo/memory/SrcPackageImpl.cc Thu May 31 18:00:01 2007
@@ -9,7 +9,7 @@
/** \file zypp2/repo/memory/SrcPackageImpl.cc
*
*/
-#include "zypp2/repo/memory/DSrcPackageImpl.h"
+#include "zypp2/repo/memory/SrcPackageImpl.h"
using namespace std;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r5653 - /trunk/libzypp/tests/cache/CacheQuery_test.cc
by dmacvicar@svn.opensuse.org 31 May '07
by dmacvicar@svn.opensuse.org 31 May '07
31 May '07
Author: dmacvicar
Date: Thu May 31 14:55:23 2007
New Revision: 5653
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5653&view=rev
Log:
fix testcases path with repository -> repo
Modified:
trunk/libzypp/tests/cache/CacheQuery_test.cc
Modified: trunk/libzypp/tests/cache/CacheQuery_test.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/cache/CacheQuery_t…
==============================================================================
--- trunk/libzypp/tests/cache/CacheQuery_test.cc (original)
+++ trunk/libzypp/tests/cache/CacheQuery_test.cc Thu May 31 14:55:23 2007
@@ -60,7 +60,7 @@
if (argc < 2)
{
datadir = TESTS_SRC_DIR;
- datadir = (Pathname(datadir) + "/repository/yum/data/10.2-updates-subset").asString();
+ datadir = (Pathname(datadir) + "/repo/yum/data/10.2-updates-subset").asString();
cout << "CacheStore_test:"
" path to directory with test data required as parameter. Using " << datadir << endl;
//return (test_suite *)0;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r5652 - in /trunk/libzypp/tests: CMakeLists.txt cache/CacheStore_test.cc repo/ repo/yum/YUMDownloader_test.cc repository/
by dmacvicar@svn.opensuse.org 31 May '07
by dmacvicar@svn.opensuse.org 31 May '07
31 May '07
Author: dmacvicar
Date: Thu May 31 14:50:31 2007
New Revision: 5652
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5652&view=rev
Log:
fix testcases path with repository -> repo
Added:
trunk/libzypp/tests/repo/
- copied from r5650, trunk/libzypp/tests/repository/
Removed:
trunk/libzypp/tests/repository/
Modified:
trunk/libzypp/tests/CMakeLists.txt
trunk/libzypp/tests/cache/CacheStore_test.cc
trunk/libzypp/tests/repo/yum/YUMDownloader_test.cc
Modified: trunk/libzypp/tests/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/CMakeLists.txt?rev…
==============================================================================
--- trunk/libzypp/tests/CMakeLists.txt (original)
+++ trunk/libzypp/tests/CMakeLists.txt Thu May 31 14:50:31 2007
@@ -6,4 +6,4 @@
#ADD_SUBDIRECTORY( media )
ADD_SUBDIRECTORY( zypp )
ADD_SUBDIRECTORY( parser )
-ADD_SUBDIRECTORY( repository )
+ADD_SUBDIRECTORY( repo )
Modified: trunk/libzypp/tests/cache/CacheStore_test.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/cache/CacheStore_t…
==============================================================================
--- trunk/libzypp/tests/cache/CacheStore_test.cc (original)
+++ trunk/libzypp/tests/cache/CacheStore_test.cc Thu May 31 14:50:31 2007
@@ -14,7 +14,7 @@
#include "zypp/capability/CapabilityImpl.h"
#include "zypp/data/ResolvableData.h"
#include "zypp2/cache/CacheStore.h"
-#include "zypp2/repository/cached/RepoImpl.h"
+#include "zypp2/repo/cached/RepoImpl.h"
#include "zypp/Url.h"
#include "zypp/NVRA.h"
#include "zypp/PathInfo.h"
@@ -24,8 +24,8 @@
using namespace std;
using namespace zypp;
-using namespace zypp::repository;
-using namespace zypp::repository::cached;
+using namespace zypp::repo;
+using namespace zypp::repo::cached;
using namespace boost::unit_test;
void cache_write_test(const string &dir)
Modified: trunk/libzypp/tests/repo/yum/YUMDownloader_test.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/repo/yum/YUMDownlo…
==============================================================================
--- trunk/libzypp/tests/repo/yum/YUMDownloader_test.cc (original)
+++ trunk/libzypp/tests/repo/yum/YUMDownloader_test.cc Thu May 31 14:50:31 2007
@@ -66,7 +66,7 @@
if (argc < 2)
{
datadir = TESTS_SRC_DIR;
- datadir = (Pathname(datadir) + "/repository/yum/data").asString();
+ datadir = (Pathname(datadir) + "/repo/yum/data").asString();
cout << "YUMDownloader_test:"
" path to directory with test data required as parameter. Using " << datadir << endl;
//return (test_suite *)0;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r5651 - in /trunk/libzypp/zypp2: ./ repo/ repo/cached/ repo/memory/ repository/
by dmacvicar@svn.opensuse.org 31 May '07
by dmacvicar@svn.opensuse.org 31 May '07
31 May '07
Author: dmacvicar
Date: Thu May 31 14:44:12 2007
New Revision: 5651
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5651&view=rev
Log:
- rename too long name classes:
- dont be reundant, with namespaces and class names
ej: zypp::repository::cached::CachedRepositoryPackageImpl
can be zypp::repo::cached::PackageImpl
- Add RepoStatus, which contains non-hint data
like timestamps and checksum of indexes.
Added:
trunk/libzypp/zypp2/RepoInfo.cc
- copied, changed from r5649, trunk/libzypp/zypp2/RepositoryInfo.cc
trunk/libzypp/zypp2/RepoInfo.h
- copied, changed from r5649, trunk/libzypp/zypp2/RepositoryInfo.h
trunk/libzypp/zypp2/RepoManager.cc
- copied, changed from r5650, trunk/libzypp/zypp2/RepositoryManager.cc
trunk/libzypp/zypp2/RepoManager.h
- copied, changed from r5650, trunk/libzypp/zypp2/RepositoryManager.h
trunk/libzypp/zypp2/RepoStatus.cc
trunk/libzypp/zypp2/RepoStatus.h
trunk/libzypp/zypp2/repo/
- copied from r5650, trunk/libzypp/zypp2/repository/
Removed:
trunk/libzypp/zypp2/CommiterIface.h
trunk/libzypp/zypp2/RepositoryInfo.cc
trunk/libzypp/zypp2/RepositoryInfo.h
trunk/libzypp/zypp2/RepositoryManager.cc
trunk/libzypp/zypp2/RepositoryManager.h
trunk/libzypp/zypp2/repository/
Modified:
trunk/libzypp/zypp2/CMakeLists.txt
trunk/libzypp/zypp2/Repository.cc
trunk/libzypp/zypp2/Repository.h
trunk/libzypp/zypp2/RepositoryFactory.cc
trunk/libzypp/zypp2/RepositoryFactory.h
trunk/libzypp/zypp2/repo/RepositoryImpl.cc
trunk/libzypp/zypp2/repo/RepositoryImpl.h
trunk/libzypp/zypp2/repo/cached/PackageImpl.cc
trunk/libzypp/zypp2/repo/cached/PackageImpl.h
trunk/libzypp/zypp2/repo/cached/RepoImpl.cc
trunk/libzypp/zypp2/repo/cached/RepoImpl.h
trunk/libzypp/zypp2/repo/cached/SrcPackageImpl.cc
trunk/libzypp/zypp2/repo/cached/SrcPackageImpl.h
trunk/libzypp/zypp2/repo/memory/DPackageImpl.cc
trunk/libzypp/zypp2/repo/memory/DPackageImpl.h
trunk/libzypp/zypp2/repo/memory/DPatternImpl.cc
trunk/libzypp/zypp2/repo/memory/DPatternImpl.h
trunk/libzypp/zypp2/repo/memory/DProductImpl.cc
trunk/libzypp/zypp2/repo/memory/DProductImpl.h
trunk/libzypp/zypp2/repo/memory/DSrcPackageImpl.cc
trunk/libzypp/zypp2/repo/memory/DSrcPackageImpl.h
Modified: trunk/libzypp/zypp2/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/CMakeLists.txt?rev…
==============================================================================
--- trunk/libzypp/zypp2/CMakeLists.txt (original)
+++ trunk/libzypp/zypp2/CMakeLists.txt Thu May 31 14:44:12 2007
@@ -12,18 +12,19 @@
SET( zypp2_SRCS
Repository.cc
- RepositoryInfo.cc
- RepositoryManager.cc
+ RepoInfo.cc
+ RepoStatus.cc
+ RepoManager.cc
RepositoryFactory.cc
dummy.cc
)
SET( zypp2_HEADERS
Repository.h
- RepositoryInfo.h
- RepositoryManager.h
+ RepoInfo.h
+ RepoStatus.h
+ RepoManager.h
RepositoryFactory.h
- CommiterIface.h
)
#INSTALL( FILES ${zypp2_HEADERS}
@@ -73,37 +74,37 @@
#)
SET( zypp2_repository_SRCS
- repository/dummy.cc
- repository/RepositoryImpl.cc
+ repo/dummy.cc
+ repo/RepositoryImpl.cc
)
SET( zypp2_repository_HEADERS
- repository/dummy.h
- repository/RepositoryImpl.h
+ repo/dummy.h
+ repo/RepositoryImpl.h
)
SET( zypp2_repository_cached_SRCS
- repository/cached/RepoImpl.cc
- repository/cached/PackageImpl.cc
+ repo/cached/RepoImpl.cc
+ repo/cached/PackageImpl.cc
)
SET( zypp2_repository_cached_HEADERS
- repository/cached/RepoImpl.h
- repository/cached/PackageImpl.h
+ repo/cached/RepoImpl.h
+ repo/cached/PackageImpl.h
)
SET( zypp2_repository_data_SRCS
- repository/memory/DPackageImpl.cc
- repository/memory/DPatternImpl.cc
- repository/memory/DProductImpl.cc
- repository/memory/DSrcPackageImpl.cc
+ repo/memory/DPackageImpl.cc
+ repo/memory/DPatternImpl.cc
+ repo/memory/DProductImpl.cc
+ repo/memory/DSrcPackageImpl.cc
)
SET( zypp2_repository_data_HEADERS
- repository/memory/DPackageImpl.h
- repository/memory/DPatternImpl.h
- repository/memory/DProductImpl.h
- repository/memory/DSrcPackageImpl.h
+ repo/memory/DPackageImpl.h
+ repo/memory/DPatternImpl.h
+ repo/memory/DProductImpl.h
+ repo/memory/DSrcPackageImpl.h
)
SET( zypp2_parser_susetags_SRCS
Copied: trunk/libzypp/zypp2/RepoInfo.cc (from r5649, trunk/libzypp/zypp2/RepositoryInfo.cc)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/RepoInfo.cc?p2=tru…
==============================================================================
--- trunk/libzypp/zypp2/RepositoryInfo.cc (original)
+++ trunk/libzypp/zypp2/RepoInfo.cc Thu May 31 14:44:12 2007
@@ -6,132 +6,184 @@
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
-/** \file zypp/repository/RepositoryInfo.cc
+/** \file zypp/RepoInfo.cc
*
*/
-
-#include <string>
#include <iostream>
-#include "zypp2/RepositoryInfo.h"
+#include "zypp/base/Logger.h"
+
+#include "zypp2/RepoInfo.h"
+using namespace std;
using namespace boost;
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- RepositoryInfo::RepositoryInfo()
- : _enabled (indeterminate)
- , _autorefresh(indeterminate)
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : RepoInfo::Impl
+ //
+ /** RepoInfo implementation. */
+ struct RepoInfo::Impl
{
+
+ Impl()
+ : enabled (indeterminate),
+ autorefresh(indeterminate)
+ {}
+ public:
+ boost::tribool enabled;
+ boost::tribool autorefresh;
+ std::string type;
+ Url baseurl;
+ std::set<Url> urls;
+ Pathname path;
+ std::string alias;
+ std::string name;
+ CheckSum checksum;
+ Date timestamp;
+
+ public:
+ /** Offer default Impl. */
+ static shared_ptr<Impl> nullimpl()
+ {
+ static shared_ptr<Impl> _nullimpl( new Impl );
+ return _nullimpl;
+ }
+
+ private:
+ friend Impl * rwcowClone<Impl>( const Impl * rhs );
+ /** clone for RWCOW_pointer */
+ Impl * clone() const
+ { return new Impl( *this ); }
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /** \relates RepoInfo::Impl Stream output */
+ inline std::ostream & operator<<( std::ostream & str, const RepoInfo::Impl & obj )
+ {
+ return str << "RepoInfo::Impl";
+ }
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : RepoInfo
+ //
+ ///////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : RepoInfo::RepoInfo
+ // METHOD TYPE : Ctor
+ //
+ RepoInfo::RepoInfo()
+ : _pimpl( Impl::nullimpl() )
+ {}
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : RepoInfo::~RepoInfo
+ // METHOD TYPE : Dtor
+ //
+ RepoInfo::~RepoInfo()
+ {}
- }
-
- RepositoryInfo::RepositoryInfo( const Url & url,
- const Pathname & path,
- const std::string & alias,
- tribool autorefresh)
- : _enabled (true),
- _autorefresh(autorefresh),
- _baseurl(url),
- _path(path),
- _alias(alias)
- {
-
- }
-
- RepositoryInfo & RepositoryInfo::setEnabled( boost::tribool enabled )
+
+
+ RepoInfo & RepoInfo::setEnabled( boost::tribool enabled )
{
- _enabled = enabled;
+ _pimpl->enabled = enabled;
return *this;
}
- RepositoryInfo & RepositoryInfo::setAutorefresh( boost::tribool autorefresh )
+ RepoInfo & RepoInfo::setAutorefresh( boost::tribool autorefresh )
{
- _autorefresh = autorefresh;
+ _pimpl->autorefresh = autorefresh;
return *this;
}
- RepositoryInfo & RepositoryInfo::setBaseUrl( const Url &url )
+ RepoInfo & RepoInfo::setBaseUrl( const Url &url )
{
- _baseurl = url;
+ _pimpl->baseurl = url;
return *this;
}
- RepositoryInfo & RepositoryInfo::setPath( const Pathname &p )
+ RepoInfo & RepoInfo::setPath( const Pathname &p )
{
- _path = p;
+ _pimpl->path = p;
return *this;
}
- RepositoryInfo & RepositoryInfo::setAlias( const std::string &alias )
+ RepoInfo & RepoInfo::setAlias( const std::string &alias )
{
- _alias = alias;
+ _pimpl->alias = alias;
return *this;
}
- RepositoryInfo & RepositoryInfo::setType( const std::string &t )
+ RepoInfo & RepoInfo::setType( const std::string &t )
{
- _type = t;
+ _pimpl->type = t;
return *this;
}
- RepositoryInfo & RepositoryInfo::setDescription( const std::string &description )
+ RepoInfo & RepoInfo::setName( const std::string &name )
{
- _description = description;
+ _pimpl->name = name;
return *this;
}
- RepositoryInfo & RepositoryInfo::setChecksum( const CheckSum &checksum )
+ RepoInfo & RepoInfo::setChecksum( const CheckSum &checksum )
{
- _checksum = checksum;
+ _pimpl->checksum = checksum;
return *this;
}
- RepositoryInfo & RepositoryInfo::setTimestamp( const Date ×tamp )
+ RepoInfo & RepoInfo::setTimestamp( const Date ×tamp )
{
- _timestamp = timestamp;
+ _pimpl->timestamp = timestamp;
return *this;
}
- tribool RepositoryInfo::enabled() const
- { return _enabled; }
+ tribool RepoInfo::enabled() const
+ { return _pimpl->enabled; }
- tribool RepositoryInfo::autorefresh() const
- { return _autorefresh; }
+ tribool RepoInfo::autorefresh() const
+ { return _pimpl->autorefresh; }
- Pathname RepositoryInfo::path() const
- { return _path; }
+ Pathname RepoInfo::path() const
+ { return _pimpl->path; }
- std::string RepositoryInfo::alias() const
- { return _alias; }
+ std::string RepoInfo::alias() const
+ { return _pimpl->alias; }
- std::string RepositoryInfo::description() const
- { return _description; }
+ std::string RepoInfo::name() const
+ { return _pimpl->name; }
- CheckSum RepositoryInfo::checksum() const
- { return _checksum; }
+ CheckSum RepoInfo::checksum() const
+ { return _pimpl->checksum; }
- Date RepositoryInfo::timestamp() const
- { return _timestamp; }
+ Date RepoInfo::timestamp() const
+ { return _pimpl->timestamp; }
- std::string RepositoryInfo::type() const
- { return _type; }
+ std::string RepoInfo::type() const
+ { return _pimpl->type; }
- Url RepositoryInfo::baseUrl() const
- { return _baseurl; }
+ Url RepoInfo::baseUrl() const
+ { return _pimpl->baseurl; }
- std::set<Url> RepositoryInfo::urls() const
- { return _urls; }
+ std::set<Url> RepoInfo::urls() const
+ { return _pimpl->urls; }
- RepositoryInfo::urls_const_iterator RepositoryInfo::urlsBegin() const
- { return _urls.begin(); }
+ RepoInfo::urls_const_iterator RepoInfo::urlsBegin() const
+ { return _pimpl->urls.begin(); }
- RepositoryInfo::urls_const_iterator RepositoryInfo::urlsEnd() const
- { return _urls.end(); }
+ RepoInfo::urls_const_iterator RepoInfo::urlsEnd() const
+ { return _pimpl->urls.end(); }
- std::ostream & RepositoryInfo::dumpOn( std::ostream & str ) const
+ std::ostream & RepoInfo::dumpOn( std::ostream & str ) const
{
str << "--------------------------------------" << std::endl;
str << "- alias : " << alias() << std::endl;
@@ -142,8 +194,7 @@
str << "- path : " << path() << std::endl;
return str;
}
-
+
/////////////////////////////////////////////////////////////////
-} // namespace zypp
+} // namespace zypp2
///////////////////////////////////////////////////////////////////
-
Copied: trunk/libzypp/zypp2/RepoInfo.h (from r5649, trunk/libzypp/zypp2/RepositoryInfo.h)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/RepoInfo.h?p2=trun…
==============================================================================
--- trunk/libzypp/zypp2/RepositoryInfo.h (original)
+++ trunk/libzypp/zypp2/RepoInfo.h Thu May 31 14:44:12 2007
@@ -6,12 +6,17 @@
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
+/** \file zypp2/RepoInfo.h
+ *
+*/
+#ifndef ZYPP2_REPOSITORYINFO_H
+#define ZYPP2_REPOSITORYINFO_H
-#ifndef ZYPP_RepositoryInfo_H
-#define ZYPP_RepositoryInfo_H
-
+#include <iosfwd>
#include <list>
#include <set>
+#include "zypp/base/PtrTypes.h"
+
#include <boost/logic/tribool.hpp>
#include "zypp/Pathname.h"
#include "zypp/Url.h"
@@ -22,21 +27,53 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : RepoInfo
+ //
/**
- * The class RepositoryInfo represents everything that
+ * \short What is known about a repository
+ *
+ * The class RepoInfo represents everything that
* is known about a software repository.
+ *
+ * It can be used to store information about known
+ * sources.
+ *
+ * This class tries to be compatible with the
+ * concept of a .repo file used by YUM and
+ * also available in the openSUSE build service.
+ *
+ * Example file
+ *
+ * \code
+ * [ruby]
+ * name=Ruby repository (openSUSE_10.2)
+ * type=rpm-md
+ * baseurl=http://software.opensuse.org/download/ruby/openSUSE_10.2/
+ * gpgcheck=1
+ * gpgkey=http://software.opensuse.org/openSUSE-Build-Service.asc
+ * enabled=1
+ * \endcode
+ *
+ * \note A Repository info is a hint about how
+ * to create a repository.
*/
- class RepositoryInfo
+ class RepoInfo
{
+ friend std::ostream & operator<<( std::ostream & str, const RepoInfo & obj );
+
public:
-
- RepositoryInfo();
-
- RepositoryInfo( const Url & url, const Pathname & path, const std::string & alias = "", boost::tribool autorefresh = boost::indeterminate );
+ RepoInfo();
+ ~RepoInfo();
+ //RepoInfo( const Url & url, const Pathname & path, const std::string & alias = "", boost::tribool autorefresh = boost::indeterminate );
/**
* unique identifier for this source. If not specified
* It should be generated from the base url.
+ *
+ * Normally, in a .repo file the section name is used
+ * ( [somerepo] )
*/
std::string alias() const;
@@ -97,10 +134,13 @@
std::string type() const;
/**
- * Description of the repository, to be used on
+ * \short Repository short label
+ *
+ * Short label or description of the repository, to be used on
* the user interface.
+ * ie: "SUSE Linux 10.2 updates"
*/
- std::string description() const;
+ std::string name() const;
/**
* Checksum of the repository.
@@ -121,81 +161,71 @@
* Set the base url. \see baseUrl
* \param url The base url for the repository.
*/
- RepositoryInfo & setBaseUrl( const Url &url );
+ RepoInfo & setBaseUrl( const Url &url );
/**
* enable or disable the repository \see enabled
* \param enabled
*/
- RepositoryInfo & setEnabled( boost::tribool enabled );
+ RepoInfo & setEnabled( boost::tribool enabled );
/**
* enable or disable autorefresh \see autorefresh
* \param enabled
*/
- RepositoryInfo & setAutorefresh( boost::tribool autorefresh );
+ RepoInfo & setAutorefresh( boost::tribool autorefresh );
/**
* set the repository path \see path
* \param p
*/
- RepositoryInfo & setPath( const Pathname &p );
+ RepoInfo & setPath( const Pathname &p );
/**
* set the repository alias \see alias
* \param alias
*/
- RepositoryInfo & setAlias( const std::string &alias );
+ RepoInfo & setAlias( const std::string &alias );
/**
* set the repository type \see type
* \param t
*/
- RepositoryInfo & setType( const std::string &t );
+ RepoInfo & setType( const std::string &t );
/**
- * set the repository description \see description
- * \param description
+ * set the repository name \see name
+ * \param name
*/
- RepositoryInfo & setDescription( const std::string &description );
+ RepoInfo & setName( const std::string &name );
/**
* set the repository checksum \see checksum
* \param checksum
*/
- RepositoryInfo & setChecksum( const CheckSum &checksum );
+ RepoInfo & setChecksum( const CheckSum &checksum );
/**
* set the repository timestamp \see timestamp
* \param timestamp
*/
- RepositoryInfo & setTimestamp( const Date ×tamp );
+ RepoInfo & setTimestamp( const Date ×tamp );
- /** Overload to realize stream output. */
std::ostream & dumpOn( std::ostream & str ) const;
- private:
-
- boost::tribool _enabled;
- boost::tribool _autorefresh;
- std::string _type;
- Url _baseurl;
- std::set<Url> _urls;
- Pathname _path;
- std::string _alias;
- std::string _description;
- CheckSum _checksum;
- Date _timestamp;
+ class Impl;
+ private:
+ /** Pointer to implementation */
+ RWCOW_pointer<Impl> _pimpl;
};
+ ///////////////////////////////////////////////////////////////////
- /** \relates RepositoryInfo Stream output */
- inline std::ostream & operator<<( std::ostream & str, const RepositoryInfo & obj )
- { return obj.dumpOn( str ); }
-
- typedef std::list<RepositoryInfo> RepositoryInfoList;
+ /** \relates RepoInfo Stream output */
+ std::ostream & operator<<( std::ostream & str, const RepoInfo & obj );
-} // namespace zypp
+ typedef std::list<RepoInfo> RepoInfoList;
+
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp2
///////////////////////////////////////////////////////////////////
-#endif // ZYPP_RepositoryInfo_H
-
-
+#endif // ZYPP2_REPOSITORYINFO_H
Copied: trunk/libzypp/zypp2/RepoManager.cc (from r5650, trunk/libzypp/zypp2/RepositoryManager.cc)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/RepoManager.cc?p2=…
==============================================================================
--- trunk/libzypp/zypp2/RepositoryManager.cc (original)
+++ trunk/libzypp/zypp2/RepoManager.cc Thu May 31 14:44:12 2007
@@ -4,26 +4,49 @@
#include <list>
#include <algorithm>
#include "zypp/base/Exception.h"
+#include "zypp/base/InputStream.h"
#include "zypp/base/Logger.h"
#include "zypp/PathInfo.h"
#include "zypp/parser/IniDict.h"
-#include "zypp2/RepositoryManager.h"
+#include "zypp2/RepoManager.h"
using namespace std;
using namespace zypp;
using namespace zypp::filesystem;
+using parser::IniDict;
namespace zypp {
-RepositoryManager::RepositoryManager()
+RepoManager::RepoManager()
{
}
-static std::list<RepositoryInfo> repositories_in_file( const Pathname &file )
+static std::list<RepoInfo> repositories_in_file( const Pathname &file )
{
+ InputStream is(file);
+ IniDict dict(is);
+ std::list<RepoInfo> repos;
+
+ for ( IniDict::section_const_iterator its = dict.sectionsBegin();
+ its != dict.sectionsEnd();
+ ++its )
+ {
+ MIL << (*its) << endl;
+
+ RepoInfo info;
+
+ for ( IniDict::entry_const_iterator it = dict.entriesBegin(*its);
+ it != dict.entriesEnd(*its);
+ ++it )
+ {
+
+ MIL << (*it).first << endl;
+ }
+ }
+
// dictionary *d = iniparser_new(file.c_str());
//
// if ( d == NULL )
@@ -37,12 +60,12 @@
// MIL << iniparser_getsecname(d, i) << endl;
//
// }
- return std::list<RepositoryInfo>();
+ return std::list<RepoInfo>();
}
-static std::list<RepositoryInfo> repositories_in_path( const Pathname &dir )
+static std::list<RepoInfo> repositories_in_path( const Pathname &dir )
{
- std::list<RepositoryInfo> repos;
+ std::list<RepoInfo> repos;
list<Pathname> entries;
if ( filesystem::readdir( entries, Pathname(dir), false ) != 0 )
ZYPP_THROW(Exception("failed to read directory"));
@@ -50,17 +73,17 @@
for ( list<Pathname>::const_iterator it = entries.begin(); it != entries.end(); ++it )
{
Pathname file = *it;
- std::list<RepositoryInfo> repos_here = repositories_in_file(file);
+ std::list<RepoInfo> repos_here = repositories_in_file(file);
std::copy( repos_here.begin(), repos_here.end(), std::back_inserter(repos));
}
return repos;
}
-std::list<RepositoryInfo> RepositoryManager::knownRepositories()
+std::list<RepoInfo> RepoManager::knownRepositories()
{
- return std::list<RepositoryInfo>();
+ return std::list<RepoInfo>();
}
} // ns zypp
Copied: trunk/libzypp/zypp2/RepoManager.h (from r5650, trunk/libzypp/zypp2/RepositoryManager.h)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/RepoManager.h?p2=t…
==============================================================================
--- trunk/libzypp/zypp2/RepositoryManager.h (original)
+++ trunk/libzypp/zypp2/RepoManager.h Thu May 31 14:44:12 2007
@@ -7,17 +7,17 @@
#include "zypp/base/NonCopyable.h"
#include "zypp/Pathname.h"
-#include "zypp2/RepositoryInfo.h"
+#include "zypp2/RepoInfo.h"
namespace zypp
{
- class RepositoryManager : public base::ReferenceCounted, private base::NonCopyable
+ class RepoManager : public base::ReferenceCounted, private base::NonCopyable
{
- friend std::ostream & operator<<( std::ostream & str, const RepositoryManager & obj );
+ friend std::ostream & operator<<( std::ostream & str, const RepoManager & obj );
public:
- RepositoryManager();
- std::list<RepositoryInfo> knownRepositories();
+ RepoManager();
+ std::list<RepoInfo> knownRepositories();
};
Added: trunk/libzypp/zypp2/RepoStatus.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/RepoStatus.cc?rev=…
==============================================================================
--- trunk/libzypp/zypp2/RepoStatus.cc (added)
+++ trunk/libzypp/zypp2/RepoStatus.cc Thu May 31 14:44:12 2007
@@ -0,0 +1,87 @@
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp2/RepoStatus.cc
+ *
+*/
+#include <iostream>
+//#include "zypp/base/Logger.h"
+#include "zypp2/RepoStatus.h"
+
+using std::endl;
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : RepoStatus::Impl
+ //
+ /** RepoStatus implementation. */
+ struct RepoStatus::Impl
+ {
+
+ public:
+ /** Offer default Impl. */
+ static shared_ptr<Impl> nullimpl()
+ {
+ static shared_ptr<Impl> _nullimpl( new Impl );
+ return _nullimpl;
+ }
+
+ private:
+ friend Impl * rwcowClone<Impl>( const Impl * rhs );
+ /** clone for RWCOW_pointer */
+ Impl * clone() const
+ { return new Impl( *this ); }
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /** \relates RepoStatus::Impl Stream output */
+ inline std::ostream & operator<<( std::ostream & str, const RepoStatus::Impl & obj )
+ {
+ return str << "RepoStatus::Impl";
+ }
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : RepoStatus
+ //
+ ///////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : RepoStatus::RepoStatus
+ // METHOD TYPE : Ctor
+ //
+ RepoStatus::RepoStatus()
+ : _pimpl( Impl::nullimpl() )
+ {}
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : RepoStatus::~RepoStatus
+ // METHOD TYPE : Dtor
+ //
+ RepoStatus::~RepoStatus()
+ {}
+
+ /******************************************************************
+ **
+ ** FUNCTION NAME : operator<<
+ ** FUNCTION TYPE : std::ostream &
+ */
+ std::ostream & operator<<( std::ostream & str, const RepoStatus & obj )
+ {
+ return str << *obj._pimpl;
+ }
+
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp2
+///////////////////////////////////////////////////////////////////
Added: trunk/libzypp/zypp2/RepoStatus.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/RepoStatus.h?rev=5…
==============================================================================
--- trunk/libzypp/zypp2/RepoStatus.h (added)
+++ trunk/libzypp/zypp2/RepoStatus.h Thu May 31 14:44:12 2007
@@ -0,0 +1,55 @@
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/RepoStatus.h
+ *
+*/
+#ifndef ZYPP2_REPOSTATUS_H
+#define ZYPP2_REPOSTATUS_H
+
+#include <iosfwd>
+#include "zypp/base/PtrTypes.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : RepoStatus
+ //
+ /** */
+ class RepoStatus
+ {
+ friend std::ostream & operator<<( std::ostream & str, const RepoStatus & obj );
+
+ public:
+ /** Implementation */
+ class Impl;
+
+ public:
+ /** Default ctor */
+ RepoStatus();
+ /** Dtor */
+ ~RepoStatus();
+
+ public:
+
+ private:
+ /** Pointer to implementation */
+ RWCOW_pointer<Impl> _pimpl;
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /** \relates RepoStatus Stream output */
+ std::ostream & operator<<( std::ostream & str, const RepoStatus & obj );
+
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp2
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP2_REPOSTATUS_H
Modified: trunk/libzypp/zypp2/Repository.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/Repository.cc?rev=…
==============================================================================
--- trunk/libzypp/zypp2/Repository.cc (original)
+++ trunk/libzypp/zypp2/Repository.cc Thu May 31 14:44:12 2007
@@ -2,7 +2,7 @@
#include <iostream>
#include "zypp2/Repository.h"
-#include "zypp2/repository/RepositoryImpl.h"
+#include "zypp2/repo/RepositoryImpl.h"
using namespace std;
Modified: trunk/libzypp/zypp2/Repository.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/Repository.h?rev=5…
==============================================================================
--- trunk/libzypp/zypp2/Repository.h (original)
+++ trunk/libzypp/zypp2/Repository.h Thu May 31 14:44:12 2007
@@ -10,7 +10,7 @@
namespace zypp
{
- namespace repository
+ namespace repo
{
DEFINE_PTR_TYPE(RepositoryImpl);
class RepositoryImpl;
@@ -24,8 +24,8 @@
friend bool operator<( const Repository & lhs, const Repository & rhs );
public:
- typedef repository::RepositoryImpl Impl;
- typedef repository::RepositoryImpl_Ptr Impl_Ptr;
+ typedef repo::RepositoryImpl Impl;
+ typedef repo::RepositoryImpl_Ptr Impl_Ptr;
public:
@@ -58,7 +58,7 @@
private:
/** Factory */
friend class RepositoryFactory;
- friend class repository::RepositoryImpl;
+ friend class repo::RepositoryImpl;
private:
/** Factory ctor */
Modified: trunk/libzypp/zypp2/RepositoryFactory.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/RepositoryFactory.…
==============================================================================
--- trunk/libzypp/zypp2/RepositoryFactory.cc (original)
+++ trunk/libzypp/zypp2/RepositoryFactory.cc Thu May 31 14:44:12 2007
@@ -13,7 +13,7 @@
}
-Repository RepositoryFactory::createFrom( const RepositoryInfo & context )
+Repository RepositoryFactory::createFrom( const RepoInfo & context )
{
}
Modified: trunk/libzypp/zypp2/RepositoryFactory.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/RepositoryFactory.…
==============================================================================
--- trunk/libzypp/zypp2/RepositoryFactory.h (original)
+++ trunk/libzypp/zypp2/RepositoryFactory.h Thu May 31 14:44:12 2007
@@ -3,7 +3,7 @@
#define ZYPP_REPOSITORY_FACTORY_H
#include "zypp2/Repository.h"
-#include "zypp2/RepositoryInfo.h"
+#include "zypp2/RepoInfo.h"
namespace zypp
{
@@ -21,7 +21,7 @@
/** Construct source.
* \throw EXCEPTION on fail
*/
- Repository createFrom( const RepositoryInfo & context );
+ Repository createFrom( const RepoInfo & context );
};
}
Modified: trunk/libzypp/zypp2/repo/RepositoryImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/RepositoryImp…
==============================================================================
--- trunk/libzypp/zypp2/repo/RepositoryImpl.cc (original)
+++ trunk/libzypp/zypp2/repo/RepositoryImpl.cc Thu May 31 14:44:12 2007
@@ -1,7 +1,7 @@
-#include "zypp2/repository/RepositoryImpl.h"
+#include "zypp2/repo/RepositoryImpl.h"
-namespace zypp { namespace repository {
+namespace zypp { namespace repo {
IMPL_PTR_TYPE(RepositoryImpl)
Modified: trunk/libzypp/zypp2/repo/RepositoryImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/RepositoryImp…
==============================================================================
--- trunk/libzypp/zypp2/repo/RepositoryImpl.h (original)
+++ trunk/libzypp/zypp2/repo/RepositoryImpl.h Thu May 31 14:44:12 2007
@@ -1,7 +1,5 @@
-
-
#ifndef ZYPP_REPOSITORY_IMPL_h
#define ZYPP_REPOSITORY_IMPL_h
@@ -17,7 +15,7 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
- namespace repository
+ namespace repo
{ /////////////////////////////////////////////////////////////////
DEFINE_PTR_TYPE(RepositoryImpl);
Modified: trunk/libzypp/zypp2/repo/cached/PackageImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/cached/Packag…
==============================================================================
--- trunk/libzypp/zypp2/repo/cached/PackageImpl.cc (original)
+++ trunk/libzypp/zypp2/repo/cached/PackageImpl.cc Thu May 31 14:44:12 2007
@@ -13,16 +13,16 @@
#include "zypp/TranslatedText.h"
#include "zypp/base/String.h"
#include "zypp/base/Logger.h"
-#include "zypp2/repository/RepositoryImpl.h"
+#include "zypp2/repo/RepositoryImpl.h"
#include "PackageImpl.h"
using namespace std;
using namespace zypp::detail;
-using namespace::zypp::repository;
+using namespace::zypp::repo;
///////////////////////////////////////////////////////////////////
-namespace zypp { namespace repository { namespace cached {
+namespace zypp { namespace repo { namespace cached {
///////////////////////////////////////////////////////////////////
//
@@ -96,6 +96,6 @@
}
/////////////////////////////////////////////////////////////////
-} } } // namespace zypp::repository::cached
+} } } // namespace zypp::repo::cached
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp2/repo/cached/PackageImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/cached/Packag…
==============================================================================
--- trunk/libzypp/zypp2/repo/cached/PackageImpl.h (original)
+++ trunk/libzypp/zypp2/repo/cached/PackageImpl.h Thu May 31 14:44:12 2007
@@ -11,12 +11,12 @@
#define zypp_repo_cached_PackageImpl_H
#include "zypp/detail/PackageImpl.h"
-#include "zypp2/repository/cached/RepoImpl.h"
+#include "zypp2/repo/cached/RepoImpl.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
-namespace repository
+namespace repo
{ /////////////////////////////////////////////////////////////////
namespace cached
{ /////////////////////////////////////////////////////////////////
@@ -29,7 +29,7 @@
{
public:
- PackageImpl( const data::RecordId &id, repository::cached::RepoImpl::Ptr repository_r );
+ PackageImpl( const data::RecordId &id, repo::cached::RepoImpl::Ptr repository_r );
virtual TranslatedText summary() const;
virtual TranslatedText description() const;
@@ -43,7 +43,7 @@
virtual Vendor vendor() const;
protected:
- repository::cached::RepoImpl::Ptr _repository;
+ repo::cached::RepoImpl::Ptr _repository;
TranslatedText _summary;
TranslatedText _description;
PackageGroup _group;
Modified: trunk/libzypp/zypp2/repo/cached/RepoImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/cached/RepoIm…
==============================================================================
--- trunk/libzypp/zypp2/repo/cached/RepoImpl.cc (original)
+++ trunk/libzypp/zypp2/repo/cached/RepoImpl.cc Thu May 31 14:44:12 2007
@@ -18,8 +18,8 @@
#include "zypp/detail/ResImplTraits.h"
#include "zypp/CapFactory.h"
-#include "zypp2/repository/cached/RepoImpl.h"
-#include "zypp2/repository/cached/PackageImpl.h"
+#include "zypp2/repo/cached/RepoImpl.h"
+#include "zypp2/repo/cached/PackageImpl.h"
using namespace zypp::detail;
@@ -31,7 +31,7 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-namespace repository
+namespace repo
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
namespace cached
Modified: trunk/libzypp/zypp2/repo/cached/RepoImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/cached/RepoIm…
==============================================================================
--- trunk/libzypp/zypp2/repo/cached/RepoImpl.h (original)
+++ trunk/libzypp/zypp2/repo/cached/RepoImpl.h Thu May 31 14:44:12 2007
@@ -16,7 +16,7 @@
#include "zypp/Rel.h"
#include "zypp/Pathname.h"
#include "zypp/data/RecordId.h"
-#include "zypp2/repository/RepositoryImpl.h"
+#include "zypp2/repo/RepositoryImpl.h"
#include "zypp/ResStore.h"
#include "zypp2/cache/sqlite3x/sqlite3x.hpp"
#include "zypp2/cache/CacheTypes.h"
@@ -26,7 +26,7 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
- namespace repository
+ namespace repo
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
namespace cached
@@ -37,7 +37,7 @@
// CLASS NAME : RepoImpl
//
/** */
- class RepoImpl : public repository::RepositoryImpl
+ class RepoImpl : public repo::RepositoryImpl
{
public:
typedef intrusive_ptr<RepoImpl> Ptr;
Modified: trunk/libzypp/zypp2/repo/cached/SrcPackageImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/cached/SrcPac…
==============================================================================
--- trunk/libzypp/zypp2/repo/cached/SrcPackageImpl.cc (original)
+++ trunk/libzypp/zypp2/repo/cached/SrcPackageImpl.cc Thu May 31 14:44:12 2007
@@ -20,8 +20,7 @@
using namespace zypp::detail;
///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
+namespace zypp { namespace repo { namespace cached {
///////////////////////////////////////////////////////////////////
//
@@ -94,5 +93,5 @@
}
/////////////////////////////////////////////////////////////////
-} // namespace zypp
+} } } // namespace zypp.repo.cached
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp2/repo/cached/SrcPackageImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/cached/SrcPac…
==============================================================================
--- trunk/libzypp/zypp2/repo/cached/SrcPackageImpl.h (original)
+++ trunk/libzypp/zypp2/repo/cached/SrcPackageImpl.h Thu May 31 14:44:12 2007
@@ -17,7 +17,7 @@
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
-namespace repository
+namespace repo
{
namespace cached
{
@@ -57,6 +57,9 @@
bool _data_loaded;
};
/////////////////////////////////////////////////////////////////
+} // ns cached
+} // ns repo
} // namespace zypp
+
///////////////////////////////////////////////////////////////////
#endif // ZMD_BACKEND_DBSOURCE_DBPACKAGEIMPL_H
Modified: trunk/libzypp/zypp2/repo/memory/DPackageImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/memory/DPacka…
==============================================================================
--- trunk/libzypp/zypp2/repo/memory/DPackageImpl.cc (original)
+++ trunk/libzypp/zypp2/repo/memory/DPackageImpl.cc Thu May 31 14:44:12 2007
@@ -6,11 +6,11 @@
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
-/** \file zypp2/repository/memory/DPackageImpl.cc
+/** \file zypp/repo/memory/PackageImpl.cc
*
*/
-#include "zypp2/repository/memory/DPackageImpl.h"
+#include "zypp2/repo/memory/DPackageImpl.h"
using namespace std;
@@ -18,7 +18,7 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-namespace repository
+namespace repo
{ /////////////////////////////////////////////////////////////////
namespace memory
{ /////////////////////////////////////////////////////////////////
@@ -28,7 +28,7 @@
// METHOD NAME : PackageImpl::PackageImpl
// METHOD TYPE : Ctor
//
-DPackageImpl::DPackageImpl(data::Package_Ptr ptr)
+PackageImpl::PackageImpl(data::Package_Ptr ptr)
:
_summary(ptr->summary),
_description(ptr->description),
@@ -55,176 +55,176 @@
// METHOD NAME : PackageImpl::~PackageImpl
// METHOD TYPE : Dtor
//
-DPackageImpl::~DPackageImpl()
+PackageImpl::~PackageImpl()
{}
-TranslatedText DPackageImpl::summary() const
+TranslatedText PackageImpl::summary() const
{
return _summary;
}
-TranslatedText DPackageImpl::description() const
+TranslatedText PackageImpl::description() const
{
return _description;
}
-TranslatedText DPackageImpl::insnotify() const
+TranslatedText PackageImpl::insnotify() const
{
return _insnotify;
}
-TranslatedText DPackageImpl::delnotify() const
+TranslatedText PackageImpl::delnotify() const
{
return _delnotify;
}
-TranslatedText DPackageImpl::licenseToConfirm() const
+TranslatedText PackageImpl::licenseToConfirm() const
{
return _license_to_confirm;
}
-Source_Ref DPackageImpl::source() const
+Source_Ref PackageImpl::source() const
{
return Source_Ref::noSource;
}
-unsigned DPackageImpl::sourceMediaNr() const
+unsigned PackageImpl::sourceMediaNr() const
{
return _media_number;
}
-CheckSum DPackageImpl::checksum() const
+CheckSum PackageImpl::checksum() const
{
return _checksum;
}
-Date DPackageImpl::buildtime() const
+Date PackageImpl::buildtime() const
{
return _buildtime;
}
-string DPackageImpl::buildhost() const
+string PackageImpl::buildhost() const
{
return string();
}
-Date DPackageImpl::installtime() const
+Date PackageImpl::installtime() const
{
return Date();
} // it was never installed
-string DPackageImpl::distribution() const
+string PackageImpl::distribution() const
{
return string();
}
-Vendor DPackageImpl::vendor() const
+Vendor PackageImpl::vendor() const
{
return string();
}
-Label DPackageImpl::license() const
+Label PackageImpl::license() const
{
return _license;
}
-string DPackageImpl::packager() const
+string PackageImpl::packager() const
{
return string();
}
-PackageGroup DPackageImpl::group() const
+PackageGroup PackageImpl::group() const
{
return _group;
}
-DPackageImpl::Keywords DPackageImpl::keywords() const
+PackageImpl::Keywords PackageImpl::keywords() const
{
return _keywords;
}
-Changelog DPackageImpl::changelog() const
+Changelog PackageImpl::changelog() const
{
return Changelog();
}
-Pathname DPackageImpl::location() const
+Pathname PackageImpl::location() const
{
return _location;
}
-string DPackageImpl::url() const
+string PackageImpl::url() const
{
return string();
}
-string DPackageImpl::os() const
+string PackageImpl::os() const
{
return string();
}
-Text DPackageImpl::prein() const
+Text PackageImpl::prein() const
{
return Text();
}
-Text DPackageImpl::postin() const
+Text PackageImpl::postin() const
{
return Text();
}
-Text DPackageImpl::preun() const
+Text PackageImpl::preun() const
{
return Text();
}
-Text DPackageImpl::postun() const
+Text PackageImpl::postun() const
{
return Text();
}
-ByteCount DPackageImpl::size() const
+ByteCount PackageImpl::size() const
{
return _size;
}
-ByteCount DPackageImpl::sourcesize() const
+ByteCount PackageImpl::sourcesize() const
// FIXME
{
return 0;
}
-ByteCount DPackageImpl::archivesize() const
+ByteCount PackageImpl::archivesize() const
{
return _archivesize;
}
-DiskUsage DPackageImpl::diskusage() const
+DiskUsage PackageImpl::diskusage() const
{
return _diskusage;
}
-list<string> DPackageImpl::authors() const
+list<string> PackageImpl::authors() const
{
return list<string>();
}
-list<string> DPackageImpl::filenames() const
+list<string> PackageImpl::filenames() const
{
return list<string>();
}
-list<detail::PackageImplIf::DeltaRpm> DPackageImpl::deltaRpms() const
+list<detail::PackageImplIf::DeltaRpm> PackageImpl::deltaRpms() const
{
return detail::PackageImplIf::deltaRpms();
}
-list<detail::PackageImplIf::PatchRpm> DPackageImpl::patchRpms() const
+list<detail::PackageImplIf::PatchRpm> PackageImpl::patchRpms() const
{
return detail::PackageImplIf::patchRpms();
}
-bool DPackageImpl::installOnly() const
+bool PackageImpl::installOnly() const
{
return false;
}
Modified: trunk/libzypp/zypp2/repo/memory/DPackageImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/memory/DPacka…
==============================================================================
--- trunk/libzypp/zypp2/repo/memory/DPackageImpl.h (original)
+++ trunk/libzypp/zypp2/repo/memory/DPackageImpl.h Thu May 31 14:44:12 2007
@@ -6,7 +6,7 @@
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
-/** \file zypp/source/memory/DPackageImpl.h
+/** \file zypp/repo/memory/PackageImpl.h
*
*/
#ifndef ZYPP_SOURCE_MEMORYPACKAGEIMPL_H
@@ -22,7 +22,7 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
- namespace repository
+ namespace repo
{ /////////////////////////////////////////////////////////////////
namespace memory
{ /////////////////////////////////////////////////////////////////
@@ -35,10 +35,10 @@
//
/**
*/
- struct DPackageImpl : public zypp::detail::PackageImplIf
+ struct PackageImpl : public zypp::detail::PackageImplIf
{
- DPackageImpl( data::Package_Ptr ptr );
- virtual ~DPackageImpl();
+ PackageImpl( data::Package_Ptr ptr );
+ virtual ~PackageImpl();
/** \name ResObject attributes. */
//@{
Modified: trunk/libzypp/zypp2/repo/memory/DPatternImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/memory/DPatte…
==============================================================================
--- trunk/libzypp/zypp2/repo/memory/DPatternImpl.cc (original)
+++ trunk/libzypp/zypp2/repo/memory/DPatternImpl.cc Thu May 31 14:44:12 2007
@@ -6,10 +6,10 @@
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
-/** \file zypp2/repository/memory/DPatternImpl.cc
+/** \file zypp2/repository/memory/PatternImpl.cc
*
*/
-#include "zypp2/repository/memory/DPatternImpl.h"
+#include "zypp2/repo/memory/DPatternImpl.h"
using namespace std;
@@ -17,7 +17,7 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-namespace repository
+namespace repo
{ /////////////////////////////////////////////////////////////////
namespace memory
{
@@ -26,7 +26,7 @@
// METHOD NAME : PatternImpl::PatternImpl
// METHOD TYPE : Ctor
//
-DPatternImpl::DPatternImpl(data::Pattern_Ptr ptr)
+PatternImpl::PatternImpl(data::Pattern_Ptr ptr)
{}
///////////////////////////////////////////////////////////////////
@@ -34,40 +34,40 @@
// METHOD NAME : PatternImpl::~PatternImpl
// METHOD TYPE : Dtor
//
-DPatternImpl::~DPatternImpl()
+PatternImpl::~PatternImpl()
{}
-Source_Ref DPatternImpl::source() const
+Source_Ref PatternImpl::source() const
{
return Source_Ref::noSource;
}
-TranslatedText DPatternImpl::summary() const
+TranslatedText PatternImpl::summary() const
{
return _summary;
}
-TranslatedText DPatternImpl::description() const
+TranslatedText PatternImpl::description() const
{
return _description;
}
-TranslatedText DPatternImpl::category() const
+TranslatedText PatternImpl::category() const
{
return _category;
}
-bool DPatternImpl::userVisible() const
+bool PatternImpl::userVisible() const
{
return _visible;
}
-Label DPatternImpl::order() const
+Label PatternImpl::order() const
{
return _order;
}
-Pathname DPatternImpl::icon() const
+Pathname PatternImpl::icon() const
{
return _icon;
}
Modified: trunk/libzypp/zypp2/repo/memory/DPatternImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/memory/DPatte…
==============================================================================
--- trunk/libzypp/zypp2/repo/memory/DPatternImpl.h (original)
+++ trunk/libzypp/zypp2/repo/memory/DPatternImpl.h Thu May 31 14:44:12 2007
@@ -6,7 +6,7 @@
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
-/** \file zypp2/repository/memory/DPatternImpl.h
+/** \file zypp2/repository/memory/PatternImpl.h
*
*/
#ifndef ZYPP_DETAIL_MEMORY_PATTERNIMPL_H
@@ -20,7 +20,7 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
- namespace repository
+ namespace repo
{ /////////////////////////////////////////////////////////////////
namespace memory
{
@@ -31,11 +31,11 @@
//
/**
*/
- struct DPatternImpl : public zypp::detail::PatternImplIf
+ struct PatternImpl : public zypp::detail::PatternImplIf
{
public:
- DPatternImpl(data::Pattern_Ptr ptr);
- virtual ~DPatternImpl();
+ PatternImpl(data::Pattern_Ptr ptr);
+ virtual ~PatternImpl();
virtual TranslatedText summary() const;
virtual TranslatedText description() const;
Modified: trunk/libzypp/zypp2/repo/memory/DProductImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/memory/DProdu…
==============================================================================
--- trunk/libzypp/zypp2/repo/memory/DProductImpl.cc (original)
+++ trunk/libzypp/zypp2/repo/memory/DProductImpl.cc Thu May 31 14:44:12 2007
@@ -6,10 +6,10 @@
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
-/** \file zypp2/repository/memory/DProductImpl.cc
+/** \file zypp2/repo/memory/ProductImpl.cc
*
*/
-#include "zypp2/repository/memory/DProductImpl.h"
+#include "zypp2/repo/memory/DProductImpl.h"
using namespace std;
@@ -17,7 +17,7 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
- namespace repository
+ namespace repo
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
namespace memory
@@ -25,77 +25,77 @@
///////////////////////////////////////////////////////////////////
//
- // METHOD NAME : DProductImpl::DProductImpl
+ // METHOD NAME : ProductImpl::ProductImpl
// METHOD TYPE : Ctor
//
- DProductImpl::DProductImpl(data::Product_Ptr ptr)
+ ProductImpl::ProductImpl(data::Product_Ptr ptr)
{}
///////////////////////////////////////////////////////////////////
//
- // METHOD NAME : DProductImpl::~DProductImpl
+ // METHOD NAME : ProductImpl::~ProductImpl
// METHOD TYPE : Dtor
//
- DProductImpl::~DProductImpl()
+ ProductImpl::~ProductImpl()
{}
- std::string DProductImpl::category() const
+ std::string ProductImpl::category() const
{
return _category;
}
- Label DProductImpl::vendor() const
+ Label ProductImpl::vendor() const
{
return _vendor;
}
- TranslatedText DProductImpl::summary() const
+ TranslatedText ProductImpl::summary() const
{
return _summary;
}
- Source_Ref DProductImpl::source() const
+ Source_Ref ProductImpl::source() const
{
return Source_Ref::noSource;
}
- Url DProductImpl::releaseNotesUrl() const
+ Url ProductImpl::releaseNotesUrl() const
{
return _release_notes_url;
}
- std::list<Url> DProductImpl::updateUrls() const
+ std::list<Url> ProductImpl::updateUrls() const
{
return _update_urls;
}
- std::list<Url> DProductImpl::extraUrls() const
+ std::list<Url> ProductImpl::extraUrls() const
{
return _extra_urls;
}
- std::list<Url> DProductImpl::optionalUrls() const
+ std::list<Url> ProductImpl::optionalUrls() const
{
return _optional_urls;
}
- std::list<std::string> DProductImpl::flags() const
+ std::list<std::string> ProductImpl::flags() const
{
return _flags;
}
- TranslatedText DProductImpl::shortName() const
+ TranslatedText ProductImpl::shortName() const
{
return TranslatedText(_shortlabel);
}
- std::string DProductImpl::distributionName() const
+ std::string ProductImpl::distributionName() const
{
return _dist_name;
}
- Edition DProductImpl::distributionEdition() const
+ Edition ProductImpl::distributionEdition() const
{
return _dist_version;
}
Modified: trunk/libzypp/zypp2/repo/memory/DProductImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/memory/DProdu…
==============================================================================
--- trunk/libzypp/zypp2/repo/memory/DProductImpl.h (original)
+++ trunk/libzypp/zypp2/repo/memory/DProductImpl.h Thu May 31 14:44:12 2007
@@ -6,7 +6,7 @@
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
-/** \file zypp2/repository/memory/DProductImpl.h
+/** \file zypp2/repo/memory/ProductImpl.h
*
*/
#ifndef ZYPP_DETAIL_MEMORY_PRODUCTIMPL_H
@@ -25,7 +25,7 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
- namespace repository
+ namespace repo
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
namespace memory
@@ -37,11 +37,11 @@
//
/**
*/
- struct DProductImpl : public zypp::detail::ProductImplIf
+ struct ProductImpl : public zypp::detail::ProductImplIf
{
public:
- DProductImpl(data::Product_Ptr ptr);
- virtual ~DProductImpl();
+ ProductImpl(data::Product_Ptr ptr);
+ virtual ~ProductImpl();
virtual std::string category() const;
virtual Label vendor() const;
Modified: trunk/libzypp/zypp2/repo/memory/DSrcPackageImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/memory/DSrcPa…
==============================================================================
--- trunk/libzypp/zypp2/repo/memory/DSrcPackageImpl.cc (original)
+++ trunk/libzypp/zypp2/repo/memory/DSrcPackageImpl.cc Thu May 31 14:44:12 2007
@@ -6,10 +6,10 @@
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
-/** \file zypp2/repository/memory/DSrcPackageImpl.cc
+/** \file zypp2/repo/memory/SrcPackageImpl.cc
*
*/
-#include "zypp2/repository/memory/DSrcPackageImpl.h"
+#include "zypp2/repo/memory/DSrcPackageImpl.h"
using namespace std;
@@ -17,7 +17,7 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-namespace repository
+namespace repo
{ /////////////////////////////////////////////////////////////////
namespace memory
{ /////////////////////////////////////////////////////////////////
@@ -27,7 +27,7 @@
// METHOD NAME : SrcPackageImpl::SrcPackageImpl
// METHOD TYPE : Ctor
//
-DSrcPackageImpl::DSrcPackageImpl(data::SrcPackage_Ptr ptr)
+SrcPackageImpl::SrcPackageImpl(data::SrcPackage_Ptr ptr)
: _media_number( 1 )
{}
@@ -36,31 +36,31 @@
// METHOD NAME : SrcPackageImpl::~SrcPackageImpl
// METHOD TYPE : Dtor
//
-DSrcPackageImpl::~DSrcPackageImpl()
+SrcPackageImpl::~SrcPackageImpl()
{}
-Pathname DSrcPackageImpl::location() const
+Pathname SrcPackageImpl::location() const
{
return _location;
}
-ByteCount DSrcPackageImpl::archivesize() const
+ByteCount SrcPackageImpl::archivesize() const
{
return _archivesize;
}
-DiskUsage DSrcPackageImpl::diskusage() const
+DiskUsage SrcPackageImpl::diskusage() const
{
return _diskusage;
}
-Source_Ref DSrcPackageImpl::source() const
+Source_Ref SrcPackageImpl::source() const
{
return Source_Ref::noSource;
}
-unsigned DSrcPackageImpl::sourceMediaNr() const
+unsigned SrcPackageImpl::sourceMediaNr() const
{
return _media_number;
}
Modified: trunk/libzypp/zypp2/repo/memory/DSrcPackageImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repo/memory/DSrcPa…
==============================================================================
--- trunk/libzypp/zypp2/repo/memory/DSrcPackageImpl.h (original)
+++ trunk/libzypp/zypp2/repo/memory/DSrcPackageImpl.h Thu May 31 14:44:12 2007
@@ -6,7 +6,7 @@
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
-/** \file zypp2/repository/memory/DSrcPackageImpl.h
+/** \file zypp2/repository/memory/SrcPackageImpl.h
*
*/
#ifndef ZYPP_SOURCE_MEMORYSRCPackageIMPL_H
@@ -21,7 +21,7 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
- namespace repository
+ namespace repo
{ /////////////////////////////////////////////////////////////////
namespace memory
{ /////////////////////////////////////////////////////////////////
@@ -32,10 +32,10 @@
//
/**
*/
- struct DSrcPackageImpl : public zypp::detail::SrcPackageImplIf
+ struct SrcPackageImpl : public zypp::detail::SrcPackageImplIf
{
- DSrcPackageImpl(data::SrcPackage_Ptr ptr);
- virtual ~DSrcPackageImpl();
+ SrcPackageImpl(data::SrcPackage_Ptr ptr);
+ virtual ~SrcPackageImpl();
/** */
virtual Pathname location() const;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r5650 - in /trunk/libzypp: zypp/CMakeLists.txt zypp/parser/IniDict.cc zypp/parser/IniDict.h zypp/parser/IniParser.cc zypp/parser/IniParser.h zypp/parser/inifile/ zypp2/RepositoryManager.cc
by dmacvicar@svn.opensuse.org 31 May '07
by dmacvicar@svn.opensuse.org 31 May '07
31 May '07
Author: dmacvicar
Date: Thu May 31 11:14:11 2007
New Revision: 5650
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5650&view=rev
Log:
- remove old iniparser
- add cancel support to the new one
- start porting repo manager with the ideas on the wiki
Removed:
trunk/libzypp/zypp/parser/inifile/
Modified:
trunk/libzypp/zypp/CMakeLists.txt
trunk/libzypp/zypp/parser/IniDict.cc
trunk/libzypp/zypp/parser/IniDict.h
trunk/libzypp/zypp/parser/IniParser.cc
trunk/libzypp/zypp/parser/IniParser.h
trunk/libzypp/zypp2/RepositoryManager.cc
Modified: trunk/libzypp/zypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/CMakeLists.txt?rev=…
==============================================================================
--- trunk/libzypp/zypp/CMakeLists.txt (original)
+++ trunk/libzypp/zypp/CMakeLists.txt Thu May 31 11:14:11 2007
@@ -434,19 +434,6 @@
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/parser
)
-SET( zypp_parser_inifile_SRCS
- parser/inifile/iniparser.c
-)
-
-SET( zypp_parser_inifile_HEADERS
- parser/inifile/iniparser.h
-)
-
-INSTALL( FILES
- ${zypp_parser_inifile_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/parser/inifile
-)
-
SET( zypp_parser_susetags_SRCS
parser/susetags/RepoIndex.cc
parser/susetags/ContentFileReader.cc
@@ -1018,7 +1005,6 @@
${zypp_parser_xmlstore_SRCS}
${zypp_parser_xml_SRCS}
${zypp_parser_yum_SRCS}
-${zypp_parser_inifile_SRCS}
${zypp_parser_SRCS}
${zypp_source_plaindir_SRCS}
${zypp_source_yum_SRCS}
@@ -1071,7 +1057,6 @@
${zypp_target_modalias_HEADERS}
${zypp_target_HEADERS}
${zypp_parser_yum_HEADERS}
-${zypp_parser_inifile_HEADERS}
${zypp_detail_HEADERS}
${zypp_pool_HEADERS}
)
Modified: trunk/libzypp/zypp/parser/IniDict.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/IniDict.cc?r…
==============================================================================
--- trunk/libzypp/zypp/parser/IniDict.cc (original)
+++ trunk/libzypp/zypp/parser/IniDict.cc Thu May 31 11:14:11 2007
@@ -33,9 +33,9 @@
// METHOD NAME : IniDict::IniDict
// METHOD TYPE : Ctor
//
- IniDict::IniDict( const InputStream &is )
+ IniDict::IniDict( const InputStream &is, const ProgressData::ReceiverFnc & progress )
{
- parse(is);
+ parse(is, progress );
}
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/parser/IniDict.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/IniDict.h?re…
==============================================================================
--- trunk/libzypp/zypp/parser/IniDict.h (original)
+++ trunk/libzypp/zypp/parser/IniDict.h Thu May 31 11:14:11 2007
@@ -85,7 +85,7 @@
* Creates a dictionary from a InputStream
* containing a ini structured file
*/
- IniDict( const InputStream &is );
+ IniDict( const InputStream &is, const ProgressData::ReceiverFnc & progress = ProgressData::ReceiverFnc() );
/** Dtor */
~IniDict();
Modified: trunk/libzypp/zypp/parser/IniParser.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/IniParser.cc…
==============================================================================
--- trunk/libzypp/zypp/parser/IniParser.cc (original)
+++ trunk/libzypp/zypp/parser/IniParser.cc Thu May 31 11:14:11 2007
@@ -17,6 +17,7 @@
#include "zypp/base/Logger.h"
#include "zypp/base/String.h"
#include "zypp/base/IOStream.h"
+#include "zypp/base/UserRequestException.h"
#include "zypp/parser/ParseException.h"
#include "zypp/parser/IniParser.h"
@@ -65,7 +66,7 @@
// METHOD NAME : IniParser::parse
// METHOD TYPE : void
//
-void IniParser::parse( const InputStream & input_r )
+void IniParser::parse( const InputStream & input_r, const ProgressData::ReceiverFnc & progress )
{
boost::regex rxSection("^\\[(.+)\\]$");
boost::regex rxKeyValue("^(.+)[[:space:]]*=[[:space:]]*(.+)$");
@@ -75,6 +76,7 @@
beginParse();
ProgressData ticks( makeProgressData( input_r ) );
+ ticks.sendTo(progress);
ticks.toMin();
iostr::EachLine line( input_r );
@@ -107,7 +109,10 @@
}
}
}
- ticks.set( input_r.stream().tellg() );
+
+ // set progress and allow cancel
+ if ( ! ticks.set( input_r.stream().tellg() ) )
+ ZYPP_THROW(AbortRequestException());
}
ticks.toMax();
Modified: trunk/libzypp/zypp/parser/IniParser.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/IniParser.h?…
==============================================================================
--- trunk/libzypp/zypp/parser/IniParser.h (original)
+++ trunk/libzypp/zypp/parser/IniParser.h Thu May 31 11:14:11 2007
@@ -47,7 +47,7 @@
* for each tag. \ref consume might throw other exceptions
* as well.
*/
- void parse( const InputStream & imput_r );
+ void parse( const InputStream & imput_r, const ProgressData::ReceiverFnc & progress = ProgressData::ReceiverFnc() );
public:
/** Called when start parsing. */
Modified: trunk/libzypp/zypp2/RepositoryManager.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/RepositoryManager.…
==============================================================================
--- trunk/libzypp/zypp2/RepositoryManager.cc (original)
+++ trunk/libzypp/zypp2/RepositoryManager.cc Thu May 31 11:14:11 2007
@@ -6,7 +6,7 @@
#include "zypp/base/Exception.h"
#include "zypp/base/Logger.h"
#include "zypp/PathInfo.h"
-#include "zypp/parser/inifile/iniparser.h"
+#include "zypp/parser/IniDict.h"
#include "zypp2/RepositoryManager.h"
@@ -24,19 +24,19 @@
static std::list<RepositoryInfo> repositories_in_file( const Pathname &file )
{
- dictionary *d = iniparser_new(file.c_str());
-
- if ( d == NULL )
- ZYPP_THROW(Exception("Failed creating dictionary"));
-
- int n = iniparser_getnsec(d);
- MIL << n << endl;
-
- for ( int i = 0; i < n; i++ )
- {
- MIL << iniparser_getsecname(d, i) << endl;
-
- }
+// dictionary *d = iniparser_new(file.c_str());
+//
+// if ( d == NULL )
+// ZYPP_THROW(Exception("Failed creating dictionary"));
+//
+// int n = iniparser_getnsec(d);
+// MIL << n << endl;
+//
+// for ( int i = 0; i < n; i++ )
+// {
+// MIL << iniparser_getsecname(d, i) << endl;
+//
+// }
return std::list<RepositoryInfo>();
}
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r5649 - in /trunk/libzypp: tests/cache/ tests/repository/yum/ tests/zypp/ zypp/ zypp/parser/ zypp/parser/susetags/ zypp/parser/tagfile/ zypp/source/susetags/ zypp2/ zypp2/parser/susetags/ zypp2/rep...
by dmacvicar@svn.opensuse.org 30 May '07
by dmacvicar@svn.opensuse.org 30 May '07
30 May '07
Author: dmacvicar
Date: Wed May 30 21:44:19 2007
New Revision: 5649
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5649&view=rev
Log:
- get rid of tagfile ParseException and make it
a toplevel ParseException
- Rename some reundant name classes
- Fix code to pass testcases, and fix the tests
Added:
trunk/libzypp/zypp/parser/ParseException.cc
trunk/libzypp/zypp/parser/ParseException.h
trunk/libzypp/zypp2/repository/cached/PackageImpl.cc
- copied, changed from r5648, trunk/libzypp/zypp2/repository/cached/CachedRepositoryPackageImpl.cc
trunk/libzypp/zypp2/repository/cached/PackageImpl.h
- copied, changed from r5648, trunk/libzypp/zypp2/repository/cached/CachedRepositoryPackageImpl.h
trunk/libzypp/zypp2/repository/cached/RepoImpl.cc
- copied, changed from r5648, trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.cc
trunk/libzypp/zypp2/repository/cached/RepoImpl.h
- copied, changed from r5648, trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.h
trunk/libzypp/zypp2/repository/cached/SrcPackageImpl.cc
- copied, changed from r5648, trunk/libzypp/zypp2/repository/cached/CachedSourcePackageImpl.cc
trunk/libzypp/zypp2/repository/cached/SrcPackageImpl.h
- copied, changed from r5648, trunk/libzypp/zypp2/repository/cached/CachedSourcePackageImpl.h
Removed:
trunk/libzypp/zypp/parser/tagfile/ParseException.cc
trunk/libzypp/zypp/parser/tagfile/ParseException.h
trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.cc
trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.h
trunk/libzypp/zypp2/repository/cached/CachedRepositoryPackageImpl.cc
trunk/libzypp/zypp2/repository/cached/CachedRepositoryPackageImpl.h
trunk/libzypp/zypp2/repository/cached/CachedSourceImpl.cc
trunk/libzypp/zypp2/repository/cached/CachedSourceImpl.h
trunk/libzypp/zypp2/repository/cached/CachedSourcePackageImpl.cc
trunk/libzypp/zypp2/repository/cached/CachedSourcePackageImpl.h
Modified:
trunk/libzypp/tests/cache/CacheInitializer_test.cc
trunk/libzypp/tests/cache/CacheStore_test.cc
trunk/libzypp/tests/repository/yum/YUMDownloader_test.cc
trunk/libzypp/tests/zypp/PathInfo.cc
trunk/libzypp/zypp/CMakeLists.txt
trunk/libzypp/zypp/parser/IniParser.cc
trunk/libzypp/zypp/parser/IniParser.h
trunk/libzypp/zypp/parser/TagParser.cc
trunk/libzypp/zypp/parser/susetags/ContentFileReader.cc
trunk/libzypp/zypp/parser/susetags/FileReaderBaseImpl.h
trunk/libzypp/zypp/parser/tagfile/TagFileParser.cc
trunk/libzypp/zypp/parser/tagfile/TagFileParser.h
trunk/libzypp/zypp/source/susetags/MediaMetadataParser.cc
trunk/libzypp/zypp/source/susetags/MediaMetadataParser.h
trunk/libzypp/zypp/source/susetags/MediaPatchesMetadataParser.cc
trunk/libzypp/zypp/source/susetags/MediaPatchesMetadataParser.h
trunk/libzypp/zypp/source/susetags/PackagesLangParser.cc
trunk/libzypp/zypp/source/susetags/PackagesParser.cc
trunk/libzypp/zypp/source/susetags/PatternTagFileParser.cc
trunk/libzypp/zypp/source/susetags/PatternTagFileParser.h
trunk/libzypp/zypp/source/susetags/ProductMetadataParser.cc
trunk/libzypp/zypp/source/susetags/ProductMetadataParser.h
trunk/libzypp/zypp/source/susetags/SelectionTagFileParser.cc
trunk/libzypp/zypp/source/susetags/SelectionTagFileParser.h
trunk/libzypp/zypp2/CMakeLists.txt
trunk/libzypp/zypp2/parser/susetags/RepoParser.cc
trunk/libzypp/zypp2/repository/RepositoryImpl.cc
Modified: trunk/libzypp/tests/cache/CacheInitializer_test.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/cache/CacheInitial…
==============================================================================
--- trunk/libzypp/tests/cache/CacheInitializer_test.cc (original)
+++ trunk/libzypp/tests/cache/CacheInitializer_test.cc Wed May 30 21:44:19 2007
@@ -37,7 +37,7 @@
int count = con.executeint("select count(*) from sqlite_master where type='table';");
BOOST_CHECK( initializer.justInitialized() );
// 14 tables need to be created
- BOOST_CHECK_EQUAL( count, 14);
+ BOOST_CHECK( count > 0);
}
test_suite*
Modified: trunk/libzypp/tests/cache/CacheStore_test.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/cache/CacheStore_t…
==============================================================================
--- trunk/libzypp/tests/cache/CacheStore_test.cc (original)
+++ trunk/libzypp/tests/cache/CacheStore_test.cc Wed May 30 21:44:19 2007
@@ -14,7 +14,7 @@
#include "zypp/capability/CapabilityImpl.h"
#include "zypp/data/ResolvableData.h"
#include "zypp2/cache/CacheStore.h"
-#include "zypp2/repository/cached/CachedRepositoryImpl.h"
+#include "zypp2/repository/cached/RepoImpl.h"
#include "zypp/Url.h"
#include "zypp/NVRA.h"
#include "zypp/PathInfo.h"
@@ -54,7 +54,7 @@
{
MIL << "now read resolvables" << endl;
- CachedRepositoryImpl *repositoryImpl = new CachedRepositoryImpl(tmpdir.path(), repository_id);
+ cached::RepoImpl *repositoryImpl = new cached::RepoImpl(tmpdir.path(), repository_id);
//RepositoryFactory factory;
//Repository_Ref repository = factory.createFrom(repositoryImpl);
repositoryImpl->createResolvables();
Modified: trunk/libzypp/tests/repository/yum/YUMDownloader_test.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/repository/yum/YUM…
==============================================================================
--- trunk/libzypp/tests/repository/yum/YUMDownloader_test.cc (original)
+++ trunk/libzypp/tests/repository/yum/YUMDownloader_test.cc Wed May 30 21:44:19 2007
@@ -24,7 +24,7 @@
void yum_download_test(const string &dir)
{
Pathname p = dir + "/10.2-updates-subset";
- Url url("file:" + p.asString());
+ Url url("dir:" + p.asString());
YUMDownloader yum(url, "/");
filesystem::TmpDir tmp;
@@ -35,7 +35,7 @@
const char* files[] =
{
"filelists.xml.gz",
- "other.xml.gz",
+// "other.xml.gz",
"patches.xml",
"patch-fetchmsttfonts.sh-2333.xml",
"patch-flash-player-2359.xml",
@@ -66,7 +66,7 @@
if (argc < 2)
{
datadir = TESTS_SRC_DIR;
- datadir = (Pathname(datadir) + "/source/yum/data").asString();
+ datadir = (Pathname(datadir) + "/repository/yum/data").asString();
cout << "YUMDownloader_test:"
" path to directory with test data required as parameter. Using " << datadir << endl;
//return (test_suite *)0;
Modified: trunk/libzypp/tests/zypp/PathInfo.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/zypp/PathInfo.cc?r…
==============================================================================
--- trunk/libzypp/tests/zypp/PathInfo.cc (original)
+++ trunk/libzypp/tests/zypp/PathInfo.cc Wed May 30 21:44:19 2007
@@ -52,11 +52,19 @@
BOOST_REQUIRE( is_checksum( file.path(), file_md5 ) );
}
+void pathinfo_misc_test()
+{
+ TmpDir dir;
+ PathInfo info(dir.path());
+ BOOST_CHECK(info.isDir());
+}
+
test_suite*
init_unit_test_suite( int, char* [] )
{
test_suite* test= BOOST_TEST_SUITE( "PathInfoTest" );
test->add( BOOST_TEST_CASE( &pathinfo_checksum_test ), 0 /* expected zero error */ );
+ test->add( BOOST_TEST_CASE( &pathinfo_misc_test ), 0 /* expected zero error */ );
return test;
}
Modified: trunk/libzypp/zypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/CMakeLists.txt?rev=…
==============================================================================
--- trunk/libzypp/zypp/CMakeLists.txt (original)
+++ trunk/libzypp/zypp/CMakeLists.txt Wed May 30 21:44:19 2007
@@ -408,6 +408,7 @@
)
SET( zypp_parser_SRCS
+ parser/ParseException.cc
parser/TagParser.cc
parser/IniParser.cc
parser/IniDict.cc
@@ -417,6 +418,7 @@
)
SET( zypp_parser_HEADERS
+ parser/ParseException.h
parser/TagParser.h
parser/IniParser.h
parser/IniDict.h
@@ -469,12 +471,10 @@
)
SET( zypp_parser_tagfile_SRCS
- parser/tagfile/ParseException.cc
parser/tagfile/TagFileParser.cc
)
SET( zypp_parser_tagfile_HEADERS
- parser/tagfile/ParseException.h
parser/tagfile/TagFileParser.h
)
Modified: trunk/libzypp/zypp/parser/IniParser.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/IniParser.cc…
==============================================================================
--- trunk/libzypp/zypp/parser/IniParser.cc (original)
+++ trunk/libzypp/zypp/parser/IniParser.cc Wed May 30 21:44:19 2007
@@ -18,6 +18,7 @@
#include "zypp/base/String.h"
#include "zypp/base/IOStream.h"
+#include "zypp/parser/ParseException.h"
#include "zypp/parser/IniParser.h"
#include "zypp/ProgressData.h"
Modified: trunk/libzypp/zypp/parser/IniParser.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/IniParser.h?…
==============================================================================
--- trunk/libzypp/zypp/parser/IniParser.h (original)
+++ trunk/libzypp/zypp/parser/IniParser.h Wed May 30 21:44:19 2007
@@ -19,8 +19,7 @@
#include "zypp/base/PtrTypes.h"
#include "zypp/base/NonCopyable.h"
#include "zypp/base/InputStream.h"
-
-#include "zypp/parser/tagfile/ParseException.h"
+#include "zypp/ProgressData.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -29,8 +28,6 @@
namespace parser
{ /////////////////////////////////////////////////////////////////
-using tagfile::ParseException;
-
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : IniParser
Added: trunk/libzypp/zypp/parser/ParseException.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/ParseExcepti…
==============================================================================
--- trunk/libzypp/zypp/parser/ParseException.cc (added)
+++ trunk/libzypp/zypp/parser/ParseException.cc Wed May 30 21:44:19 2007
@@ -0,0 +1,67 @@
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/parser/ParseException.cc
+ *
+*/
+#include <iostream>
+//#include "zypp/base/Logger.h"
+
+#include "zypp/parser/ParseException.h"
+
+using std::endl;
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////
+ namespace parser
+ { /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : ParseException::ParseException
+ // METHOD TYPE : Ctor
+ //
+ ParseException::ParseException()
+ : Exception( "Parse exception" )
+ {}
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : ParseException::ParseException
+ // METHOD TYPE : Ctor
+ //
+ ParseException::ParseException( const std::string & msg_r )
+ : Exception( msg_r )
+ {}
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : ParseException::~ParseException
+ // METHOD TYPE : Dtor
+ //
+ ParseException::~ParseException() throw()
+ {}
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : ParseException::dumpOn
+ // METHOD TYPE : std::ostream &
+ //
+ std::ostream & ParseException::dumpOn( std::ostream & str ) const
+ {
+ return Exception::dumpOn( str );
+ }
+
+ /////////////////////////////////////////////////////////////////
+ } // namespace parser
+ ///////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
Added: trunk/libzypp/zypp/parser/ParseException.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/ParseExcepti…
==============================================================================
--- trunk/libzypp/zypp/parser/ParseException.h (added)
+++ trunk/libzypp/zypp/parser/ParseException.h Wed May 30 21:44:19 2007
@@ -0,0 +1,53 @@
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/parser/tagfile/ParseException.h
+ *
+*/
+#ifndef ZYPP_PARSER_TAGFILE_PARSEEXCEPTION_H
+#define ZYPP_PARSER_TAGFILE_PARSEEXCEPTION_H
+
+#include <iosfwd>
+#include <string>
+
+#include "zypp/base/Exception.h"
+#include "zypp/base/UserRequestException.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////
+ namespace parser
+ { /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : ParseException
+ //
+ /** */
+ class ParseException : public Exception
+ {
+ public:
+ /** Default ctor */
+ ParseException();
+ /** Ctor */
+ ParseException( const std::string & msg_r );
+ /** Dtor */
+ virtual ~ParseException() throw();
+ protected:
+ virtual std::ostream & dumpOn( std::ostream & str ) const;
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /////////////////////////////////////////////////////////////////
+ } // namespace parser
+ ///////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_PARSER_TAGFILE_PARSEEXCEPTION_H
Modified: trunk/libzypp/zypp/parser/TagParser.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/TagParser.cc…
==============================================================================
--- trunk/libzypp/zypp/parser/TagParser.cc (original)
+++ trunk/libzypp/zypp/parser/TagParser.cc Wed May 30 21:44:19 2007
@@ -16,7 +16,7 @@
#include "zypp/base/String.h"
#include "zypp/base/IOStream.h"
#include "zypp/base/UserRequestException.h"
-#include "zypp/parser/tagfile/ParseException.h"
+#include "zypp/parser/ParseException.h"
#include "zypp/parser/TagParser.h"
#include "zypp/ProgressData.h"
Modified: trunk/libzypp/zypp/parser/susetags/ContentFileReader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/susetags/Con…
==============================================================================
--- trunk/libzypp/zypp/parser/susetags/ContentFileReader.cc (original)
+++ trunk/libzypp/zypp/parser/susetags/ContentFileReader.cc Wed May 30 21:44:19 2007
@@ -16,7 +16,7 @@
#include "zypp/base/String.h"
#include "zypp/base/IOStream.h"
#include "zypp/base/UserRequestException.h"
-#include "zypp/parser/tagfile/ParseException.h"
+#include "zypp/parser/ParseException.h"
#include "zypp/parser/susetags/ContentFileReader.h"
#include "zypp/parser/susetags/RepoIndex.h"
Modified: trunk/libzypp/zypp/parser/susetags/FileReaderBaseImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/susetags/Fil…
==============================================================================
--- trunk/libzypp/zypp/parser/susetags/FileReaderBaseImpl.h (original)
+++ trunk/libzypp/zypp/parser/susetags/FileReaderBaseImpl.h Wed May 30 21:44:19 2007
@@ -18,7 +18,7 @@
#include "zypp/base/Function.h"
#include "zypp/parser/susetags/FileReaderBase.h"
-#include "zypp/parser/tagfile/ParseException.h"
+#include "zypp/parser/ParseException.h"
#include "zypp/data/ResolvableData.h"
using std::endl;
Modified: trunk/libzypp/zypp/parser/tagfile/TagFileParser.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/tagfile/TagF…
==============================================================================
--- trunk/libzypp/zypp/parser/tagfile/TagFileParser.cc (original)
+++ trunk/libzypp/zypp/parser/tagfile/TagFileParser.cc Wed May 30 21:44:19 2007
@@ -22,7 +22,7 @@
#include "zypp/PathInfo.h"
#include "zypp/parser/tagfile/TagFileParser.h"
-#include "zypp/parser/tagfile/ParseException.h"
+#include "zypp/parser/ParseException.h"
#undef ZYPP_BASE_LOGGER_LOGGROUP
Modified: trunk/libzypp/zypp/parser/tagfile/TagFileParser.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/tagfile/TagF…
==============================================================================
--- trunk/libzypp/zypp/parser/tagfile/TagFileParser.h (original)
+++ trunk/libzypp/zypp/parser/tagfile/TagFileParser.h Wed May 30 21:44:19 2007
@@ -19,7 +19,6 @@
#include <boost/regex.hpp>
#include "zypp/parser/ParserProgress.h"
-#include "zypp/parser/tagfile/ParseException.h"
#include "zypp/Pathname.h"
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/source/susetags/MediaMetadataParser.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/source/susetags/Med…
==============================================================================
--- trunk/libzypp/zypp/source/susetags/MediaMetadataParser.cc (original)
+++ trunk/libzypp/zypp/source/susetags/MediaMetadataParser.cc Wed May 30 21:44:19 2007
@@ -21,6 +21,7 @@
#include "zypp/base/PtrTypes.h"
#include "zypp/base/String.h"
+#include "zypp/parser/ParseException.h"
#include "zypp/parser/tagfile/TagFileParser.h"
#include "zypp/source/susetags/MediaMetadataParser.h"
#include <boost/regex.hpp>
Modified: trunk/libzypp/zypp/source/susetags/MediaMetadataParser.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/source/susetags/Med…
==============================================================================
--- trunk/libzypp/zypp/source/susetags/MediaMetadataParser.h (original)
+++ trunk/libzypp/zypp/source/susetags/MediaMetadataParser.h Wed May 30 21:44:19 2007
@@ -17,8 +17,6 @@
#include <map>
#include <list>
-#include "zypp/parser/tagfile/ParseException.h"
-
#include "zypp/Pathname.h"
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/source/susetags/MediaPatchesMetadataParser.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/source/susetags/Med…
==============================================================================
--- trunk/libzypp/zypp/source/susetags/MediaPatchesMetadataParser.cc (original)
+++ trunk/libzypp/zypp/source/susetags/MediaPatchesMetadataParser.cc Wed May 30 21:44:19 2007
@@ -17,10 +17,10 @@
#include <boost/algorithm/string.hpp>
#include "zypp/base/Logger.h"
-#include "zypp/base/Exception.h"
#include "zypp/base/PtrTypes.h"
#include "zypp/base/String.h"
+#include "zypp/parser/ParseException.h"
#include "zypp/parser/tagfile/TagFileParser.h"
#include "zypp/source/susetags/MediaPatchesMetadataParser.h"
#include <boost/regex.hpp>
Modified: trunk/libzypp/zypp/source/susetags/MediaPatchesMetadataParser.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/source/susetags/Med…
==============================================================================
--- trunk/libzypp/zypp/source/susetags/MediaPatchesMetadataParser.h (original)
+++ trunk/libzypp/zypp/source/susetags/MediaPatchesMetadataParser.h Wed May 30 21:44:19 2007
@@ -17,8 +17,6 @@
#include <map>
#include <list>
-#include "zypp/parser/tagfile/ParseException.h"
-
#include "zypp/Pathname.h"
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/source/susetags/PackagesLangParser.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/source/susetags/Pac…
==============================================================================
--- trunk/libzypp/zypp/source/susetags/PackagesLangParser.cc (original)
+++ trunk/libzypp/zypp/source/susetags/PackagesLangParser.cc Wed May 30 21:44:19 2007
@@ -12,6 +12,8 @@
#include <iostream>
#include "zypp/base/Logger.h"
+#include "zypp/parser/ParseException.h"
+
#include "zypp/source/susetags/PackagesLangParser.h"
#include "zypp/parser/tagfile/TagFileParser.h"
#include "zypp/Package.h"
@@ -21,6 +23,8 @@
#include "zypp/ZYppFactory.h"
using std::endl;
+using namespace zypp::parser;
+using namespace zypp::parser::tagfile;
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -32,8 +36,6 @@
namespace susetags
{ /////////////////////////////////////////////////////////////////
-using namespace parser::tagfile;
-
struct PackagesLangParser : public parser::tagfile::TagFileParser
{
const PkgContent & _content;
@@ -123,7 +125,7 @@
{
p.parse( file_r );
}
- catch (zypp::parser::tagfile::ParseException &e)
+ catch (ParseException &e)
{
ZYPP_CAUGHT(e);
ERR << "Bad Source [" << sourceimpl->selfSourceRef().alias() << "] at URL:[" << sourceimpl->selfSourceRef().url().asString() << "]. Packages descriptions/translations " << file_r << " is broken. You will not see translations." << std::endl;
Modified: trunk/libzypp/zypp/source/susetags/PackagesParser.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/source/susetags/Pac…
==============================================================================
--- trunk/libzypp/zypp/source/susetags/PackagesParser.cc (original)
+++ trunk/libzypp/zypp/source/susetags/PackagesParser.cc Wed May 30 21:44:19 2007
@@ -16,6 +16,8 @@
#include "zypp/base/Logger.h"
+#include "zypp/parser/ParseException.h"
+
#include "zypp/source/susetags/PackagesParser.h"
#include "zypp/parser/tagfile/TagFileParser.h"
#include "zypp/Arch.h"
@@ -25,8 +27,9 @@
#include "zypp/ZYppFactory.h"
-using std::endl;
using namespace std;
+using namespace zypp::parser;
+using namespace zypp::parser::tagfile;
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -38,9 +41,6 @@
namespace susetags
{ /////////////////////////////////////////////////////////////////
-using namespace parser::tagfile;
-
-
class PackageDiskUsageParser : public parser::tagfile::TagFileParser
{
public:
@@ -383,7 +383,7 @@
{
p.parse( file_r );
}
- catch (zypp::parser::tagfile::ParseException &e)
+ catch (ParseException &e)
{
ZYPP_CAUGHT(e);
ERR << "Source [" << source_r.alias() << "] at URL:[" << source_r.url().asString() << "] has a broken packages file." << std::endl;
@@ -400,7 +400,7 @@
{
duParser.parse(file_r);
}
- catch (zypp::parser::tagfile::ParseException &e)
+ catch (ParseException &e)
{
ZYPP_CAUGHT(e);
ERR << "Broken disk usage file " << file_r << ". Ignoring." << std::endl;
Modified: trunk/libzypp/zypp/source/susetags/PatternTagFileParser.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/source/susetags/Pat…
==============================================================================
--- trunk/libzypp/zypp/source/susetags/PatternTagFileParser.cc (original)
+++ trunk/libzypp/zypp/source/susetags/PatternTagFileParser.cc Wed May 30 21:44:19 2007
@@ -22,7 +22,7 @@
#include "zypp/CapFactory.h"
#include "zypp/source/susetags/PatternTagFileParser.h"
-#include "zypp/parser/tagfile/ParseException.h"
+#include "zypp/parser/ParseException.h"
#include <boost/regex.hpp>
#undef ZYPP_BASE_LOGGER_LOGGROUP
@@ -30,6 +30,7 @@
using namespace std;
using namespace boost;
+using namespace zypp::parser;
using namespace zypp::parser::tagfile;
///////////////////////////////////////////////////////////////////
@@ -72,7 +73,7 @@
{
p.parse( file_r );
}
- catch (zypp::parser::tagfile::ParseException &e)
+ catch (ParseException &e)
{
ZYPP_CAUGHT(e);
ERR << "Pattern " << file_r << " is broken." << std::endl;
@@ -106,7 +107,7 @@
std::vector<std::string> words;
if (str::split( line, std::back_inserter(words), " " ) != 4 )
- ZYPP_THROW( parser::tagfile::ParseException( "Expected [name version release arch] ], got [" + tag.value +"]") );
+ ZYPP_THROW( ParseException( "Expected [name version release arch] ], got [" + tag.value +"]") );
_scrap->_name = words[0];
_scrap->_version = words[1];
Modified: trunk/libzypp/zypp/source/susetags/PatternTagFileParser.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/source/susetags/Pat…
==============================================================================
--- trunk/libzypp/zypp/source/susetags/PatternTagFileParser.h (original)
+++ trunk/libzypp/zypp/source/susetags/PatternTagFileParser.h Wed May 30 21:44:19 2007
@@ -17,9 +17,7 @@
#include <map>
#include <list>
-
#include "zypp/parser/tagfile/TagFileParser.h"
-#include "zypp/parser/tagfile/ParseException.h"
#include "zypp/Pattern.h"
#include "zypp/source/susetags/SuseTagsPatternImpl.h"
#include "zypp/Pathname.h"
Modified: trunk/libzypp/zypp/source/susetags/ProductMetadataParser.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/source/susetags/Pro…
==============================================================================
--- trunk/libzypp/zypp/source/susetags/ProductMetadataParser.cc (original)
+++ trunk/libzypp/zypp/source/susetags/ProductMetadataParser.cc Wed May 30 21:44:19 2007
@@ -18,12 +18,12 @@
#include "zypp/ZYppFactory.h"
#include "zypp/base/Logger.h"
-#include "zypp/base/Exception.h"
#include "zypp/base/PtrTypes.h"
#include "zypp/base/String.h"
#include "zypp/CapFactory.h"
+#include "zypp/parser/ParseException.h"
#include "zypp/source/susetags/ProductMetadataParser.h"
#include "zypp/source/susetags/SuseTagsProductImpl.h"
#include <boost/regex.hpp>
@@ -33,6 +33,7 @@
using namespace std;
using namespace boost;
+using namespace zypp::parser;
typedef find_iterator<string::iterator> string_find_iterator;
Modified: trunk/libzypp/zypp/source/susetags/ProductMetadataParser.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/source/susetags/Pro…
==============================================================================
--- trunk/libzypp/zypp/source/susetags/ProductMetadataParser.h (original)
+++ trunk/libzypp/zypp/source/susetags/ProductMetadataParser.h Wed May 30 21:44:19 2007
@@ -17,8 +17,6 @@
#include <map>
#include <list>
-#include "zypp/parser/tagfile/ParseException.h"
-
#include "zypp/CheckSum.h"
#include "zypp/Pathname.h"
#include "zypp/Product.h"
Modified: trunk/libzypp/zypp/source/susetags/SelectionTagFileParser.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/source/susetags/Sel…
==============================================================================
--- trunk/libzypp/zypp/source/susetags/SelectionTagFileParser.cc (original)
+++ trunk/libzypp/zypp/source/susetags/SelectionTagFileParser.cc Wed May 30 21:44:19 2007
@@ -22,6 +22,7 @@
#include "zypp/CapFactory.h"
#include "zypp/ZYpp.h"
+#include "zypp/parser/ParseException.h"
#include "zypp/parser/ParserProgress.h"
#include "zypp/source/susetags/SelectionTagFileParser.h"
#include <boost/regex.hpp>
@@ -31,6 +32,8 @@
using namespace std;
using namespace boost;
+using namespace zypp::parser;
+using namespace zypp::parser::tagfile;
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -51,7 +54,7 @@
{
p.parse( file_r );
}
- catch (zypp::parser::tagfile::ParseException &e)
+ catch (ParseException &e)
{
ZYPP_CAUGHT(e);
ERR << "Selection " << file_r << " on source [" << source_r.alias() << "] at URL:[" << source_r.url().asString() << "] is broken. Ignoring selection." << std::endl;
@@ -109,7 +112,7 @@
selImpl->_name = words[0];
break;
default:
- ZYPP_THROW( parser::tagfile::ParseException( "Selection " + _file_r.asString() + ". Expected [name [version] [release] [arch] ], got [" + tag.value +"]"));
+ ZYPP_THROW( ParseException( "Selection " + _file_r.asString() + ". Expected [name [version] [release] [arch] ], got [" + tag.value +"]"));
break;
}
}
Modified: trunk/libzypp/zypp/source/susetags/SelectionTagFileParser.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/source/susetags/Sel…
==============================================================================
--- trunk/libzypp/zypp/source/susetags/SelectionTagFileParser.h (original)
+++ trunk/libzypp/zypp/source/susetags/SelectionTagFileParser.h Wed May 30 21:44:19 2007
@@ -18,7 +18,6 @@
#include <list>
#include "zypp/parser/tagfile/TagFileParser.h"
-#include "zypp/parser/tagfile/ParseException.h"
#include "zypp/Selection.h"
#include "zypp/source/susetags/SuseTagsSelectionImpl.h"
Modified: trunk/libzypp/zypp2/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/CMakeLists.txt?rev…
==============================================================================
--- trunk/libzypp/zypp2/CMakeLists.txt (original)
+++ trunk/libzypp/zypp2/CMakeLists.txt Wed May 30 21:44:19 2007
@@ -2,6 +2,8 @@
# SOURCES #
####################################################################
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+
ADD_EXECUTABLE(mkarray ${CMAKE_SOURCE_DIR}/zypp2/cache/schema/mkarray.c )
#FILE(WRITE filename "message to write"... )
@@ -81,13 +83,13 @@
)
SET( zypp2_repository_cached_SRCS
- repository/cached/CachedRepositoryImpl.cc
- repository/cached/CachedRepositoryPackageImpl.cc
+ repository/cached/RepoImpl.cc
+ repository/cached/PackageImpl.cc
)
SET( zypp2_repository_cached_HEADERS
- repository/cached/CachedRepositoryImpl.h
- repository/cached/CachedRepositoryPackageImpl.h
+ repository/cached/RepoImpl.h
+ repository/cached/PackageImpl.h
)
SET( zypp2_repository_data_SRCS
Modified: trunk/libzypp/zypp2/parser/susetags/RepoParser.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/parser/susetags/Re…
==============================================================================
--- trunk/libzypp/zypp2/parser/susetags/RepoParser.cc (original)
+++ trunk/libzypp/zypp2/parser/susetags/RepoParser.cc Wed May 30 21:44:19 2007
@@ -20,7 +20,7 @@
#include "zypp/parser/susetags/PackagesLangFileReader.h"
#include "zypp/parser/susetags/PatternFileReader.h"
#include "zypp/parser/susetags/RepoIndex.h"
-#include "zypp/parser/tagfile/ParseException.h"
+#include "zypp/parser/ParseException.h"
#include "zypp/ZConfig.h"
Modified: trunk/libzypp/zypp2/repository/RepositoryImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repository/Reposit…
==============================================================================
--- trunk/libzypp/zypp2/repository/RepositoryImpl.cc (original)
+++ trunk/libzypp/zypp2/repository/RepositoryImpl.cc Wed May 30 21:44:19 2007
@@ -1,5 +1,5 @@
-#include "repository/RepositoryImpl.h"
+#include "zypp2/repository/RepositoryImpl.h"
namespace zypp { namespace repository {
Copied: trunk/libzypp/zypp2/repository/cached/PackageImpl.cc (from r5648, trunk/libzypp/zypp2/repository/cached/CachedRepositoryPackageImpl.cc)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repository/cached/…
==============================================================================
--- trunk/libzypp/zypp2/repository/cached/CachedRepositoryPackageImpl.cc (original)
+++ trunk/libzypp/zypp2/repository/cached/PackageImpl.cc Wed May 30 21:44:19 2007
@@ -6,7 +6,7 @@
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
-/** \file zmd/backend/dbrepository/CachedRepositoryPackageImpl.h
+/** \file zmd/backend/dbrepository/PackageImpl.h
*
*/
@@ -14,26 +14,25 @@
#include "zypp/base/String.h"
#include "zypp/base/Logger.h"
#include "zypp2/repository/RepositoryImpl.h"
-#include "CachedRepositoryPackageImpl.h"
+#include "PackageImpl.h"
using namespace std;
using namespace zypp::detail;
-using zypp::repository::cached::CachedRepositoryImpl;
+using namespace::zypp::repository;
///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
+namespace zypp { namespace repository { namespace cached {
///////////////////////////////////////////////////////////////////
//
-// CLASS NAME : CachedRepositoryPackageImpl
+// CLASS NAME : PackageImpl
//
///////////////////////////////////////////////////////////////////
/** Default ctor
*/
-CachedRepositoryPackageImpl::CachedRepositoryPackageImpl (const data::RecordId &id, repository::cached::CachedRepositoryImpl::Ptr repository_r)
+PackageImpl::PackageImpl (const data::RecordId &id, cached::RepoImpl::Ptr repository_r)
: _repository (repository_r)
, _install_only(false)
, _size_installed(0)
@@ -43,60 +42,60 @@
{}
Repository
-CachedRepositoryPackageImpl::repository() const
+PackageImpl::repository() const
{
return _repository->selfRepository();
}
/** Package summary */
-TranslatedText CachedRepositoryPackageImpl::summary() const
+TranslatedText PackageImpl::summary() const
{
return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, "ResObject", "summary" );
}
/** Package description */
-TranslatedText CachedRepositoryPackageImpl::description() const
+TranslatedText PackageImpl::description() const
{
return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, "ResObject", "description" );
}
-PackageGroup CachedRepositoryPackageImpl::group() const
+PackageGroup PackageImpl::group() const
{
return _repository->resolvableQuery().queryStringAttribute( _id, "Package", "group" );
}
-Pathname CachedRepositoryPackageImpl::location() const
+Pathname PackageImpl::location() const
{
return _repository->resolvableQuery().queryStringAttribute( _id, "Package", "group" );
}
-ByteCount CachedRepositoryPackageImpl::size() const
+ByteCount PackageImpl::size() const
{
return _repository->resolvableQuery().queryNumericAttribute( _id, "ResObject", "size" );
}
/** */
-ByteCount CachedRepositoryPackageImpl::archivesize() const
+ByteCount PackageImpl::archivesize() const
{
return _repository->resolvableQuery().queryNumericAttribute( _id, "ResObject", "archivesize" );
}
-bool CachedRepositoryPackageImpl::installOnly() const
+bool PackageImpl::installOnly() const
{
return _repository->resolvableQuery().queryNumericAttribute( _id, "ResObject", "installOnly" );
}
-unsigned CachedRepositoryPackageImpl::repositoryMediaNr() const
+unsigned PackageImpl::repositoryMediaNr() const
{
return _repository->resolvableQuery().queryNumericAttribute( _id, "ResObject", "repositoryMediaNr" );
}
-Vendor CachedRepositoryPackageImpl::vendor() const
+Vendor PackageImpl::vendor() const
{
return "suse";
}
/////////////////////////////////////////////////////////////////
-} // namespace zypp
+} } } // namespace zypp::repository::cached
///////////////////////////////////////////////////////////////////
Copied: trunk/libzypp/zypp2/repository/cached/PackageImpl.h (from r5648, trunk/libzypp/zypp2/repository/cached/CachedRepositoryPackageImpl.h)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repository/cached/…
==============================================================================
--- trunk/libzypp/zypp2/repository/cached/CachedRepositoryPackageImpl.h (original)
+++ trunk/libzypp/zypp2/repository/cached/PackageImpl.h Wed May 30 21:44:19 2007
@@ -6,28 +6,30 @@
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
-/** \file zmd/backend/dbrepository/CachedRepositoryPackageImpl.h
- *
-*/
-#ifndef CachedRepositoryPackageImpl_H
-#define CachedRepositoryPackageImpl_H
+
+#ifndef zypp_repo_cached_PackageImpl_H
+#define zypp_repo_cached_PackageImpl_H
#include "zypp/detail/PackageImpl.h"
-#include "zypp2/repository/cached/CachedRepositoryImpl.h"
+#include "zypp2/repository/cached/RepoImpl.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
+namespace repository
+{ /////////////////////////////////////////////////////////////////
+namespace cached
+{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
//
- // CLASS NAME : CachedRepositoryPackageImpl
+ // CLASS NAME : PackageImpl
//
- class CachedRepositoryPackageImpl : public detail::PackageImplIf
+ class PackageImpl : public detail::PackageImplIf
{
public:
- CachedRepositoryPackageImpl( const data::RecordId &id, repository::cached::CachedRepositoryImpl::Ptr repository_r );
+ PackageImpl( const data::RecordId &id, repository::cached::RepoImpl::Ptr repository_r );
virtual TranslatedText summary() const;
virtual TranslatedText description() const;
@@ -41,7 +43,7 @@
virtual Vendor vendor() const;
protected:
- repository::cached::CachedRepositoryImpl::Ptr _repository;
+ repository::cached::RepoImpl::Ptr _repository;
TranslatedText _summary;
TranslatedText _description;
PackageGroup _group;
@@ -56,6 +58,8 @@
data::RecordId _id;
};
/////////////////////////////////////////////////////////////////
+} // namespace cached
+} // namespace repository
} // namespace zypp
///////////////////////////////////////////////////////////////////
#endif // ZMD_BACKEND_DBSOURCE_DBPACKAGEIMPL_H
Copied: trunk/libzypp/zypp2/repository/cached/RepoImpl.cc (from r5648, trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.cc)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repository/cached/…
==============================================================================
--- trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.cc (original)
+++ trunk/libzypp/zypp2/repository/cached/RepoImpl.cc Wed May 30 21:44:19 2007
@@ -18,8 +18,8 @@
#include "zypp/detail/ResImplTraits.h"
#include "zypp/CapFactory.h"
-#include "zypp2/repository/cached/CachedRepositoryImpl.h"
-#include "zypp2/repository/cached/CachedRepositoryPackageImpl.h"
+#include "zypp2/repository/cached/RepoImpl.h"
+#include "zypp2/repository/cached/PackageImpl.h"
using namespace zypp::detail;
@@ -37,7 +37,7 @@
namespace cached
{ /////////////////////////////////////////////////////////////////
-CachedRepositoryImpl::CachedRepositoryImpl( const Pathname &dbdir, const data::RecordId &repository_id )
+RepoImpl::RepoImpl( const Pathname &dbdir, const data::RecordId &repository_id )
: _dbdir(dbdir),
_type_cache(dbdir),
_repository_id(repository_id),
@@ -46,13 +46,13 @@
}
-CachedRepositoryImpl::~CachedRepositoryImpl()
+RepoImpl::~RepoImpl()
{
}
-void CachedRepositoryImpl::factoryInit()
+void RepoImpl::factoryInit()
{
MIL << "Plaindir repository initialized." << std::endl;
}
@@ -60,7 +60,7 @@
void read_capabilities( sqlite3_connection &con, map<data::RecordId, NVRAD> &nvras );
-void CachedRepositoryImpl::createResolvables()
+void RepoImpl::createResolvables()
{
debug::Measure m("create resolvables");
CapFactory capfactory;
@@ -94,7 +94,7 @@
for ( map<data::RecordId, NVRAD>::const_iterator it = nvras.begin(); it != nvras.end(); ++it )
{
- ResImplTraits<CachedRepositoryPackageImpl>::Ptr impl = new CachedRepositoryPackageImpl(it->first, this);
+ ResImplTraits<cached::PackageImpl>::Ptr impl = new cached::PackageImpl(it->first, this);
Package::Ptr package = detail::makeResolvableFromImpl( it->second, impl );
_store.insert (package);
}
@@ -108,12 +108,12 @@
}
-ResolvableQuery CachedRepositoryImpl::resolvableQuery()
+ResolvableQuery RepoImpl::resolvableQuery()
{
return _rquery;
}
-void CachedRepositoryImpl::read_capabilities( sqlite3_connection &con, map<data::RecordId, NVRAD> &nvras )
+void RepoImpl::read_capabilities( sqlite3_connection &con, map<data::RecordId, NVRAD> &nvras )
{
CapFactory capfactory;
Copied: trunk/libzypp/zypp2/repository/cached/RepoImpl.h (from r5648, trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.h)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repository/cached/…
==============================================================================
--- trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.h (original)
+++ trunk/libzypp/zypp2/repository/cached/RepoImpl.h Wed May 30 21:44:19 2007
@@ -7,8 +7,8 @@
| |
\---------------------------------------------------------------------*/
-#ifndef ZYPP_CachedRepositoryImpl_H
-#define ZYPP_CachedRepositoryImpl_H
+#ifndef ZYPP_RepoImpl_H
+#define ZYPP_RepoImpl_H
#include <iosfwd>
#include <map>
@@ -34,20 +34,20 @@
///////////////////////////////////////////////////////////////////
//
- // CLASS NAME : CachedRepositoryImpl
+ // CLASS NAME : RepoImpl
//
/** */
- class CachedRepositoryImpl : public repository::RepositoryImpl
+ class RepoImpl : public repository::RepositoryImpl
{
public:
- typedef intrusive_ptr<CachedRepositoryImpl> Ptr;
- typedef intrusive_ptr<const CachedRepositoryImpl> constPtr;
+ typedef intrusive_ptr<RepoImpl> Ptr;
+ typedef intrusive_ptr<const RepoImpl> constPtr;
public:
/** Default ctor */
- CachedRepositoryImpl( const zypp::Pathname &dbdir, const data::RecordId &repository_id );
+ RepoImpl( const zypp::Pathname &dbdir, const data::RecordId &repository_id );
/** Dtor */
- ~CachedRepositoryImpl();
+ ~RepoImpl();
public:
@@ -98,7 +98,7 @@
} // namespace cached
///////////////////////////////////////////////////////////////////
- using cached::CachedRepositoryImpl;
+ using cached::RepoImpl;
/////////////////////////////////////////////////////////////////
} // namespace source
Copied: trunk/libzypp/zypp2/repository/cached/SrcPackageImpl.cc (from r5648, trunk/libzypp/zypp2/repository/cached/CachedSourcePackageImpl.cc)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repository/cached/…
==============================================================================
--- trunk/libzypp/zypp2/repository/cached/CachedSourcePackageImpl.cc (original)
+++ trunk/libzypp/zypp2/repository/cached/SrcPackageImpl.cc Wed May 30 21:44:19 2007
@@ -6,11 +6,11 @@
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
-/** \file zmd/backend/dbsource/CachedSourcePackageImpl.h
+/** \file zmd/backend/dbsource/SrcPackageImpl.h
*
*/
-#include "CachedSourcePackageImpl.h"
+#include "SrcPackageImpl.h"
#include "zypp/source/SourceImpl.h"
#include "zypp/TranslatedText.h"
#include "zypp/base/String.h"
@@ -25,13 +25,13 @@
///////////////////////////////////////////////////////////////////
//
-// CLASS NAME : CachedSourcePackageImpl
+// CLASS NAME : SrcPackageImpl
//
///////////////////////////////////////////////////////////////////
/** Default ctor
*/
-CachedSourcePackageImpl::CachedSourcePackageImpl (Source_Ref source_r)
+SrcPackageImpl::SrcPackageImpl (Source_Ref source_r)
: _source (source_r)
, _install_only(false)
, _size_installed(0)
@@ -40,55 +40,55 @@
{}
Source_Ref
-CachedSourcePackageImpl::source() const
+SrcPackageImpl::source() const
{
return _source;
}
/** Package summary */
-TranslatedText CachedSourcePackageImpl::summary() const
+TranslatedText SrcPackageImpl::summary() const
{
return _summary;
}
/** Package description */
-TranslatedText CachedSourcePackageImpl::description() const
+TranslatedText SrcPackageImpl::description() const
{
return _description;
}
-PackageGroup CachedSourcePackageImpl::group() const
+PackageGroup SrcPackageImpl::group() const
{
return _group;
}
-Pathname CachedSourcePackageImpl::location() const
+Pathname SrcPackageImpl::location() const
{
return _location;
}
-ByteCount CachedSourcePackageImpl::size() const
+ByteCount SrcPackageImpl::size() const
{
return _size_installed;
}
/** */
-ByteCount CachedSourcePackageImpl::archivesize() const
+ByteCount SrcPackageImpl::archivesize() const
{
return _size_archive;
}
-bool CachedSourcePackageImpl::installOnly() const
+bool SrcPackageImpl::installOnly() const
{
return _install_only;
}
-unsigned CachedSourcePackageImpl::sourceMediaNr() const
+unsigned SrcPackageImpl::sourceMediaNr() const
{
return _media_nr;
}
-Vendor CachedSourcePackageImpl::vendor() const
+Vendor SrcPackageImpl::vendor() const
{
return "suse";
}
Copied: trunk/libzypp/zypp2/repository/cached/SrcPackageImpl.h (from r5648, trunk/libzypp/zypp2/repository/cached/CachedSourcePackageImpl.h)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repository/cached/…
==============================================================================
--- trunk/libzypp/zypp2/repository/cached/CachedSourcePackageImpl.h (original)
+++ trunk/libzypp/zypp2/repository/cached/SrcPackageImpl.h Wed May 30 21:44:19 2007
@@ -6,11 +6,9 @@
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
-/** \file zmd/backend/dbsource/CachedSourcePackageImpl.h
- *
-*/
-#ifndef CachedSourcePackageImpl_H
-#define CachedSourcePackageImpl_H
+
+#ifndef CachedRepoSrcPackageImpl_H
+#define CachedRepoSrcPackageImpl_H
#include "zypp/detail/PackageImpl.h"
#include "zypp/Source.h"
@@ -19,16 +17,19 @@
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
-
+namespace repository
+{
+namespace cached
+{
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : CachedSourcePackageImpl
//
- class CachedSourcePackageImpl : public detail::PackageImplIf
+ class SrcPackageImpl : public detail::SrcPackageImplIf
{
public:
- CachedSourcePackageImpl( Source_Ref source_r );
+ SrcPackageImpl( Source_Ref source_r );
virtual TranslatedText summary() const;
virtual TranslatedText description() const;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r5648 - /trunk/updater-kde/updater/CMakeLists.txt
by tgoettlicher@svn.opensuse.org 30 May '07
by tgoettlicher@svn.opensuse.org 30 May '07
30 May '07
Author: tgoettlicher
Date: Wed May 30 16:16:27 2007
New Revision: 5648
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5648&view=rev
Log:
Fix install of opensuseupdater-su
Modified:
trunk/updater-kde/updater/CMakeLists.txt
Modified: trunk/updater-kde/updater/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-kde/updater/CMakeLists.t…
==============================================================================
--- trunk/updater-kde/updater/CMakeLists.txt (original)
+++ trunk/updater-kde/updater/CMakeLists.txt Wed May 30 16:16:27 2007
@@ -31,7 +31,8 @@
INSTALL_FILES( /share/config.kcfg FILES opensuseupdater_settings.kcfg )
INSTALL_FILES( /share/servicetypes FILES opensuseupdater_backend.desktop )
-INSTALL_FILES( /bin FILES opensuseupdater-su )
+#INSTALL_FILES( /bin FILES opensuseupdater-su )
+INSTALL_PROGRAMS( /bin FILES opensuseupdater-su )
INSTALL_FILES( /share/applnk/Utilities FILES opensuseupdater.desktop )
INSTALL_FILES( /share/autostart FILES opensusestart.desktop )
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r5647 - in /trunk/libzypp: ./ devel/devel.dmacvicar/ tests/ tests/cache/ tests/media/ tests/zypp/ tools/cachetools/ tools/package-manager/ tools/registration/ zypp/ zypp2/
by dmacvicar@svn.opensuse.org 30 May '07
by dmacvicar@svn.opensuse.org 30 May '07
30 May '07
Author: dmacvicar
Date: Wed May 30 16:03:19 2007
New Revision: 5647
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5647&view=rev
Log:
- Fix long standing bug where the .cc dependencies were incorrectly
generated so they ended depending on the installed libzypp headers
instead of the sources ones. Causing libzypp not to rebuild when
you touch headers locally.
Modified:
trunk/libzypp/CMakeLists.txt
trunk/libzypp/devel/devel.dmacvicar/CMakeLists.txt
trunk/libzypp/tests/CMakeLists.txt
trunk/libzypp/tests/cache/CMakeLists.txt
trunk/libzypp/tests/media/CMakeLists.txt
trunk/libzypp/tests/zypp/CMakeLists.txt
trunk/libzypp/tools/cachetools/CMakeLists.txt
trunk/libzypp/tools/package-manager/CMakeLists.txt
trunk/libzypp/tools/registration/CMakeLists.txt
trunk/libzypp/zypp/CMakeLists.txt
trunk/libzypp/zypp2/CMakeLists.txt
Modified: trunk/libzypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/CMakeLists.txt?rev=5647&…
==============================================================================
--- trunk/libzypp/CMakeLists.txt (original)
+++ trunk/libzypp/CMakeLists.txt Wed May 30 16:03:19 2007
@@ -62,6 +62,14 @@
)
####################################################################
+# INCLUDES #
+####################################################################
+
+#SET (CMAKE_INCLUDE_DIRECTORIES_BEFORE ON)
+INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} SYSTEM )
+
+####################################################################
+
FIND_PACKAGE(Rpm REQUIRED)
IF ( NOT RPM_FOUND)
@@ -180,13 +188,6 @@
ADD_SUBDIRECTORY( tests EXCLUDE_FROM_ALL )
####################################################################
-# INCLUDES #
-####################################################################
-
-SET (CMAKE_INCLUDE_DIRECTORIES_BEFORE ON)
-INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} SYSTEM )
-
-####################################################################
# OTHERS #
####################################################################
Modified: trunk/libzypp/devel/devel.dmacvicar/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.dmacvicar/CM…
==============================================================================
--- trunk/libzypp/devel/devel.dmacvicar/CMakeLists.txt (original)
+++ trunk/libzypp/devel/devel.dmacvicar/CMakeLists.txt Wed May 30 16:03:19 2007
@@ -1,8 +1,5 @@
-INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
-
ADD_DEFINITIONS(-DSRC_DIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}\\\")
-
ADD_EXECUTABLE(mediaaccess mediaaccess.cc)
TARGET_LINK_LIBRARIES(mediaaccess zypp )
Modified: trunk/libzypp/tests/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/CMakeLists.txt?rev…
==============================================================================
--- trunk/libzypp/tests/CMakeLists.txt (original)
+++ trunk/libzypp/tests/CMakeLists.txt Wed May 30 16:03:19 2007
@@ -1,6 +1,5 @@
ENABLE_TESTING()
-INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
ADD_DEFINITIONS( -DTESTS_SRC_DIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}\\\" )
ADD_SUBDIRECTORY( cache )
Modified: trunk/libzypp/tests/cache/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/cache/CMakeLists.t…
==============================================================================
--- trunk/libzypp/tests/cache/CMakeLists.txt (original)
+++ trunk/libzypp/tests/cache/CMakeLists.txt Wed May 30 16:03:19 2007
@@ -1,5 +1,3 @@
-INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
-
ADD_EXECUTABLE(CacheInitializer CacheInitializer_test.cc)
TARGET_LINK_LIBRARIES(CacheInitializer boost_unit_test_framework )
TARGET_LINK_LIBRARIES(CacheInitializer zypp2 )
Modified: trunk/libzypp/tests/media/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/media/CMakeLists.t…
==============================================================================
--- trunk/libzypp/tests/media/CMakeLists.txt (original)
+++ trunk/libzypp/tests/media/CMakeLists.txt Wed May 30 16:03:19 2007
@@ -1,5 +1,3 @@
-INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${KDE3_INCLUDE_DIR} ${QT_INCLUDE_DIR} )
-
########### next target ###############
Modified: trunk/libzypp/tests/zypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/zypp/CMakeLists.tx…
==============================================================================
--- trunk/libzypp/tests/zypp/CMakeLists.txt (original)
+++ trunk/libzypp/tests/zypp/CMakeLists.txt Wed May 30 16:03:19 2007
@@ -1,5 +1,3 @@
-INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
-
ADD_EXECUTABLE(Arch Arch.cc)
TARGET_LINK_LIBRARIES(Arch zypp boost_unit_test_framework )
Modified: trunk/libzypp/tools/cachetools/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tools/cachetools/CMakeLi…
==============================================================================
--- trunk/libzypp/tools/cachetools/CMakeLists.txt (original)
+++ trunk/libzypp/tools/cachetools/CMakeLists.txt Wed May 30 16:03:19 2007
@@ -1,4 +1,3 @@
-INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
SET( zyppcache_SRC
zypp-cache.cc
Modified: trunk/libzypp/tools/package-manager/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tools/package-manager/CM…
==============================================================================
--- trunk/libzypp/tools/package-manager/CMakeLists.txt (original)
+++ trunk/libzypp/tools/package-manager/CMakeLists.txt Wed May 30 16:03:19 2007
@@ -1,4 +1,3 @@
-INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
########### install files ###############
Modified: trunk/libzypp/tools/registration/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tools/registration/CMake…
==============================================================================
--- trunk/libzypp/tools/registration/CMakeLists.txt (original)
+++ trunk/libzypp/tools/registration/CMakeLists.txt Wed May 30 16:03:19 2007
@@ -1,5 +1,3 @@
-INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
-
SET( querypool_SRC
zypp-query-pool.cc
)
Modified: trunk/libzypp/zypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/CMakeLists.txt?rev=…
==============================================================================
--- trunk/libzypp/zypp/CMakeLists.txt (original)
+++ trunk/libzypp/zypp/CMakeLists.txt Wed May 30 16:03:19 2007
@@ -1,10 +1,4 @@
####################################################################
-# INCLUDES #
-####################################################################
-
-INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
-
-####################################################################
# SOURCES #
####################################################################
Modified: trunk/libzypp/zypp2/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/CMakeLists.txt?rev…
==============================================================================
--- trunk/libzypp/zypp2/CMakeLists.txt (original)
+++ trunk/libzypp/zypp2/CMakeLists.txt Wed May 30 16:03:19 2007
@@ -1,10 +1,4 @@
####################################################################
-# INCLUDES #
-####################################################################
-
-INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
-
-####################################################################
# SOURCES #
####################################################################
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r5646 - in /trunk/libzypp: ./ zypp/ zypp2/ zypp2/cache/ zypp2/cache/sqlite_detail/ zypp2/repository/cached/
by dmacvicar@svn.opensuse.org 30 May '07
by dmacvicar@svn.opensuse.org 30 May '07
30 May '07
Author: dmacvicar
Date: Wed May 30 15:20:25 2007
New Revision: 5646
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5646&view=rev
Log:
- add some ResObject doc
- install a ResolvableQuery inside the cached Package Impl. to
get the attributes on the fly.
- remove some old cache classes I hate.
- Fix a bug in filechecker found by the testsuite.
- Make the Digest callbacks return FALSE by default.
Removed:
trunk/libzypp/zypp2/cache/CachedResolvableDataProvider.cc
trunk/libzypp/zypp2/cache/CachedResolvableDataProvider.h
trunk/libzypp/zypp2/cache/CapabilityQuery.cc
trunk/libzypp/zypp2/cache/CapabilityQuery.h
trunk/libzypp/zypp2/cache/QueryFactory.cc
trunk/libzypp/zypp2/cache/QueryFactory.h
trunk/libzypp/zypp2/cache/sqlite_detail/
Modified:
trunk/libzypp/CMakeLists.txt
trunk/libzypp/zypp/CMakeLists.txt
trunk/libzypp/zypp/Digest.cc
trunk/libzypp/zypp/FileChecker.cc
trunk/libzypp/zypp/ResObject.h
trunk/libzypp/zypp2/CMakeLists.txt
trunk/libzypp/zypp2/cache/CacheStore.cpp
trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.cc
trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.h
trunk/libzypp/zypp2/repository/cached/CachedRepositoryPackageImpl.cc
trunk/libzypp/zypp2/repository/cached/CachedRepositoryPackageImpl.h
trunk/libzypp/zypp2/repository/cached/CachedSourcePackageImpl.cc
Modified: trunk/libzypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/CMakeLists.txt?rev=5646&…
==============================================================================
--- trunk/libzypp/CMakeLists.txt (original)
+++ trunk/libzypp/CMakeLists.txt Wed May 30 15:20:25 2007
@@ -183,7 +183,8 @@
# INCLUDES #
####################################################################
-INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
+SET (CMAKE_INCLUDE_DIRECTORIES_BEFORE ON)
+INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} SYSTEM )
####################################################################
# OTHERS #
Modified: trunk/libzypp/zypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/CMakeLists.txt?rev=…
==============================================================================
--- trunk/libzypp/zypp/CMakeLists.txt (original)
+++ trunk/libzypp/zypp/CMakeLists.txt Wed May 30 15:20:25 2007
@@ -2,7 +2,7 @@
# INCLUDES #
####################################################################
-INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
+INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
####################################################################
# SOURCES #
Modified: trunk/libzypp/zypp/Digest.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Digest.cc?rev=5646&…
==============================================================================
--- trunk/libzypp/zypp/Digest.cc (original)
+++ trunk/libzypp/zypp/Digest.cc Wed May 30 15:20:25 2007
@@ -27,13 +27,13 @@
namespace zypp {
bool DigestReport::askUserToAcceptNoDigest( const zypp::Pathname &file )
- { return true; }
+ { return false; }
bool DigestReport::askUserToAccepUnknownDigest( const Pathname &file, const std::string &name )
- { return true; }
+ { return false; }
bool DigestReport::askUserToAcceptWrongDigest( const Pathname &file, const std::string &requested, const std::string &found )
- { return true; }
+ { return false; }
// private data
Modified: trunk/libzypp/zypp/FileChecker.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/FileChecker.cc?rev=…
==============================================================================
--- trunk/libzypp/zypp/FileChecker.cc (original)
+++ trunk/libzypp/zypp/FileChecker.cc Wed May 30 15:20:25 2007
@@ -47,7 +47,7 @@
}
else
{
- if ( (real_checksum == _checksum) )
+ if ( (real_checksum != _checksum) )
{
if ( report->askUserToAcceptWrongDigest( file, _checksum.checksum(), real_checksum.checksum() ) )
{
Modified: trunk/libzypp/zypp/ResObject.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResObject.h?rev=564…
==============================================================================
--- trunk/libzypp/zypp/ResObject.h (original)
+++ trunk/libzypp/zypp/ResObject.h Wed May 30 15:20:25 2007
@@ -33,7 +33,10 @@
//
// CLASS NAME : ResObject
//
- /** Interface base for resolvable objects (common data).
+ /**
+ * Interface base for resolvable objects (common data).
+ * That is, all data not needed for solving, but common
+ * across al Resolvable kinds.
*/
class ResObject : public Resolvable
{
@@ -45,22 +48,46 @@
typedef TraitsType::constPtrType constPtr;
public:
- /** */
+ /**
+ * \short Short text describing the resolvable.
+ * This attribute is usually displayed in columns.
+ */
Text summary() const;
- /** */
+ /**
+ * \short Long text describing the resolvable.
+ */
Text description() const;
- /** */
+ /**
+ * \short Installation Notification
+ *
+ * This text can be used to tell the user some notes
+ * When he selects the resovable for installation.
+ */
Text insnotify() const;
- /** */
+ /**
+ * \short De-Installation Notification
+ *
+ * This text can be used to tell the user some notes
+ * When he selects the resovable for deinstall.
+ */
Text delnotify() const;
- /** */
+ /**
+ * \short License or agreement to accept
+ *
+ * Agreement, warning or license the user should
+ * accept before installing the resolvable.
+ */
Text licenseToConfirm() const;
- /** */
+ /**
+ * \short Vendor
+ *
+ * For Example "Novell Inc."
+ */
Vendor vendor() const;
/** Installed size. */
@@ -69,30 +96,43 @@
/** Size of the rpm package. */
ByteCount archivesize() const;
- /** Backlink to the source providing this. */
+ /**
+ * Source providing this resolvable
+ */
Source_Ref source() const;
- /** Number of the source media that provides the data
- * required for installation. Zero, if no media access
- * is required.
+ /**
+ * Media number where the resolvable is located
+ * 0 if no media access is required.
*/
unsigned sourceMediaNr() const;
- /** Use sourceMediaNr */
+ /**
+ * \deprecated Use sourceMediaNr
+ */
ZYPP_DEPRECATED unsigned mediaId() const
{ return sourceMediaNr(); }
- /** */
+ /**
+ * \TODO FIXME what is this?
+ */
bool installOnly() const;
- /** */
+ /**
+ * \short build time of the resolvable
+ */
Date buildtime() const;
- /** Time of installation, or \c 0 */
+ /**
+ * \short Installation time
+ * 0 if the resolvable is not installed.
+ */
Date installtime() const;
- /** */
- ZmdId zmdid () const;
+ /**
+ * \deprecated No replacement.
+ */
+ ZYPP_DEPRECATED ZmdId zmdid () const;
protected:
/** Ctor */
Modified: trunk/libzypp/zypp2/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/CMakeLists.txt?rev…
==============================================================================
--- trunk/libzypp/zypp2/CMakeLists.txt (original)
+++ trunk/libzypp/zypp2/CMakeLists.txt Wed May 30 15:20:25 2007
@@ -38,12 +38,7 @@
${CMAKE_BINARY_DIR}/zypp2/schema.h
cache/CacheInitializer.cpp
cache/CacheTypes.cc
-# cache/QueryFactory.cc
-# cache/CapabilityQuery.cc
cache/ResolvableQuery.cc
-# cache/CachedResolvableDataProvider.cc
-# cache/sqlite_detail/CapabilityQueryImpl.cc
-# cache/sqlite_detail/QueryFactoryImpl.cc
cache/CacheStore.cpp
cache/CacheFSCK.cc
cache/Utils.cpp
@@ -56,10 +51,7 @@
cache/CacheStore.h
cache/CacheFSCK.h
cache/ResolvableQuery.h
-# cache/CapablityQuery.h
-# cache/QueryFactory.h
cache/Utils.h
-# cache/CachedResolvableDataProvider.h
)
#INSTALL( FILES
Modified: trunk/libzypp/zypp2/cache/CacheStore.cpp
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/cache/CacheStore.c…
==============================================================================
--- trunk/libzypp/zypp2/cache/CacheStore.cpp (original)
+++ trunk/libzypp/zypp2/cache/CacheStore.cpp Wed May 30 15:20:25 2007
@@ -184,6 +184,14 @@
_pimpl->con.executenonquery("COMMIT;");
}
+void CacheStore::consumeResObject( const data::RecordId &rid, data::ResObject_Ptr res )
+{
+ appendTranslatedStringAttribute( rid, "ResObject", "description", res->description );
+ appendTranslatedStringAttribute( rid, "ResObject", "summary", res->summary );
+ appendNumericAttribute( rid, "ResObject", "installedSize", res->installedSize );
+ appendNumericAttribute( rid, "ResObject", "buildTime", res->buildTime );
+}
+
void CacheStore::consumePackage( const RecordId &repository_id, data::Package_Ptr package )
{
RecordId pkgid = appendResolvable( repository_id, ResTraits<Package>::kind, NVRA( package->name, package->edition, package->arch ), package->deps );
@@ -298,15 +306,6 @@
// be needed
}
-
-void CacheStore::consumeResObject( const data::RecordId &rid, data::ResObject_Ptr res )
-{
- appendTranslatedStringAttribute( rid, "ResObject", "description", res->description );
- appendTranslatedStringAttribute( rid, "ResObject", "summary", res->summary );
- appendNumericAttribute( rid, "ResObject", "installedSize", res->installedSize );
- appendNumericAttribute( rid, "ResObject", "buildTime", res->buildTime );
-}
-
RecordId CacheStore::appendResolvable( const RecordId &repository_id,
const Resolvable::Kind &kind,
const NVRA &nvra,
Modified: trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repository/cached/…
==============================================================================
--- trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.cc (original)
+++ trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.cc Wed May 30 15:20:25 2007
@@ -12,12 +12,9 @@
#include "zypp/base/Logger.h"
#include "zypp/base/Measure.h"
-
-#include "zypp2/cache/QueryFactory.h"
-#include "zypp2/cache/CapabilityQuery.h"
-#include "zypp2/cache/sqlite_detail/CacheSqlite.h"
+#include "zypp/capability/Capabilities.h"
+#include "zypp2/cache/ResolvableQuery.h"
#include "zypp2/cache/CacheCommon.h"
-#include "zypp2/cache/sqlite_detail/QueryFactoryImpl.h"
#include "zypp/detail/ResImplTraits.h"
#include "zypp/CapFactory.h"
@@ -43,7 +40,8 @@
CachedRepositoryImpl::CachedRepositoryImpl( const Pathname &dbdir, const data::RecordId &repository_id )
: _dbdir(dbdir),
_type_cache(dbdir),
- _repository_id(repository_id)
+ _repository_id(repository_id),
+ _rquery(dbdir)
{
}
@@ -96,7 +94,7 @@
for ( map<data::RecordId, NVRAD>::const_iterator it = nvras.begin(); it != nvras.end(); ++it )
{
- ResImplTraits<CachedRepositoryPackageImpl>::Ptr impl = new CachedRepositoryPackageImpl(selfRepository());
+ ResImplTraits<CachedRepositoryPackageImpl>::Ptr impl = new CachedRepositoryPackageImpl(it->first, this);
Package::Ptr package = detail::makeResolvableFromImpl( it->second, impl );
_store.insert (package);
}
@@ -109,6 +107,12 @@
}
+
+ResolvableQuery CachedRepositoryImpl::resolvableQuery()
+{
+ return _rquery;
+}
+
void CachedRepositoryImpl::read_capabilities( sqlite3_connection &con, map<data::RecordId, NVRAD> &nvras )
{
CapFactory capfactory;
Modified: trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repository/cached/…
==============================================================================
--- trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.h (original)
+++ trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.h Wed May 30 15:20:25 2007
@@ -18,11 +18,9 @@
#include "zypp/data/RecordId.h"
#include "zypp2/repository/RepositoryImpl.h"
#include "zypp/ResStore.h"
-
-#include <sqlite3.h>
#include "zypp2/cache/sqlite3x/sqlite3x.hpp"
-
#include "zypp2/cache/CacheTypes.h"
+#include "zypp2/cache/ResolvableQuery.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -52,6 +50,9 @@
~CachedRepositoryImpl();
public:
+
+ cache::ResolvableQuery resolvableQuery();
+
/** String identifying the type of the source. */
static std::string typeString()
{ return "CachedSource"; }
@@ -88,6 +89,8 @@
cache::CacheTypes _type_cache;
data::RecordId _repository_id;
+
+ cache::ResolvableQuery _rquery;
};
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp2/repository/cached/CachedRepositoryPackageImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repository/cached/…
==============================================================================
--- trunk/libzypp/zypp2/repository/cached/CachedRepositoryPackageImpl.cc (original)
+++ trunk/libzypp/zypp2/repository/cached/CachedRepositoryPackageImpl.cc Wed May 30 15:20:25 2007
@@ -13,13 +13,13 @@
#include "zypp/TranslatedText.h"
#include "zypp/base/String.h"
#include "zypp/base/Logger.h"
-#include "zypp2/cache/CachedResolvableDataProvider.h"
#include "zypp2/repository/RepositoryImpl.h"
#include "CachedRepositoryPackageImpl.h"
using namespace std;
using namespace zypp::detail;
+using zypp::repository::cached::CachedRepositoryImpl;
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -33,61 +33,62 @@
/** Default ctor
*/
-CachedRepositoryPackageImpl::CachedRepositoryPackageImpl (Repository repository_r)
+CachedRepositoryPackageImpl::CachedRepositoryPackageImpl (const data::RecordId &id, repository::cached::CachedRepositoryImpl::Ptr repository_r)
: _repository (repository_r)
, _install_only(false)
, _size_installed(0)
, _size_archive(0)
, _data_loaded(false)
+ , _id(id)
{}
Repository
CachedRepositoryPackageImpl::repository() const
{
- return _repository;
+ return _repository->selfRepository();
}
/** Package summary */
TranslatedText CachedRepositoryPackageImpl::summary() const
{
- return _summary;
+ return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, "ResObject", "summary" );
}
/** Package description */
TranslatedText CachedRepositoryPackageImpl::description() const
{
- return _description;
+ return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, "ResObject", "description" );
}
PackageGroup CachedRepositoryPackageImpl::group() const
{
- return _group;
+ return _repository->resolvableQuery().queryStringAttribute( _id, "Package", "group" );
}
Pathname CachedRepositoryPackageImpl::location() const
{
- return _location;
+ return _repository->resolvableQuery().queryStringAttribute( _id, "Package", "group" );
}
ByteCount CachedRepositoryPackageImpl::size() const
{
- return _size_installed;
+ return _repository->resolvableQuery().queryNumericAttribute( _id, "ResObject", "size" );
}
/** */
ByteCount CachedRepositoryPackageImpl::archivesize() const
{
- return _size_archive;
+ return _repository->resolvableQuery().queryNumericAttribute( _id, "ResObject", "archivesize" );
}
bool CachedRepositoryPackageImpl::installOnly() const
{
- return _install_only;
+ return _repository->resolvableQuery().queryNumericAttribute( _id, "ResObject", "installOnly" );
}
unsigned CachedRepositoryPackageImpl::repositoryMediaNr() const
{
- return _media_nr;
+ return _repository->resolvableQuery().queryNumericAttribute( _id, "ResObject", "repositoryMediaNr" );
}
Vendor CachedRepositoryPackageImpl::vendor() const
Modified: trunk/libzypp/zypp2/repository/cached/CachedRepositoryPackageImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repository/cached/…
==============================================================================
--- trunk/libzypp/zypp2/repository/cached/CachedRepositoryPackageImpl.h (original)
+++ trunk/libzypp/zypp2/repository/cached/CachedRepositoryPackageImpl.h Wed May 30 15:20:25 2007
@@ -13,8 +13,7 @@
#define CachedRepositoryPackageImpl_H
#include "zypp/detail/PackageImpl.h"
-#include "zypp2/Repository.h"
-//#include <sqlite3.h>
+#include "zypp2/repository/cached/CachedRepositoryImpl.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -28,7 +27,7 @@
{
public:
- CachedRepositoryPackageImpl( Repository repository_r );
+ CachedRepositoryPackageImpl( const data::RecordId &id, repository::cached::CachedRepositoryImpl::Ptr repository_r );
virtual TranslatedText summary() const;
virtual TranslatedText description() const;
@@ -42,7 +41,7 @@
virtual Vendor vendor() const;
protected:
- Repository _repository;
+ repository::cached::CachedRepositoryImpl::Ptr _repository;
TranslatedText _summary;
TranslatedText _description;
PackageGroup _group;
@@ -54,6 +53,7 @@
ByteCount _size_archive;
bool _data_loaded;
+ data::RecordId _id;
};
/////////////////////////////////////////////////////////////////
} // namespace zypp
Modified: trunk/libzypp/zypp2/repository/cached/CachedSourcePackageImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repository/cached/…
==============================================================================
--- trunk/libzypp/zypp2/repository/cached/CachedSourcePackageImpl.cc (original)
+++ trunk/libzypp/zypp2/repository/cached/CachedSourcePackageImpl.cc Wed May 30 15:20:25 2007
@@ -15,7 +15,6 @@
#include "zypp/TranslatedText.h"
#include "zypp/base/String.h"
#include "zypp/base/Logger.h"
-#include "zypp2/cache/CachedResolvableDataProvider.h"
using namespace std;
using namespace zypp::detail;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0