From 23d0bcc2017dd77a8b7ab2bd1aa80c4643b156db Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Thu, 7 Feb 2008 04:10:29 +0000 Subject: [PATCH] And now use the new lookupLocation function to get the media path. With the added hack of prepending "suse/" I can now actually install a package and it indeed downloads the right rpm. I've only tried dry mode, so no actual installation happens. It seems as if installing just one package doesn't really trigger a solver run, though (the dependencies don't seem to be marked as to-install). Due to the hack with the hard-coded datadir this only works when the package comes from a susetags repo (the others don't yet have media locations anyway). --- zypp/Package.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zypp/Package.cc b/zypp/Package.cc index 313a7b5..723ad1a 100644 --- a/zypp/Package.cc +++ b/zypp/Package.cc @@ -106,7 +106,12 @@ namespace zypp OnMediaLocation Package::location() const { OnMediaLocation loc; - loc.setLocation(lookupStrAttribute( sat::SolvAttr::mediafile )); + unsigned medianr; + std::string filename = lookupLocation( medianr ); + /* XXX someone else needs to do this prepending of the datadir. + It's not necessarily "suse". */ + filename = "suse/" + filename; + loc.setLocation(filename, medianr); return loc; } -- 2.7.4