[zypp-commit] r9957 - in /trunk/libzypp: tests/zypp/RepoManager_test.cc zypp/RepoInfo.cc zypp/Url.cc zypp/Url.h zypp/url/UrlBase.cc zypp/url/UrlBase.h
Author: jreidinger
Date: Tue May 6 14:58:06 2008
New Revision: 9957
URL: http://svn.opensuse.org/viewcvs/zypp?rev=9957&view=rev
Log:
revert isLocal metod and use downloads instead to decide when cache packages.
Modified:
trunk/libzypp/tests/zypp/RepoManager_test.cc
trunk/libzypp/zypp/RepoInfo.cc
trunk/libzypp/zypp/Url.cc
trunk/libzypp/zypp/Url.h
trunk/libzypp/zypp/url/UrlBase.cc
trunk/libzypp/zypp/url/UrlBase.h
Modified: trunk/libzypp/tests/zypp/RepoManager_test.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/zypp/RepoManager_test.cc?rev=9957&r1=9956&r2=9957&view=diff
==============================================================================
--- trunk/libzypp/tests/zypp/RepoManager_test.cc (original)
+++ trunk/libzypp/tests/zypp/RepoManager_test.cc Tue May 6 14:58:06 2008
@@ -146,7 +146,7 @@
repo.setBaseUrl(string("ftp://test.org"));
BOOST_CHECK_MESSAGE( repo.keepPackages(), "ftp scheme is not cached");
repo.setBaseUrl(string("smb://test.org"));
- BOOST_CHECK_MESSAGE( repo.keepPackages(), "smb scheme is not cached");
+ BOOST_CHECK_MESSAGE( !repo.keepPackages(), "smb scheme is cached");
repo.setBaseUrl(string("file:///test.txt"));
BOOST_CHECK_MESSAGE( !repo.keepPackages(), "file scheme is cached");
repo.setBaseUrl(string("http://test.org"));
Modified: trunk/libzypp/zypp/RepoInfo.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoInfo.cc?rev=9957&r1=9956&r2=9957&view=diff
==============================================================================
--- trunk/libzypp/zypp/RepoInfo.cc (original)
+++ trunk/libzypp/zypp/RepoInfo.cc Tue May 6 14:58:06 2008
@@ -13,6 +13,7 @@
#include "zypp/base/Logger.h"
#include "zypp/base/DefaultIntegral.h"
+#include "zypp/media/MediaAccess.h"
#include "zypp/RepoInfo.h"
@@ -148,10 +149,10 @@
{
if ( _pimpl->baseUrls.size()==0 ) //first url
{
- if ( url.isLocal() )
- setKeepPackages(false);
- else
+ if ( media::MediaAccess::downloads( url ) )
setKeepPackages(true);
+ else
+ setKeepPackages(false);
}
_pimpl->baseUrls.insert(url);
Modified: trunk/libzypp/zypp/Url.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Url.cc?rev=9957&r1=9956&r2=9957&view=diff
==============================================================================
--- trunk/libzypp/zypp/Url.cc (original)
+++ trunk/libzypp/zypp/Url.cc Tue May 6 14:58:06 2008
@@ -445,12 +445,6 @@
return m_impl->isValid();
}
- // -----------------------------------------------------------------
- bool
- Url::isLocal() const
- {
- return m_impl->isLocal();
- }
// -----------------------------------------------------------------
std::string
Modified: trunk/libzypp/zypp/Url.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Url.h?rev=9957&r1=9956&r2=9957&view=diff
==============================================================================
--- trunk/libzypp/zypp/Url.h (original)
+++ trunk/libzypp/zypp/Url.h Tue May 6 14:58:06 2008
@@ -259,17 +259,6 @@
bool
isValid() const;
- /**
- * \brief Gets if url uses local network or pc scheme.
- *
- * Looks if url use local network scheme or uses internet
- * scheme like http, ftp, smb.
- *
- * \return True if url uses local network or pc scheme
- */
- bool
- isLocal() const;
-
// -----------------
/**
Modified: trunk/libzypp/zypp/url/UrlBase.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/url/UrlBase.cc?rev=9957&r1=9956&r2=9957&view=diff
==============================================================================
--- trunk/libzypp/zypp/url/UrlBase.cc (original)
+++ trunk/libzypp/zypp/url/UrlBase.cc Tue May 6 14:58:06 2008
@@ -22,7 +22,6 @@
#include
participants (1)
-
jreidinger@svn.opensuse.org