From 6040f5893a85c0206d3fd234c46a608b87a5e9ac Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 29 Aug 2005 14:57:50 +0000 Subject: * debug support (Debug::pkgAcquire::RRed) for rred method added --- apt-pkg/deb/debindexfile.cc | 15 +++++++++++++++ apt-pkg/deb/debindexfile.h | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index ff8bce85d..3ceeffdca 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -158,6 +158,21 @@ debPackagesIndex::debPackagesIndex(string URI,string Dist,string Section,bool Tr { } /*}}}*/ + +string debPackagesIndex::ArchiveURI(string File) const +{ + // FIXME: Remove as soon as pdiff support is offical + string remap = _config->Find("APT::Diffs::Remap::"+URI,""); + if(!remap.empty()) + { + std::cout << "doing a evil remapping to the URI as requested!\n"; + std::cout << URI << " -> " << remap << std::endl; + return remap+File; + } + + return URI + File; +} + // PackagesIndex::ArchiveInfo - Short version of the archive url /*{{{*/ // --------------------------------------------------------------------- /* This is a shorter version that is designed to be < 60 chars or so */ diff --git a/apt-pkg/deb/debindexfile.h b/apt-pkg/deb/debindexfile.h index a1b9583a4..48a345adf 100644 --- a/apt-pkg/deb/debindexfile.h +++ b/apt-pkg/deb/debindexfile.h @@ -59,7 +59,7 @@ class debPackagesIndex : public pkgIndexFile // Stuff for accessing files on remote items virtual string ArchiveInfo(pkgCache::VerIterator Ver) const; - virtual string ArchiveURI(string File) const {return URI + File;}; + virtual string ArchiveURI(string File) const; // Interface for acquire virtual string Describe(bool Short) const; -- cgit v1.2.3