[maemo-commits] [maemo-commits] r11192 - in projects/haf/trunk/apt: apt-pkg debian

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Apr 23 14:47:33 EEST 2007
Author: marivoll
Date: 2007-04-23 14:47:29 +0300 (Mon, 23 Apr 2007)
New Revision: 11192

Modified:
   projects/haf/trunk/apt/apt-pkg/acquire-item.cc
   projects/haf/trunk/apt/apt-pkg/acquire-item.h
   projects/haf/trunk/apt/apt-pkg/acquire.cc
   projects/haf/trunk/apt/debian/changelog
Log:
apt (0.6.46.4.osso3) unstable; urgency=low

  * Applied gpgvinfo.patch that causes the output of gpgv to be recorded
    in a /var/lib/apt/lists/foo.gpg.info file.  This is used for the trust
    domains in the Hildon Application Manager.

 -- Marius Vollmer <marius.vollmer at nokia.com>  Mon, 23 Apr 2007 14:43:37 +0300


Modified: projects/haf/trunk/apt/apt-pkg/acquire-item.cc
===================================================================
--- projects/haf/trunk/apt/apt-pkg/acquire-item.cc	2007-04-23 11:45:22 UTC (rev 11191)
+++ projects/haf/trunk/apt/apt-pkg/acquire-item.cc	2007-04-23 11:47:29 UTC (rev 11192)
@@ -1025,8 +1025,31 @@
       URItoFileName(RealURI) + ".gpg";
    Rename(SigFile,VerifiedSigFile);
    chmod(VerifiedSigFile.c_str(),0644);
+
+   // Record what gpgv had to say about it
+
+   string SigInfoFile = _config->FindDir("Dir::State::lists") +
+      URItoFileName(RealURI) + ".gpg.info";
+   string GPGVOutput = LookupTag (Message,"GPGVOutput");
+   FILE *f = fopen (SigInfoFile.c_str(), "w");
+   if (f)
+     {
+       fputs (GPGVOutput.c_str(), f);
+       fputc ('\n', f);
+       fclose (f);
+     }
+   else
+     std::cerr << "Can't write info file: "
+	       << SigInfoFile << ": "
+	       << strerror (errno) << "\n";
 }
 
+bool pkgAcqMetaIndex::IsMyFile (string file)
+{
+  return (Item::IsYourFile (file)
+	  || file == flNotDir (DestFile) + ".gpg.info");
+}
+
 void pkgAcqMetaIndex::QueueIndexes(bool verify)
 {
    for (vector <struct IndexTarget*>::const_iterator Target = IndexTargets->begin();

Modified: projects/haf/trunk/apt/apt-pkg/acquire-item.h
===================================================================
--- projects/haf/trunk/apt/apt-pkg/acquire-item.h	2007-04-23 11:45:22 UTC (rev 11191)
+++ projects/haf/trunk/apt/apt-pkg/acquire-item.h	2007-04-23 11:47:29 UTC (rev 11192)
@@ -77,7 +77,9 @@
    virtual string MD5Sum() {return string();};
    pkgAcquire *GetOwner() {return Owner;};
    virtual bool IsTrusted() {return false;};
-   
+   virtual bool IsMyFile(string file)
+     { return file == flNotDir (DestFile); }
+
    Item(pkgAcquire *Owner);
    virtual ~Item();
 };
@@ -231,6 +233,7 @@
 		     pkgAcquire::MethodConfig *Cnf);
    virtual string Custom600Headers();
    virtual string DescURI() {return RealURI; };
+   virtual bool IsMyFile (string file);
 
    pkgAcqMetaIndex(pkgAcquire *Owner,
 		   string URI,string URIDesc, string ShortDesc,

Modified: projects/haf/trunk/apt/apt-pkg/acquire.cc
===================================================================
--- projects/haf/trunk/apt/apt-pkg/acquire.cc	2007-04-23 11:45:22 UTC (rev 11191)
+++ projects/haf/trunk/apt/apt-pkg/acquire.cc	2007-04-23 11:47:29 UTC (rev 11192)
@@ -439,8 +439,8 @@
       // Look in the get list
       ItemCIterator I = Items.begin();
       for (; I != Items.end(); I++)
-	 if (flNotDir((*I)->DestFile) == Dir->d_name)
-	    break;
+	if ((*I)->IsMyFile (Dir->d_name))
+	  break;
       
       // Nothing found, nuke it
       if (I == Items.end())

Modified: projects/haf/trunk/apt/debian/changelog
===================================================================
--- projects/haf/trunk/apt/debian/changelog	2007-04-23 11:45:22 UTC (rev 11191)
+++ projects/haf/trunk/apt/debian/changelog	2007-04-23 11:47:29 UTC (rev 11192)
@@ -1,3 +1,11 @@
+apt (0.6.46.4.osso3) unstable; urgency=low
+
+  * Applied gpgvinfo.patch that causes the output of gpgv to be recorded
+    in a /var/lib/apt/lists/foo.gpg.info file.  This is used for the trust
+    domains in the Hildon Application Manager.
+
+ -- Marius Vollmer <marius.vollmer at nokia.com>  Mon, 23 Apr 2007 14:43:37 +0300
+
 apt (0.6.46.4.osso2) unstable; urgency=low
 
   * Applied gcc3-bug.patch which a long time ago did help against a


More information about the maemo-commits mailing list