Mailinglist Archive: zypp-commit (223 mails)

< Previous Next >
[zypp-commit] r10525 - in /trunk/libzypp: package/libzypp.changes zypp/RepoManager.cc zypp/RepoStatus.cc zypp/RepoStatus.h
  • From: mlandres@xxxxxxxxxxxxxxxx
  • Date: Wed, 09 Jul 2008 11:24:03 -0000
  • Message-id: <20080709112403.3CD862F10B@xxxxxxxxxxxxxxxx>
Author: mlandres
Date: Wed Jul 9 13:24:02 2008
New Revision: 10525

URL: http://svn.opensuse.org/viewcvs/zypp?rev=10525&view=rev
Log:
- A missing cookie file must not be treated as an error. Simply
rebuild the cache (bnc #405867)

Modified:
trunk/libzypp/package/libzypp.changes
trunk/libzypp/zypp/RepoManager.cc
trunk/libzypp/zypp/RepoStatus.cc
trunk/libzypp/zypp/RepoStatus.h

Modified: trunk/libzypp/package/libzypp.changes
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=10525&r1=10524&r2=10525&view=diff
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Wed Jul 9 13:24:02 2008
@@ -1,8 +1,10 @@
-------------------------------------------------------------------
-Wed Jul 9 12:13:58 CEST 2008 - ma@xxxxxxx
+Wed Jul 9 13:13:58 CEST 2008 - ma@xxxxxxx

- Provide Package::url() if available in solv file. (bnc #402434)
-- revision 10523
+- A missing cookie file must not be treated as an error. Simply
+ rebuild the cache (bnc #405867)
+- revision 10525

-------------------------------------------------------------------
Mon Jul 7 13:39:09 CEST 2008 - schubi@xxxxxxx

Modified: trunk/libzypp/zypp/RepoManager.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.cc?rev=10525&r1=10524&r2=10525&view=diff
==============================================================================
--- trunk/libzypp/zypp/RepoManager.cc (original)
+++ trunk/libzypp/zypp/RepoManager.cc Wed Jul 9 13:24:02 2008
@@ -253,7 +253,7 @@
RepoManagerOptions options;

RepoSet repos;
-
+
ServiceSet services;

public:
@@ -265,10 +265,10 @@
}

void saveService( const Service& service ) const;
-
+
Pathname generateNonExistingName( const Pathname &dir,
const std::string &basefilename )
const;
-
+
std::string generateFilename( const RepoInfo &info ) const;
std::string generateFilename( const Service &info ) const;

@@ -753,7 +753,6 @@
if ( isCached( info ) )
{
MIL << info.alias() << " is already cached." << endl;
- //data::RecordId id = store.lookupRepository(info.alias());
RepoStatus cache_status = cacheStatus(info);

if ( cache_status.checksum() == raw_metadata_status.checksum() )
@@ -1334,7 +1333,7 @@
info.setBaseUrl(url);
ZYPP_THROW(RepoNotFoundException(info));
}
-
+
void RepoManager::addService( const std::string& name, const Url& url )
{
addService( Service(name,url) );
@@ -1396,7 +1395,7 @@
}

//now remove all repositories added by this service
- getRepositoriesInService( name,
+ getRepositoriesInService( name,

boost::make_function_output_iterator(bind(&RepoManager::removeRepository, this,
_1, ProgressData::ReceiverFnc()) ) );
}

@@ -1483,7 +1482,7 @@

//compare old and new repositories (hope not to much, if it change
// then construct set and use set operation on it)
-
+
std::list<RepoInfo> oldRepos;
getRepositoriesInService(service.name(),
insert_iterator<std::list<RepoInfo> >
@@ -1585,7 +1584,7 @@
str::regex allowedServiceExt("^\\.service(_[0-9]+)?$");
for_(it, entries.begin(), entries.end() )
{
- parser::ServiceFileReader reader(*it,
+ parser::ServiceFileReader reader(*it,
bind(&ServiceCollector::collect, collector, _1) );
}
}

Modified: trunk/libzypp/zypp/RepoStatus.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoStatus.cc?rev=10525&r1=10524&r2=10525&view=diff
==============================================================================
--- trunk/libzypp/zypp/RepoStatus.cc (original)
+++ trunk/libzypp/zypp/RepoStatus.cc Wed Jul 9 13:24:02 2008
@@ -11,10 +11,8 @@
*/
#include <iostream>
#include <sstream>
-#include <vector>
-#include <algorithm>
#include <fstream>
-//#include "zypp/base/Logger.h"
+#include "zypp/base/Logger.h"
#include "zypp/base/String.h"
#include "zypp/RepoStatus.h"
#include "zypp/PathInfo.h"
@@ -84,13 +82,13 @@

RepoStatus RepoStatus::fromCookieFile( const Pathname &cookiefile )
{
- RepoStatus status;
-
std::ifstream file(cookiefile.c_str());
if (!file) {
- ZYPP_THROW (Exception( "Can't open " + cookiefile.asString() ) );
+ WAR << "No cookie file " << cookiefile << endl;
+ return RepoStatus();
}

+ RepoStatus status;
std::string buffer;
file >> buffer;
status.setChecksum(buffer);

Modified: trunk/libzypp/zypp/RepoStatus.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoStatus.h?rev=10525&r1=10524&r2=10525&view=diff
==============================================================================
--- trunk/libzypp/zypp/RepoStatus.h (original)
+++ trunk/libzypp/zypp/RepoStatus.h Wed Jul 9 13:24:02 2008
@@ -39,15 +39,16 @@
friend std::ostream & operator<<( std::ostream & str, const RepoStatus &
obj );

public:
-
+
/**
* reads the status from a file which contains the
* checksum and timestamp in each line.
*
- * \throws Exception If the file is not valid or accessible
+ * \returns An empty \ref RepoStatus if the file does not
+ * exist or is not readable.
*/
static RepoStatus fromCookieFile( const Pathname &path );
-
+
/**
* save the status information to a cookie file
* \throws Exception if the file can't be saved
@@ -61,14 +62,14 @@
* in any way is sufficient.
*/
std::string checksum() const;
-
+
/**
* timestamp of the repository. If the repository
* changes, it has to be updated as well with the
* new timestamp.
*/
Date timestamp() const;
-
+
/**
* \short Is the status empty?
*
@@ -82,7 +83,7 @@
* \param checksum
*/
RepoStatus & setChecksum( const std::string &checksum );
-
+
/**
* set the repository timestamp \see timestamp
* \param timestamp
@@ -95,7 +96,7 @@
public:
/** Default ctor */
RepoStatus();
-
+
/**
* \short Status from a single file
* As most repository state is represented
@@ -106,7 +107,7 @@
* file will result in an empty status
*/
RepoStatus( const Pathname &file );
-
+
/** Dtor */
~RepoStatus();


--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages