Mailinglist Archive: zypp-commit (366 mails)

< Previous Next >
[zypp-commit] r9995 - in /trunk/libzypp: package/libzypp.changes zypp/RepoInfo.cc zypp/RepoInfo.h zypp/RepoManager.cc
  • From: mlandres@xxxxxxxxxxxxxxxx
  • Date: Thu, 08 May 2008 16:17:12 -0000
  • Message-id: <20080508161712.DF6BE2DD6C@xxxxxxxxxxxxxxxx>
Author: mlandres
Date: Thu May 8 18:17:12 2008
New Revision: 9995

URL: http://svn.opensuse.org/viewcvs/zypp?rev=9995&view=rev
Log:
Fix failed package download due to unkown repository type (bnc #386386)

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

Modified: trunk/libzypp/package/libzypp.changes
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=9995&r1=9994&r2=9995&view=diff
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Thu May 8 18:17:12 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu May 8 18:13:54 CEST 2008 - ma@xxxxxxx
+
+- Fix failed package download due to unkown repository type (bnc #386386)
+- revision 9995
+
+-------------------------------------------------------------------
Thu May 8 16:33:37 CEST 2008 - ma@xxxxxxx

- Support optional root argument to RepoManagerOptions, to prefix all

Modified: trunk/libzypp/zypp/RepoInfo.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoInfo.cc?rev=9995&r1=9994&r2=9995&view=diff
==============================================================================
--- trunk/libzypp/zypp/RepoInfo.cc (original)
+++ trunk/libzypp/zypp/RepoInfo.cc Thu May 8 18:17:12 2008
@@ -46,6 +46,16 @@
public:
static const unsigned defaultPriority = 99;

+ void setProbedType( const repo::RepoType & t ) const
+ {
+ if ( type == repo::RepoType::NONE
+ && t != repo::RepoType::NONE )
+ {
+ // lazy init!
+ const_cast<Impl*>(this)->type = t;
+ }
+ }
+
public:
bool enabled;
bool autorefresh;
@@ -195,6 +205,9 @@
return *this;
}

+ void RepoInfo::setProbedType( const repo::RepoType &t ) const
+ { _pimpl->setProbedType( t ); }
+
RepoInfo & RepoInfo::setName( const std::string &name )
{
_pimpl->name = name;

Modified: trunk/libzypp/zypp/RepoInfo.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoInfo.h?rev=9995&r1=9994&r2=9995&view=diff
==============================================================================
--- trunk/libzypp/zypp/RepoInfo.h (original)
+++ trunk/libzypp/zypp/RepoInfo.h Thu May 8 18:17:12 2008
@@ -292,6 +292,14 @@
RepoInfo & setType( const repo::RepoType &t );

/**
+ * This allows to adjust the \ref RepoType lazy, from \c NONE to
+ * some probed value, even for const objects.
+ *
+ * This is a NOOP if the current type is not \c NONE.
+ */
+ void setProbedType( const repo::RepoType &t ) const;
+
+ /**
* set the repository name \see name
* \param name
*/

Modified: trunk/libzypp/zypp/RepoManager.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.cc?rev=9995&r1=9994&r2=9995&view=diff
==============================================================================
--- trunk/libzypp/zypp/RepoManager.cc (original)
+++ trunk/libzypp/zypp/RepoManager.cc Thu May 8 18:17:12 2008
@@ -568,6 +568,8 @@

if (repokind.toEnum() != RepoType::NONE_e)
{
+ // Adjust the probed type in RepoInfo
+ info.setProbedType( repokind ); // lazy init!
//save probed type only for repos in system
std::list<RepoInfo> repos = knownRepositories();
for ( std::list<RepoInfo>::const_iterator it = repos.begin();

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

< Previous Next >
This Thread
  • No further messages