Bugs item #1445493, was opened at 2006-03-08 01:31
Message generated for change (Settings changed) made by pmarcu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1445493&group_id=105970

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: light
Group: v3.0
Status: Open
Resolution: None
Priority: 1
Private: No
Submitted By: tcassisi (tcassisi)
>Assigned to: pmarcu (pmarcu)
Summary: HashTable incorrectly filled out for Versioned files

Initial Comment:
In order to force-overwrite of text (i.e.
non-versioned) configuration files in my project, I set
the @DefaultVersion property of the File tag.

This does correctly cause the Version column of the
File Table to be populated with 1.0.

However, WiX still goes ahead and adds a HashTable
entry for this file.

This (correctly) is flagged by the ICEs in ORCA.

The desired behaviour would be to:
a) Ensure that if @DefaultVersion is specified, then
@DefaultLanguage is also specified -- these come as a
pair. A warning would be sufficient if the resultant
table is not going to have the Language column filled
in but only the Version one.

b) Do not solely rely on the source file to determine
if HashTable entries should be generated: also use
@DefaultVersion.



----------------------------------------------------------------------

Comment By: tcassisi (tcassisi)
Date: 2006-03-31 08:34

Message:
Logged In: YES 
user_id=1453673

Email sent to the user group.

----------------------------------------------------------------------

Comment By: Derek (derekc)
Date: 2006-03-08 11:57

Message:
Logged In: YES 
user_id=518766

Interesting - could you start a discussion on this issue on
wix-users (see
http://wix.sourceforge.net/mailinglists.html#wix-users for
more info about this alias).

----------------------------------------------------------------------

Comment By: tcassisi (tcassisi)
Date: 2006-03-08 11:29

Message:
Logged In: YES 
user_id=1453673

>There are likely better ways to solve the scenario you are
>encountering

MSI only handles files as either versioned or unversioned:
there is no 3rd alternative or way to control the overwrite
algorithm directly.  There are tricks that can be played
with Companion files, as well as hacks involving remove file
actions, however, the simplest and cleanest way to force
overwrite a text file (or, indeed, to force downgrade a DLL)
is to modify the Version information in the File table.

This is not a hack: it simply instructs the MSI that the
overwrite algorithm will be the versioned one -- it is the
job of the MSI creator to fill in that information, so where
it comes from is not relevant to the MSI subsequently at
install time.

(Interesting enough the MSI documentation explicitly deals
with the case where version/language is in the source table
but not in the target.)

It makes sense for a low-level flexible MSI creator like WiX
to support such scenarios -- I am merely pointing out that
WiX should try to generate valid MSIs whereever possible:
a) Not fill in msifilehash if file table has version
and 
b) Only allow the pair version/language where appropriate.

>for additional assistance, please contact the
>wix-users alias.

Appologies but i'm a bit new to sourceforge: what is this alias?

Hopefully I will be proved wrong and there is some
acceptable solution to overwriting such files. :)

Thanks.

----------------------------------------------------------------------

Comment By: Derek (derekc)
Date: 2006-03-08 10:54

Message:
Logged In: YES 
user_id=518766

WiX must rely upon the msi APIs to determine whether a file
is versioned or hashed.  This is how msi will determine
which file is the proper one to install during installation
time.  You cannot tell msi to use a particular version or
language for a file if that version or language does not
match what is actually in the file.

The ability to specify default version/language values was
added to allow a very particular scenario in which certain
groups wanted to create an msi file without grabbing any
version, language, or hash information (when the msi is
built to save time) and needed to specify the version for
2-3 files to get the proper installation behavior.  The
scenario is a complete hack and we would never suggest
manually setting language, version, or hash information for
a WiX-created msi file.

There is a bug here: there should be a warning or error when
the user specifies version or language information via
DefaultLanguage/DefaultVersion for a file which msi will
treat as unversioned.

There are likely better ways to solve the scenario you are
encountering - for additional assistance, please contact the
wix-users alias.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1445493&group_id=105970

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to