From aac5fcfbb54ff64c593d8919f7f52025415ea996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 9 Apr 2010 21:30:55 +0000 Subject: [PATCH] Re-add `drvPath' and `outPath' attributes to 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". --- src/libexpr/expr-to-xml.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/libexpr/expr-to-xml.cc b/src/libexpr/expr-to-xml.cc index 5857537d7..1e59eebfc 100644 --- a/src/libexpr/expr-to-xml.cc +++ b/src/libexpr/expr-to-xml.cc @@ -124,15 +124,17 @@ static void printTermAsXML(Expr e, XMLWriter & doc, PathSet & context, XMLAttrs xmlAttrs; Path outPath, drvPath; - - a = attrs.get(toATerm("drvPath")); + + aRHS = attrs.get(toATerm("drvPath")); + matchAttrRHS(aRHS, a, pos); if (matchStr(a, drvPath, context)) xmlAttrs["drvPath"] = drvPath; - - a = attrs.get(toATerm("outPath")); + + aRHS = attrs.get(toATerm("outPath")); + matchAttrRHS(aRHS, a, pos); if (matchStr(a, outPath, context)) xmlAttrs["outPath"] = outPath; - + XMLOpenElement _(doc, "derivation", xmlAttrs); if (drvsSeen.find(e) == drvsSeen.end()) {