]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/sourcelist.cc
Consider md5sum no longer a usable hash
[apt.git] / apt-pkg / sourcelist.cc
index b083da936d6ff19ab4c439fff667ec68647ec581..31d87a403a24b711a9a6a7f3d820daaecc3bf03e 100644 (file)
@@ -119,6 +119,12 @@ bool pkgSourceList::Type::ParseStanza(vector<metaIndex *> &List,   /*{{{*/
         Options[m->second.first] = option;
       }
 
+   {
+      std::string entry;
+      strprintf(entry, "%s:%i", Fd.Name().c_str(), i);
+      Options["sourceslist-entry"] = entry;
+   }
+
    // now create one item per suite/section
    string Suite = Tags.FindS("Suites");
    Suite = SubstVar(Suite,"$(ARCH)",_config->Find("APT::Architecture"));
@@ -186,6 +192,11 @@ bool pkgSourceList::Type::ParseLine(vector<metaIndex *> &List,
    // Parse option field if it exists
    // e.g.: [ option1=value1 option2=value2 ]
    map<string, string> Options;
+   {
+      std::string entry;
+      strprintf(entry, "%s:%i", File.c_str(), CurLine);
+      Options["sourceslist-entry"] = entry;
+   }
    if (Buffer != 0 && Buffer[0] == '[')
    {
       ++Buffer; // ignore the [