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:
		
							parent
							
								
									09381cccff
								
							
						
					
					
						commit
						aac5fcfbb5
					
				
					 1 changed files with 7 additions and 5 deletions
				
			
		|  | @ -124,15 +124,17 @@ 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; | ||||||
|          | 
 | ||||||
|             XMLOpenElement _(doc, "derivation", xmlAttrs); |             XMLOpenElement _(doc, "derivation", xmlAttrs); | ||||||
| 
 | 
 | ||||||
|             if (drvsSeen.find(e) == drvsSeen.end()) { |             if (drvsSeen.find(e) == drvsSeen.end()) { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue