]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debmetaindex.cc
* apt-pkg/contrib/fileutl.cc:
[apt.git] / apt-pkg / deb / debmetaindex.cc
index 94995798f2cfbcef04668641ff18a0ffeddab4e0..f3ab6960cd67d42b32f8e5c37629c88f0e551dce 100644 (file)
@@ -115,6 +115,13 @@ debReleaseIndex::debReleaseIndex(string URI,string Dist)
    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 *>;
@@ -146,7 +153,16 @@ bool debReleaseIndex::GetIndexes(pkgAcquire *Owner, bool GetAll) const
         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",
@@ -224,7 +240,7 @@ class debSLTypeDebian : public pkgSourceList::Type
         // This check insures that there will be only one Release file
         // queued for all the Packages files and Sources files it
         // corresponds to.
-        if ((*I)->GetType() == "deb")
+               if (strcmp((*I)->GetType(), "deb") == 0)
         {
            debReleaseIndex *Deb = (debReleaseIndex *) (*I);
            // This check insures that there will be only one Release file