Mailinglist Archive: zypp-commit (223 mails)

< Previous Next >
[zypp-commit] r10662 - /trunk/libzypp/zypp/repo/yum/Downloader.cc
  • From: jkupec@xxxxxxxxxxxxxxxx
  • Date: Thu, 24 Jul 2008 17:34:16 -0000
  • Message-id: <20080724173417.577E956F6F@xxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages