Просмотр исходного кода

* hack around file:/ uri problem when pdiffs are used (needs to be done properly some day :/)

Patches applied:

 * michael.vogt@ubuntu.com--2005/apt--pdiff--0--patch-22
   * hack around local file:/ uri problem
Michael Vogt лет назад: 20
Родитель
Сommit
facac1c52e
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      apt-pkg/acquire-item.cc

+ 5 - 1
apt-pkg/acquire-item.cc

@@ -165,11 +165,15 @@ pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire *Owner,
    CurrentPackagesFile = _config->FindDir("Dir::State::lists");
    CurrentPackagesFile += URItoFileName(RealURI);
 
+   // FIXME: this file:/ check is a hack to prevent fetching
+   //        from local sources. this is really silly, and
+   //        should be fixed cleanly as soon as possible
    if(!FileExists(CurrentPackagesFile) || 
+      Desc.URI.substr(0,strlen("file:/")) == "file:/" ||
       !_config->FindB("Acquire::Diffs",true)) {
       // we don't have a pkg file or we don't want to queue
       if(Debug)
-	 std::clog << "No index file or canceld by user" << std::endl;
+	 std::clog << "No index file, local or canceld by user" << std::endl;
       Failed("", NULL);
       return;
    }