ref: refs/heads/master
commit bffaf00f8d31d068ee39909d8ca12fd240faebad
Author: Michael Andres
Date: Tue Mar 31 15:48:39 2009 +0200
Use repositories subpriority to tell the solver about media preferences.
---
zypp/Repository.cc | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/zypp/Repository.cc b/zypp/Repository.cc
index 7e880af..31decf0 100644
--- a/zypp/Repository.cc
+++ b/zypp/Repository.cc
@@ -17,6 +17,7 @@
#include "zypp/AutoDispose.h"
#include "zypp/Pathname.h"
+#include "zypp/media/MediaPriority.h"
#include "zypp/sat/detail/PoolImpl.h"
#include "zypp/Repository.h"
@@ -199,8 +200,10 @@ namespace zypp
// satsolver priority is based on '<', while yum's repoinfo
// uses 1(highest)->99(lowest). Thus we use -info_r.priority.
_repo->priority = -info_r.priority();
- // subpriority could be used to e.g. prefer http over dvd iff both have same priority.
- // _repo->subpriority = 0;
+
+ // subpriority is used to e.g. prefer http over dvd iff
+ // both have same priority.
+ _repo->subpriority = media::MediaPriority( info_r.url() );
}
void Repository::clearInfo()
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org