[maemo-commits] [maemo-commits] r16129 - in projects/haf/trunk/apt: apt-pkg debian
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Mon Sep 15 21:10:46 EEST 2008
- Previous message: [maemo-commits] r16128 - projects/haf/branches/hildon-thumbnail/daemonize/daemon
- Next message: [maemo-commits] r16130 - projects/haf/branches/hildon-thumbnail/daemonize/daemon
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: marivoll Date: 2008-09-15 21:10:45 +0300 (Mon, 15 Sep 2008) New Revision: 16129 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: * Applied gpgvinfo.patch Modified: projects/haf/trunk/apt/apt-pkg/acquire-item.cc =================================================================== --- projects/haf/trunk/apt/apt-pkg/acquire-item.cc 2008-09-15 18:09:39 UTC (rev 16128) +++ projects/haf/trunk/apt/apt-pkg/acquire-item.cc 2008-09-15 18:10:45 UTC (rev 16129) @@ -1022,8 +1022,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::IsMyFile (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 2008-09-15 18:09:39 UTC (rev 16128) +++ projects/haf/trunk/apt/apt-pkg/acquire-item.h 2008-09-15 18:10:45 UTC (rev 16129) @@ -243,6 +243,8 @@ /** \return \b true if this object is being fetched from a trusted source. */ virtual bool IsTrusted() {return false;}; + virtual bool IsMyFile(string file) { return file == flNotDir (DestFile); }; + /** \brief Initialize an item. * * Adds the item to the list of items known to the acquire @@ -748,6 +750,7 @@ pkgAcquire::MethodConfig *Cnf); virtual string Custom600Headers(); virtual string DescURI() {return RealURI; }; + virtual bool IsMyFile (string file); /** \brief Create a new pkgAcqMetaIndex. */ pkgAcqMetaIndex(pkgAcquire *Owner, Modified: projects/haf/trunk/apt/apt-pkg/acquire.cc =================================================================== --- projects/haf/trunk/apt/apt-pkg/acquire.cc 2008-09-15 18:09:39 UTC (rev 16128) +++ projects/haf/trunk/apt/apt-pkg/acquire.cc 2008-09-15 18:10:45 UTC (rev 16129) @@ -436,8 +436,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 2008-09-15 18:09:39 UTC (rev 16128) +++ projects/haf/trunk/apt/debian/changelog 2008-09-15 18:10:45 UTC (rev 16129) @@ -4,6 +4,7 @@ * Applied postrip.patch * Applied notdebian.patch * Applied http-tablet-identification.patch + * Applied gpgvinfo.patch -- Marius Vollmer <marius.vollmer at nokia.com> Mon, 15 Sep 2008 19:50:25 +0300
- Previous message: [maemo-commits] r16128 - projects/haf/branches/hildon-thumbnail/daemonize/daemon
- Next message: [maemo-commits] r16130 - projects/haf/branches/hildon-thumbnail/daemonize/daemon
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]