]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debindexfile.cc
* merged with michael.vogt@ubuntu.com--2005/apt--mvo--0 to be in sync with debian
[apt.git] / apt-pkg / deb / debindexfile.cc
index f26265fff8c1324e103f2c59aca4fefdeb328d6e..b3b77dad71e1021e62e5774191984e9ea5f203a5 100644 (file)
@@ -24,7 +24,7 @@
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/debmetaindex.h>
-    
+
 #include <sys/stat.h>
                                                                        /*}}}*/
 
@@ -158,6 +158,17 @@ debPackagesIndex::debPackagesIndex(string URI,string Dist,string Section,bool Tr
 {
 }
                                                                        /*}}}*/
+
+string debPackagesIndex::ArchiveURI(string File) const
+{
+   // FIXME: EVIL! Remove as soon as pdiff support is offical
+   string remap = _config->Find("APT::URL-Remap::"+URI,"");
+   if(!remap.empty())
+      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 */
@@ -290,7 +301,7 @@ bool debPackagesIndex::Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const
       FileFd Rel(ReleaseFile,FileFd::ReadOnly);
       if (_error->PendingError() == true)
         return false;
-      Parser.LoadReleaseInfo(File,Rel);
+      Parser.LoadReleaseInfo(File,Rel,Section);
    }
    
    return true;