GNOME Bugzilla – Bug 745913
wixl-heat misses a close wix tag when no component group are specified
Last modified: 2015-03-10 01:43:45 UTC
Overview: When using wixl-heat to harvest a directory while not specifying any component group, the generated .wxs does not close the Wix tag. Steps to Reproduce: - Prepare a simple directory to harvest, say a directory foo and a file foo/bar. - Run the following command to harvest the directory: `find foo | wixl-heat --prefix foo/` Expected Result: A well-formed XML document with balanced tags. Actual Result: A XML document with an open Wix tag and no matching close Wix tag. Guess: A suspicious line at tools/wixl/wixl-heat.vala [116-124]: 116 if (cg != null) { 117 stdout.printf (" <Fragment>\n"); 118 stdout.printf (" <ComponentGroup Id=\"%s\">\n".printf (cg)); 119 foreach (var id in cmpref) 120 stdout.printf (" <ComponentRef Id=\"%s\"/>\n".printf (id)); 121 stdout.printf (" </ComponentGroup>\n"); 122 stdout.printf (" </Fragment>\n"); 123 stdout.printf ("</Wix>\n"); 124 } As the code fragment revealed, the close Wix tag is only generated if a component group is provided.
Hi Alex, thanks for the bug report. Would you like to provide a patch?
(In reply to Marc-Andre Lureau from comment #1) > Hi Alex, thanks for the bug report. > > Would you like to provide a patch? Hi Marc-André, Yes. I intend to file patches for all bugs I've reported, and I'll do so as soon as I get a dev environment set up.
Created attachment 298936 [details] [review] Fix for 745913 Here's a proposed patch set. I've tried running the included test suite. However, test case #20 was broken on master for me and remains broken after this patch.
Review of attachment 298936 [details] [review]: ack
I fixed the make check. committed: commit 683827dceb5697140283ac32c8b8825ab7422641 Author: Alex Tsay <alex@aerofs.com> Date: Mon Mar 9 17:45:15 2015 -0700 wixl-heat: fix wix close tag when no component groups are specified. See https://bugzilla.gnome.org/show_bug.cgi?id=745913 for details.