Mailinglist Archive: zypp-commit (185 mails)

< Previous Next >
[zypp-commit] r10769 - in /branches/SuSE-Linux-11_0-Branch/libzypp: package/libzypp.changes zypp/sat/Solvable.cc
  • From: mlandres@xxxxxxxxxxxxxxxx
  • Date: Wed, 06 Aug 2008 16:42:20 -0000
  • Message-id: <20080806164220.4C9B82A01B@xxxxxxxxxxxxxxxx>
Author: mlandres
Date: Wed Aug 6 18:42:19 2008
New Revision: 10769

URL: http://svn.opensuse.org/viewcvs/zypp?rev=10769&view=rev
Log:
- Detect correct download path even if repository type is not set. (bnc #386386)

Modified:
branches/SuSE-Linux-11_0-Branch/libzypp/package/libzypp.changes
branches/SuSE-Linux-11_0-Branch/libzypp/zypp/sat/Solvable.cc

Modified: branches/SuSE-Linux-11_0-Branch/libzypp/package/libzypp.changes
URL:
http://svn.opensuse.org/viewcvs/zypp/branches/SuSE-Linux-11_0-Branch/libzypp/package/libzypp.changes?rev=10769&r1=10768&r2=10769&view=diff
==============================================================================
--- branches/SuSE-Linux-11_0-Branch/libzypp/package/libzypp.changes (original)
+++ branches/SuSE-Linux-11_0-Branch/libzypp/package/libzypp.changes Wed Aug 6
18:42:19 2008
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Wed Aug 6 18:21:30 CEST 2008 ma@xxxxxxx
+
+- Detect correct download path even if repository type
+ is not set. (bnc #386386)
+- revision 10768
+
+-------------------------------------------------------------------
Wed Aug 6 16:15:25 CEST 2008 ma@xxxxxxx

- Don't let exception escape MediaSetAccess dtor (bnc #415017)

Modified: branches/SuSE-Linux-11_0-Branch/libzypp/zypp/sat/Solvable.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/branches/SuSE-Linux-11_0-Branch/libzypp/zypp/sat/Solvable.cc?rev=10769&r1=10768&r2=10769&view=diff
==============================================================================
--- branches/SuSE-Linux-11_0-Branch/libzypp/zypp/sat/Solvable.cc (original)
+++ branches/SuSE-Linux-11_0-Branch/libzypp/zypp/sat/Solvable.cc Wed Aug 6
18:42:19 2008
@@ -20,6 +20,8 @@
#include "zypp/sat/detail/PoolImpl.h"
#include "zypp/sat/Solvable.h"
#include "zypp/sat/Pool.h"
+#include "zypp/sat/LookupAttr.h"
+
#include "zypp/Repository.h"
#include "zypp/OnMediaLocation.h"

@@ -211,12 +213,24 @@
OnMediaLocation ret;

Pathname path;
- if ( repository().info().type().toEnum() == repo::RepoType::YAST2_e )
- {
#warning STILL HARDCODED /suse PREFIX in location
- // (ma@) loading a susetags repo search for a solvable with attribute
- // susetags:datadir. this is the prefix. store it in RepoInfo(?).
- path = "suse";
+ // (ma@) loading a susetags repo search for a solvable with attribute
+ // susetags:datadir. this is the prefix. store it in RepoInfo(?).
+ // (ma@) Just a quick'n'dirty solution as we wan't
+ // to get rid of susetags.
+ static const sat::SolvAttr susetagsDatadir( "susetags:datadir" );
+ switch ( repository().info().type().toEnum() )
+ {
+ case repo::RepoType::NONE_e:
+ if ( sat::LookupAttr( susetagsDatadir, repository() ).empty() )
+ break;
+ // else set type and fall through
+ repository().info().setProbedType( repo::RepoType::YAST2_e );
+ case repo::RepoType::YAST2_e:
+ path = "suse";
+ break;
+ default:
+ break;
}
ret.setLocation ( path/file, medianr );
ret.setDownloadSize( ByteCount( lookupNumAttribute(
SolvAttr::downloadsize ), ByteCount::K ) );

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

< Previous Next >
This Thread
  • No further messages