]> git.saurik.com Git - apt-legacy.git/blobdiff - methods/gpgv.cc
Upgraded to APT 0.7.
[apt-legacy.git] / methods / gpgv.cc
index d0081ab78608b4d4adae31e3ab101c4267079033..9f4683e6e05f2522a6934faaccb6e0de15c4f5dd 100644 (file)
@@ -1,7 +1,3 @@
-extern "C" {
-    #include <mach-o/nlist.h>
-}
-
 #include <apt-pkg/error.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/strutl.h>
@@ -87,6 +83,7 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
       Args[i++] = gpgvpath.c_str();
       Args[i++] = "--status-fd";
       Args[i++] = "3";
+      Args[i++] = "--ignore-time-conflict";
       Args[i++] = "--keyring";
       Args[i++] = pubringpath.c_str();
 
@@ -125,9 +122,9 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
       // Redirect the pipe to the status fd (3)
       dup2(fd[1], 3);
 
-      putenv("LANG=");
-      putenv("LC_ALL=");
-      putenv("LC_MESSAGES=");
+      putenv((char *)"LANG=");
+      putenv((char *)"LC_ALL=");
+      putenv((char *)"LC_MESSAGES=");
       execvp(gpgvpath.c_str(), (char **)Args);
              
       exit(111);
@@ -214,7 +211,7 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
    }
    else if (WEXITSTATUS(status) == 111)
    {
-      ioprintf(ret, _("Could not execute '%s' to verify signature (is gnupg installed?)"), gpgvpath.c_str());
+      ioprintf(ret, _("Could not execute '%s' to verify signature (is gpgv installed?)"), gpgvpath.c_str());
       return ret.str();
    }
    else
@@ -270,23 +267,6 @@ bool GPGVMethod::Fetch(FetchItem *Itm)
         return _error->Error(errmsg.c_str());
    }
       
-   // Transfer the modification times
-   struct stat Buf;
-   if (stat(Path.c_str(),&Buf) != 0)
-      return _error->Errno("stat",_("Failed to stat %s"), Path.c_str());
-
-   struct utimbuf TimeBuf;
-   TimeBuf.actime = Buf.st_atime;
-   TimeBuf.modtime = Buf.st_mtime;
-   if (utime(Itm->DestFile.c_str(),&TimeBuf) != 0)
-      return _error->Errno("utime",_("Failed to set modification time"));
-
-   if (stat(Itm->DestFile.c_str(),&Buf) != 0)
-      return _error->Errno("stat",_("Failed to stat"));
-   
-   // Return a Done response
-   Res.LastModified = Buf.st_mtime;
-   Res.Size = Buf.st_size;
    // Just pass the raw output up, because passing it as a real data
    // structure is too difficult with the method stuff.  We keep it
    // as three separate vectors for future extensibility.
@@ -306,13 +286,6 @@ bool GPGVMethod::Fetch(FetchItem *Itm)
 
 int main()
 {
-   struct nlist nl[2];
-   memset(nl, 0, sizeof(nl));
-   nl[0].n_un.n_name = (char *) "_useMDNSResponder";
-   nlist("/usr/lib/libc.dylib", nl);
-   if (nl[0].n_type != N_UNDF)
-       *(int *) nl[0].n_value = 0;
-
    setlocale(LC_ALL, "");
    
    GPGVMethod Mth;