]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/indexcopy.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 7 Sep 2010 08:02:59 +0000 (10:02 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 7 Sep 2010 08:02:59 +0000 (10:02 +0200)
  - only use trusted.gpg.d directory if it exists
  - do not replace /dev/null when running in APT::CDROM::NoAct
    mode (LP: #612666), thanks to Colin Watson

apt-pkg/indexcopy.cc
debian/changelog

index ed037027c99c37cfb2b6a0c21adbbbe5fa4416e4..f88d51fc54d31efcdb380763fc9386bfe9e1b83a 100644 (file)
@@ -132,9 +132,14 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List,
               (*I).c_str() + CDROM.length(),GetFileName());
       string TargetF = _config->FindDir("Dir::State::lists") + "partial/";
       TargetF += URItoFileName(S);
+      FileFd Target;
       if (_config->FindB("APT::CDROM::NoAct",false) == true)
+      {
         TargetF = "/dev/null";
-      FileFd Target(TargetF,FileFd::WriteAtomic);
+         Target.Open(TargetF,FileFd::WriteExists);
+      } else {
+         Target.Open(TargetF,FileFd::WriteAtomic);
+      }
       FILE *TargetFl = fdopen(dup(Target.Fd()),"w");
       if (_error->PendingError() == true)
         return false;
@@ -673,9 +678,11 @@ bool SigVerify::RunGPGV(std::string const &File, std::string const &FileGPG,
       std::clog << "Keyring path: " << trustedPath << std::endl;
    }
 
-   std::vector<string> keyrings = GetListOfFilesInDir(trustedPath, "gpg", false);
+   std::vector<string> keyrings;
+   if (DirectoryExists(trustedPath))
+     keyrings = GetListOfFilesInDir(trustedPath, "gpg", false, true);
    if (FileExists(trustedFile) == true)
-      keyrings.push_back(trustedFile);
+     keyrings.push_back(trustedFile);
 
    std::vector<const char *> Args;
    Args.reserve(30);
index 667640f982d5475301441d729c55b63eb43d1dfd..b5ff68555ef66ef9f8a7dbf84b4087fc761ec86d 100644 (file)
@@ -1,3 +1,12 @@
+apt (0.8.3) UNRELEASED; urgency=low
+
+  * apt-pkg/indexcopy.cc:
+    - only use trusted.gpg.d directory if it exists
+    - do not replace /dev/null when running in APT::CDROM::NoAct
+      mode (LP: #612666), thanks to Colin Watson
+
+ -- Michael Vogt <mvo@debian.org>  Tue, 07 Sep 2010 10:02:02 +0200
+
 apt (0.8.2) unstable; urgency=low
 
   [ Manpages translations ]