]> git.saurik.com Git - apt.git/commitdiff
* added DDTP::URL-Remap. KILL THIS FEATURE once ddtp support is offical
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 27 Sep 2005 22:52:45 +0000 (22:52 +0000)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 27 Sep 2005 22:52:45 +0000 (22:52 +0000)
apt-pkg/deb/debindexfile.cc

index 38ecdd16af5249adb44f96d124aa48d792f5b430..e2ed868902d6bd6fbba6c0b71acc556ecade5f47 100644 (file)
@@ -338,15 +338,23 @@ inline string debTranslationsIndex::IndexFile(const char *Type) const
 string debTranslationsIndex::IndexURI(const char *Type) const
 {
    string Res;
+
+   string theURI = URI;
+   // FIXME: EVIL! Remove as soon as pdiff support is offical
+   string remap = _config->Find("DDTP::URL-Remap::"+URI,"");
+   if(!remap.empty())
+      theURI = remap;
+
+
    if (Dist[Dist.size() - 1] == '/')
    {
       if (Dist != "/")
-        Res = URI + Dist;
+        Res = theURI + Dist;
       else 
-        Res = URI;
+        Res = theURI;
    }
    else
-      Res = URI + "dists/" + Dist + '/' + Section +
+      Res = theURI + "dists/" + Dist + '/' + Section +
       "/i18n/Translation-";
    
    Res += Type;