Re-add drvPath' and outPath' attributes to <derivation> XML nodes.

This fixes a regression introduced in r20882 ("Add source location
information to the XML output.").

* src/libexpr/expr-to-xml.cc (nix::printTermAsXML): Dereference the
  attribute RHS from "drvPath" and "outPath".
This commit is contained in:
Ludovic Courtès 2010-04-09 21:30:55 +00:00
parent 09381cccff
commit aac5fcfbb5

View file

@ -125,11 +125,13 @@ static void printTermAsXML(Expr e, XMLWriter & doc, PathSet & context,
XMLAttrs xmlAttrs; XMLAttrs xmlAttrs;
Path outPath, drvPath; Path outPath, drvPath;
a = attrs.get(toATerm("drvPath")); aRHS = attrs.get(toATerm("drvPath"));
matchAttrRHS(aRHS, a, pos);
if (matchStr(a, drvPath, context)) if (matchStr(a, drvPath, context))
xmlAttrs["drvPath"] = drvPath; xmlAttrs["drvPath"] = drvPath;
a = attrs.get(toATerm("outPath")); aRHS = attrs.get(toATerm("outPath"));
matchAttrRHS(aRHS, a, pos);
if (matchStr(a, outPath, context)) if (matchStr(a, outPath, context))
xmlAttrs["outPath"] = outPath; xmlAttrs["outPath"] = outPath;