]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debmetaindex.cc
merged from mvo
[apt.git] / apt-pkg / deb / debmetaindex.cc
index 9ac659f78730d9cf50acd0badfe945a9e753fe75..f3ab6960cd67d42b32f8e5c37629c88f0e551dce 100644 (file)
@@ -115,6 +115,13 @@ debReleaseIndex::debReleaseIndex(string URI,string Dist)
    this->Type = "deb";
 }
 
    this->Type = "deb";
 }
 
+debReleaseIndex::~debReleaseIndex()
+{
+   for (vector<const debSectionEntry *>::const_iterator I = SectionEntries.begin();
+       I != SectionEntries.end(); I++)
+      delete *I;
+}
+
 vector <struct IndexTarget *>* debReleaseIndex::ComputeIndexTargets() const
 {
    vector <struct IndexTarget *>* IndexTargets = new vector <IndexTarget *>;
 vector <struct IndexTarget *>* debReleaseIndex::ComputeIndexTargets() const
 {
    vector <struct IndexTarget *>* IndexTargets = new vector <IndexTarget *>;
@@ -146,7 +153,16 @@ bool debReleaseIndex::GetIndexes(pkgAcquire *Owner, bool GetAll) const
         new pkgAcqIndex(Owner, (*Target)->URI, (*Target)->Description,
                         (*Target)->ShortDesc, HashString());
       }
         new pkgAcqIndex(Owner, (*Target)->URI, (*Target)->Description,
                         (*Target)->ShortDesc, HashString());
       }
+      // this is normally created in pkgAcqMetaSig, but if we run
+      // in --print-uris mode, we add it here
+      new pkgAcqMetaIndex(Owner, MetaIndexURI("Release"),
+                    MetaIndexInfo("Release"), "Release",
+                    MetaIndexURI("Release.gpg"), 
+                    ComputeIndexTargets(),
+                    new indexRecords (Dist));
+
    }
    }
+
    new pkgAcqMetaSig(Owner, MetaIndexURI("Release.gpg"),
                     MetaIndexInfo("Release.gpg"), "Release.gpg",
                     MetaIndexURI("Release"), MetaIndexInfo("Release"), "Release",
    new pkgAcqMetaSig(Owner, MetaIndexURI("Release.gpg"),
                     MetaIndexInfo("Release.gpg"), "Release.gpg",
                     MetaIndexURI("Release"), MetaIndexInfo("Release"), "Release",