Author: jkupec Date: Thu Jul 24 19:34:16 2008 New Revision: 10662 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10662&view=rev Log: - fixed to work with _path Modified: trunk/libzypp/zypp/repo/yum/Downloader.cc Modified: trunk/libzypp/zypp/repo/yum/Downloader.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/yum/Downloader.cc?rev=10662&r1=10661&r2=10662&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/yum/Downloader.cc (original) +++ trunk/libzypp/zypp/repo/yum/Downloader.cc Thu Jul 24 19:34:16 2008 @@ -43,11 +43,25 @@ return RepoStatus(repomd); } +static OnMediaLocation +loc_with_path_prefix(const OnMediaLocation & loc, + const Pathname & prefix) +{ + if (prefix.empty() || prefix == "/") + return loc; + + OnMediaLocation loc_with_path(loc); + loc_with_path.setFilename(prefix / loc.filename()); + return loc_with_path; +} + + bool Downloader::patches_Callback( const OnMediaLocation &loc, const string &id ) { - MIL << id << " : " << loc << endl; - this->enqueueDigested(loc); + OnMediaLocation loc_with_path(loc_with_path_prefix(loc, _path)); + MIL << id << " : " << loc_with_path << endl; + this->enqueueDigested(loc_with_path); return true; } @@ -55,7 +69,8 @@ bool Downloader::repomd_Callback( const OnMediaLocation &loc, const ResourceType &dtype ) { - MIL << dtype << " : " << loc << endl; + OnMediaLocation loc_with_path(loc_with_path_prefix(loc, _path)); + MIL << dtype << " : " << loc_with_path << endl; //! \todo do this through a ZConfig call so that it is always in sync with parser // skip other @@ -71,7 +86,7 @@ return true; } - this->enqueueDigested(loc); + this->enqueueDigested(loc_with_path); // We got a patches file we need to read, to add patches listed // there, so we transfer what we have in the queue, and -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org