commit ab71594a65d907620f9a6415a9acc214f7a0229f
Author: Michael Andres
Date: Tue Jan 27 13:21:41 2009 +0100
Respect content-file DATDIR when downloading packages. (bnc #468612)
---
zypp/sat/Solvable.cc | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/zypp/sat/Solvable.cc b/zypp/sat/Solvable.cc
index 886979c..dae6d9f 100644
--- a/zypp/sat/Solvable.cc
+++ b/zypp/sat/Solvable.cc
@@ -211,22 +211,28 @@ namespace zypp
OnMediaLocation ret;
Pathname path;
-#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(?).
- // (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 );
+ {
+ sat::LookupAttr datadir( susetagsDatadir, repository() );
+ if ( ! datadir.empty() )
+ {
+ repository().info().setProbedType( repo::RepoType::YAST2_e );
+ path = datadir.begin().asString();
+ }
+ path = datadir.empty() ? "suse" : datadir.begin().c_str();
+ }
+ break;
+
case repo::RepoType::YAST2_e:
- path = "suse";
+ {
+ sat::LookupAttr datadir( susetagsDatadir, repository() );
+ path = datadir.empty() ? "suse" : datadir.begin().c_str();
+ }
break;
+
default:
break;
}
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org