After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 745913 - wixl-heat misses a close wix tag when no component group are specified
wixl-heat misses a close wix tag when no component group are specified
Status: RESOLVED FIXED
Product: msitools
Classification: Other
Component: wixl
0.93
Other Mac OS
: Normal normal
: 1.0
Assigned To: msitools maintainer(s)
msitools maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-03-09 18:42 UTC by Alex Tsay
Modified: 2015-03-10 01:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix for 745913 (1020 bytes, patch)
2015-03-10 00:55 UTC, Alex Tsay
accepted-commit_now Details | Review

Description Alex Tsay 2015-03-09 18:42:36 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.
Comment 1 Marc-Andre Lureau 2015-03-09 19:35:47 UTC
Hi Alex, thanks for the bug report.

Would you like to provide a patch?
Comment 2 Alex Tsay 2015-03-09 19:37:58 UTC
(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.
Comment 3 Alex Tsay 2015-03-10 00:55:01 UTC
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.
Comment 4 Marc-Andre Lureau 2015-03-10 01:26:04 UTC
Review of attachment 298936 [details] [review]:

ack
Comment 5 Marc-Andre Lureau 2015-03-10 01:43:45 UTC
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.