소스 검색

* added DDTP::URL-Remap. KILL THIS FEATURE once ddtp support is offical

Michael Vogt 21 년 전
부모
커밋
29998d34c4
1개의 변경된 파일11개의 추가작업 그리고 3개의 파일을 삭제
  1. 11 3
      apt-pkg/deb/debindexfile.cc

+ 11 - 3
apt-pkg/deb/debindexfile.cc

@@ -338,15 +338,23 @@ inline string debTranslationsIndex::IndexFile(const char *Type) const
 string debTranslationsIndex::IndexURI(const char *Type) const
 string debTranslationsIndex::IndexURI(const char *Type) const
 {
 {
    string Res;
    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[Dist.size() - 1] == '/')
    {
    {
       if (Dist != "/")
       if (Dist != "/")
-	 Res = URI + Dist;
+	 Res = theURI + Dist;
       else 
       else 
-	 Res = URI;
+	 Res = theURI;
    }
    }
    else
    else
-      Res = URI + "dists/" + Dist + '/' + Section +
+      Res = theURI + "dists/" + Dist + '/' + Section +
       "/i18n/Translation-";
       "/i18n/Translation-";
    
    
    Res += Type;
    Res += Type;