[Bug 35504] LibreOffice 4.2 installer copies MSVC++ runtime files into erroneous 'C: \Win\System\' path (directory targets/ properties not re-resolved after updates from custom actions)
wine-bugs at winehq.org
wine-bugs at winehq.org
Sat May 5 13:47:26 CDT 2018
https://bugs.winehq.org/show_bug.cgi?id=35504
Anastasius Focht <focht at gmx.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|LibreOffice installation |LibreOffice 4.2 installer
|creates two wrong files |copies MSVC++ runtime files
| |into erroneous
| |'C:\Win\System\' path
| |(directory
| |targets/properties not
| |re-resolved after updates
| |from custom actions)
CC| |focht at gmx.net
--- Comment #8 from Anastasius Focht <focht at gmx.net> ---
Hello folks,
confirming.
In short: It's another problem of not re-evaluating TARGETDIR childs when
modifications have been done via custom actions in between 'InstallUISequence'
and 'InstallExecuteSequence'
'LibreOffice_4.2.8.2_Win_x86.msi'
Relevant part of 'InstallUISequence' tabled dumped with ORCA:
--- snip ---
...
LaunchConditions 50
SetupInitialization 100
Shellextensionsdll5 Not REMOVE="ALL" And Not PATCH 148
FindRelatedProducts 150
CheckVersions NOT Installed 158
NewProductFound NEWPRODUCTS 160
SameProductFound SAMEPRODUCTS 170
CCPSearch CCP_TEST 250
RMCCPSearch Not CCP_SUCCESS And CCP_TEST 300
ValidateProductID 350
CompleteInstallPath Not REMOVE="ALL" And Not PATCH 396
MigrateInstallPath Not REMOVE="ALL" And Not PATCH 398
CostInitialize 400
FileCost 450
IsolateComponents 500
setUserProfile 510
setAllUsersProfile 512
ResolveSource Not Installed And Not PATCH 525
CostFinalize 550
ISInitAllUsers VersionNT And NOT Installed And Privileged 575
SelectLanguage NOT Installed 598
MigrateFeatureStates 600
PatchWelcome Installed And PATCH And Not IS_MAJOR_UPGRADE 625
InstallWelcome Not Installed 650
SetupResume Installed And (RESUME Or Preselected) And Not PATCH 700
MaintenanceWelcome Installed And Not RESUME And Not Preselected And Not
PATCH 750
SetupProgress 800
ExecuteAction 850
...
--- snip ---
Relevant part of 'InstallExecuteSequence' table dumped with ORCA:
--- snip ---
...
LaunchConditions 50
Shellextensionsdll5 Not REMOVE="ALL" And Not PATCH 98
FindRelatedProducts NOT ISSETUPDRIVEN 100
CheckInstallDirectory Not Installed 106
CheckVersions NOT Installed 108
NewProductFound NEWPRODUCTS 110
SameProductFound SAMEPRODUCTS 120
qslnkmsidll REMOVE="ALL" And Not PATCH 196
sdqsmsidll 198
CCPSearch CCP_TEST 200
RMCCPSearch Not CCP_SUCCESS And CCP_TEST 250
RenamePrgFolder VersionNT >= 600 And OLDPRODUCTS And Not REMOVE="ALL" And
Not PATCH 298
ValidateProductID 300
CompleteInstallPath Not REMOVE="ALL" And Not PATCH 346
MigrateInstallPath Not REMOVE="ALL" And Not PATCH 348
CA_WindowsFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2 349
CA_SystemFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2 349
CostInitialize 350
FileCost 400
IsolateComponents 450
Regallmsdocdll Not REMOVE="ALL" And Not PATCH And _IsSetupTypeMin<>"Custom"
498
CostFinalize 500
ISInitAllUsers VersionNT And NOT Installed And Privileged 525
...
--- snip ---
Relevant part of 'Directory' table dumped with ORCA:
--- snip ---
Directory Directory_Parent DefaultDir
ProgramFilesFolder TARGETDIR .
LO4_share_confi_soffi_modul_smath_fcabe2bf6
LO4_share_confi_soffi_modul_e3ff72cac smath
CommonFilesFolder TARGETDIR .
SystemFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2
WindowsFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2 System
WindowsFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2 TARGETDIR Win
CommonAppDataFolder TARGETDIR .
...
--- snip ---
Relevant part of 'CustomAction' table dumped with ORCA:
--- snip ---
...
CA_WindowsFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2 51
WindowsFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2 [WindowsFolder]
CA_SystemFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2 51
SystemFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2 [SystemFolder]
...
--- snip ---
Relevant part of trace log, 'InstallUISequence':
--- snip ---
...
002e:trace:msi:ACTION_PerformAction Performing action (L"CostInitialize")
...
002e:trace:msi:ACTION_CostFinalize Building directory properties
002e:trace:msi:msi_resolve_target_folder resolving L"TARGETDIR"
...
002e:trace:msi:msi_set_property 0x153950
L"WindowsFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" L"C:\\Win\\" -1
002e:trace:msi:msi_get_property 0x153950
L"WindowsFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" (nil) 0x32f548
...
002e:trace:msi:msi_set_property 0x153950
L"SystemFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2"
L"C:\\Win\\System\\" -1
002e:trace:msi:msi_get_property 0x153950
L"SystemFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" (nil) 0x32f4f8
...
002e:trace:msi:msi_resolve_target_folder
L"SystemFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" resolves to
L"C:\\Win\\System\\"
002e:trace:msi:msi_resolve_target_folder
L"WindowsFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" resolves to
L"C:\\Win\\"
...
002e:trace:msi:ACTION_CostFinalize Evaluating component conditions
...
--- snip ---
Two custom actions running in 'InstallExecuteSequence' which set directory
properties to proper values, effectively invalidating paths from already
resolved directory childs.
--- snip ---
...
002e:trace:msi:ACTION_CustomAction Handling custom action
L"CA_WindowsFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" (33
L"WindowsFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2"
L"[WindowsFolder]")
...
002e:trace:msi:msi_get_property returning L"C:\\windows\\" for property
L"WindowsFolder"
...
002e:trace:msi:msi_set_property 0x153950
L"WindowsFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" L"C:\\windows\\"
11
002e:trace:msi:msi_get_property 0x153950
L"WindowsFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" (nil) 0x32f4b8
...
002e:Call KERNEL32.WideCharToMultiByte(00000000,00000000,009b94e0 L"Action
ended 6:06:00: CA_WindowsFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2.
Return value 1.",ffffffff,00000000,00000000,00000000,00000000) ret=7ebdd213
...
002e:trace:msi:ACTION_CustomAction Handling custom action
L"CA_SystemFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" (33
L"SystemFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" L"[SystemFolder]")
...
002e:trace:msi:msi_get_property returning L"C:\\windows\\system32\\" for
property L"SystemFolder"
...
002e:trace:msi:msi_set_property 0x153950
L"SystemFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2"
L"C:\\windows\\system32\\" 20
002e:trace:msi:msi_get_property 0x153950
L"SystemFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" (nil) 0x32f4b8
...
002e:Call KERNEL32.WideCharToMultiByte(00000000,00000000,009b9648 L"Action
ended 6:06:00: CA_SystemFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2.
Return value 1.",ffffffff,009b9450,00000063,00000000,00000000) ret=7ebdd241
...
--- snip ---
But this has no effect because the child properties are not re-evaluated due to
TARGETDIR parent already resolved (value not changed), leading to this strange
install path later.
--- snip ---
...
002e:trace:msi:ACTION_CostFinalize Building directory properties
002e:trace:msi:msi_resolve_target_folder resolving L"TARGETDIR"
...
002e:trace:msi:msi_resolve_target_folder L"TARGETDIR" already resolved to
L"C:\\"
002e:Call ntdll.RtlFreeHeap(00110000,00000000,009b9e50) ret=7eb86842
002e:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7eb86842
002e:trace:msi:ACTION_CostFinalize Evaluating component conditions
002e:trace:msi:MSI_EvaluateConditionW (null)
002e:trace:msi:MSI_EvaluateConditionW (null)
002e:trace:msi:MSI_EvaluateConditionW (null)
002e:trace:msi:MSI_EvaluateConditionW (null)
002e:trace:msi:MSI_EvaluateConditionW (null)
002e:trace:msi:MSI_EvaluateConditionW (null)
002e:trace:msi:MSI_EvaluateConditionW (null)
002e:trace:msi:MSI_EvaluateConditionW (null)
002e:trace:msi:MSI_EvaluateConditionW (null)
002e:trace:msi:MSI_EvaluateConditionW (null)
...
002e:trace:msi:msi_resolve_target_folder
L"SystemFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" resolves to
L"C:\\Win\\System\\"
002e:trace:msi:msi_resolve_target_folder
L"WindowsFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" resolves to
L"C:\\Win\\"
002e:trace:msi:msi_resolve_target_folder resolving L"CommonAppDataFolder"
002e:trace:msi:msi_get_property 0x153950 L"CommonAppDataFolder" (nil) 0x32f554
...
002e:trace:msi:ACTION_CostFinalize Calculating file cost
...
002e:trace:msi:set_target_path file
L"F_CENTRAL_msvcp100_x86.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" resolves to
L"C:\\Win\\System\\msvcp100.dll"
002e:Call KERNEL32.GetFileAttributesW(01c294a8
L"C:\\Win\\System\\msvcp100.dll") ret=7eb8b028
002e:Ret KERNEL32.GetFileAttributesW() retval=ffffffff ret=7eb8b028
...
002e:trace:msi:set_target_path file
L"F_CENTRAL_msvcr100_x86.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" resolves to
L"C:\\Win\\System\\msvcr100.dll"
002e:Call KERNEL32.GetFileAttributesW(01c294f0
L"C:\\Win\\System\\msvcr100.dll") ret=7eb8b028
002e:Ret KERNEL32.GetFileAttributesW() retval=ffffffff ret=7eb8b028
002e:trace:msi:msi_set_property 0x153950 L"CostingComplete" L"1" -1
002e:trace:msi:msi_get_property 0x153950 L"CostingComplete" (nil) 0x32f2d8
...
002e:Call KERNEL32.GetFileAttributesW(01c29438 L"C:\\Program Files\\LibreOffice
4\\program\\uno.ini") ret=7ebbc9b5
002e:Ret KERNEL32.GetFileAttributesW() retval=ffffffff ret=7ebbc9b5
002e:trace:msi:calculate_install_state installing L"uno1.ini" (missing)
002e:Call KERNEL32.GetFileAttributesW(01c294a8
L"C:\\Win\\System\\msvcp100.dll") ret=7ebbc9b5
002e:Ret KERNEL32.GetFileAttributesW() retval=ffffffff ret=7ebbc9b5
002e:trace:msi:calculate_install_state installing
L"F_CENTRAL_msvcp100_x86.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" (missing)
002e:Call KERNEL32.GetFileAttributesW(01c294f0
L"C:\\Win\\System\\msvcr100.dll") ret=7ebbc9b5
002e:Ret KERNEL32.GetFileAttributesW() retval=ffffffff ret=7ebbc9b5
002e:trace:msi:calculate_install_state installing
L"F_CENTRAL_msvcr100_x86.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" (missing)
...
002e:trace:msi:cabinet_copy_file extracting
L"F_CENTRAL_msvcp100_x86.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" ->
L"C:\\Win\\System\\msvcp100.dll"
002e:Call KERNEL32.CreateFileW(0208c490
L"C:\\Win\\System\\msvcp100.dll",c0000000,00000000,00000000,00000002,00000080,00000000)
ret=7ebc8ff1
002e:Ret KERNEL32.CreateFileW() retval=000000c4 ret=7ebc8ff1
...
002e:Call KERNEL32.CreateDirectoryW(0208c490 L"C:\\Win\\System",00000000)
ret=7eb87b2c
002e:Ret KERNEL32.CreateDirectoryW() retval=00000000 ret=7eb87b2c
...
002e:Call KERNEL32.CreateDirectoryW(01e16600 L"C:\\Win",00000000) ret=7eb87b2c
002e:Ret KERNEL32.CreateDirectoryW() retval=00000001 ret=7eb87b2c
...
002e:Call KERNEL32.CreateDirectoryW(0208c490 L"C:\\Win\\System",00000000)
ret=7eb87b2c
002e:Ret KERNEL32.CreateDirectoryW() retval=00000001 ret=7eb87b2c
...
002e:trace:msi:cabinet_copy_file extracting
L"F_CENTRAL_msvcp100_x86.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" ->
L"C:\\Win\\System\\msvcp100.dll"
002e:Call KERNEL32.CreateFileW(0208c490
L"C:\\Win\\System\\msvcp100.dll",c0000000,00000000,00000000,00000002,00000080,00000000)
ret=7ebc8ff1
002e:Ret KERNEL32.CreateFileW() retval=000000c4 ret=7ebc8ff1
...
002e:trace:msi:cabinet_copy_file extracting
L"F_CENTRAL_msvcr100_x86.1DEE2A86_2F57_3629_8107_A71DBB4DBED2" ->
L"C:\\Win\\System\\msvcr100.dll"
002e:Call KERNEL32.CreateFileW(0208c490
L"C:\\Win\\System\\msvcr100.dll",c0000000,00000000,00000000,00000002,00000080,00000000)
ret=7ebc8ff1
002e:Ret KERNEL32.CreateFileW() retval=000000c4 ret=7ebc8ff1
...
002e:Call KERNEL32.WideCharToMultiByte(00000000,00000000,01e1e7f8
L"Property(S): SystemFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2 =
C:\\windows\\system32\\",ffffffff,00000000,00000000,00000000,00000000)
ret=7ebdd213
...
002e:Call KERNEL32.WideCharToMultiByte(00000000,00000000,01e1e7f8
L"Property(S): WindowsFolder_x86_VC.1DEE2A86_2F57_3629_8107_A71DBB4DBED2 =
C:\\windows\\",ffffffff,00000000,00000000,00000000,00000000) ret=7ebdd213
...
--- snip ---
--- snip ---
Wine-dbg>c
Stopped on breakpoint 2 at 0x7eb8b5c0 msi_resolve_target_folder+0x1d3
[/home/focht/projects/wine/wine.repo/src/dlls/msi/action.c:2358] in msi
2358 TRACE("%s already resolved to %s\n", debugstr_w(name),
debugstr_w(folder->ResolvedTarget));
Wine-dbg>bt
Backtrace:
=>0 0x7eb8b5c0 msi_resolve_target_folder+0x1d3(package=0x158c30,
name="TARGETDIR", load_prop=0x1)
[/home/focht/projects/wine/wine.repo/src/dlls/msi/action.c:2358] in msi
(0x0033f328)
1 0x7eb8b7b8 ACTION_CostFinalize+0x53(package=0x158c30)
[/home/focht/projects/wine/wine.repo/src/dlls/msi/action.c:2414] in msi
(0x0033f3d8)
2 0x7eb99147 ACTION_HandleStandardAction+0x17a(package=0x158c30,
action="CostFinalize")
[/home/focht/projects/wine/wine.repo/src/dlls/msi/action.c:7880] in msi
(0x0033f5a8)
3 0x7eb99302 ACTION_PerformAction+0x67(package=0x158c30,
action="CostFinalize", script=0xffffffff)
[/home/focht/projects/wine/wine.repo/src/dlls/msi/action.c:7912] in msi
(0x0033f5e8)
4 0x7eb8748c ITERATE_Actions+0xf2(row=0x99e2f0, param=0x158c30)
[/home/focht/projects/wine/wine.repo/src/dlls/msi/action.c:513] in msi
(0x0033f638)
5 0x7ebd5eee MSI_IterateRecords+0x82(view=0x16b7b8, count=0x0(nil),
func=0x7eb87399, param=0x158c30)
[/home/focht/projects/wine/wine.repo/src/dlls/msi/msiquery.c:185] in msi
(0x0033f668)
6 0x7eb87700 ACTION_ProcessExecSequence+0xe8(package=0x158c30)
[/home/focht/projects/wine/wine.repo/src/dlls/msi/action.c:578] in msi
(0x0033f6a8)
7 0x7eb937a1 ACTION_ExecuteAction+0x342(package=0x158c30)
[/home/focht/projects/wine/wine.repo/src/dlls/msi/action.c:5640] in msi
(0x0033f6e8)
8 0x7eb99147 ACTION_HandleStandardAction+0x17a(package=0x158c30,
action="ExecuteAction")
[/home/focht/projects/wine/wine.repo/src/dlls/msi/action.c:7880] in msi
(0x0033f8b8)
9 0x7eb99302 ACTION_PerformAction+0x67(package=0x158c30,
action="ExecuteAction", script=0xffffffff)
[/home/focht/projects/wine/wine.repo/src/dlls/msi/action.c:7912] in msi
(0x0033f8f8)
10 0x7eb8748c ITERATE_Actions+0xf2(row=0x159338, param=0x158c30)
[/home/focht/projects/wine/wine.repo/src/dlls/msi/action.c:513] in msi
(0x0033f948)
11 0x7ebd5eee MSI_IterateRecords+0x82(view=0x161460, count=0x0(nil),
func=0x7eb87399, param=0x158c30)
[/home/focht/projects/wine/wine.repo/src/dlls/msi/msiquery.c:185] in msi
(0x0033f978)
12 0x7eb8778f ACTION_ProcessUISequence+0x74(package=0x158c30)
[/home/focht/projects/wine/wine.repo/src/dlls/msi/action.c:598] in msi
(0x0033f9a8)
13 0x7eb939ee ACTION_INSTALL+0x66(package=0x158c30)
[/home/focht/projects/wine/wine.repo/src/dlls/msi/action.c:5694] in msi
(0x0033f9c8)
14 0x7eb99147 ACTION_HandleStandardAction+0x17a(package=0x158c30,
action="INSTALL")
[/home/focht/projects/wine/wine.repo/src/dlls/msi/action.c:7880] in msi
(0x0033fb98)
15 0x7eb99302 ACTION_PerformAction+0x67(package=0x158c30, action="INSTALL",
script=0xffffffff)
[/home/focht/projects/wine/wine.repo/src/dlls/msi/action.c:7912] in msi
(0x0033fbd8)
16 0x7eb9989a MSI_InstallPackage+0x3ad(package=0x158c30,
szPackagePath="LibreOffice_4.2.8.2_Win_x86.msi", szCommandLine=0x0(nil))
[/home/focht/projects/wine/wine.repo/src/dlls/msi/action.c:8057] in msi
(0x0033fc38)
17 0x7ebcb1d5 MsiInstallProductW+0xbd(szPackagePath=<couldn't compute
location>, szCommandLine=<couldn't compute location>)
[/home/focht/projects/wine/wine.repo/src/dlls/msi/msi.c:252] in msi
(0x0033fc78)
18 0x7efefeb5 WinMain+0x16a0(hInstance=<couldn't compute location>,
hPrevInstance=<couldn't compute location>, lpCmdLine=<couldn't compute
location>, nCmdShow=<couldn't compute location>)
[/home/focht/projects/wine/wine.repo/src/programs/msiexec/msiexec.c:997] in
msiexec (0x0033fde8)
19 0x7eff059e main+0xeb(argc=<couldn't compute location>, argv=<couldn't
compute location>)
[/home/focht/projects/wine/wine.repo/src/dlls/winecrt0/exe_main.c:49] in
msiexec (0x0033fe68)
20 0x7eff0496 __wine_spec_exe_entry+0x56(peb=<couldn't compute location>)
[/home/focht/projects/wine/wine.repo/src/dlls/winecrt0/exe_entry.c:36] in
msiexec (0x0033fea8)
21 0x7b46d930 call_process_entry+0xb() in kernel32 (0x0033fec8)
22 0x7b46da71 start_process+0x132(entry=<couldn't compute location>,
peb=<couldn't compute location>)
[/home/focht/projects/wine/wine.repo/src/dlls/kernel32/process.c:1099] in
kernel32 (0x0033ffd8)
23 0x7b46d93e start_process_wrapper+0x9() in kernel32 (0x0033ffec)
--- snip ---
Wine's directory targets/properties change tracking is kinda broken in this
aspect. See also bug 38761 which is another manifestation.
As a quick fix here, I've let it re-resolve all childs which made the installer
copy the VC++ runtime files into proper place:
--- snip ---
$ find .wine/drive_c/windows/system32 ! -newermt "1 Jan 2015" -ls
8783876 756 -rw-rw-r-- 1 focht focht 773968 Dec 4 2014
.wine/drive_c/windows/system32/msvcr100.dll
8783910 412 -rw-rw-r-- 1 focht focht 421200 Dec 4 2014
.wine/drive_c/windows/system32/msvcp100.dll
--- snip ---
Re-resolving the whole directory table property tree is not a proper solution,
one has to check if one path dependency (parent) has really changed which would
also fix bug 38761
$ sha1sum LibreOffice_4.2.8.2_Win_x86.msi
0102dda5bc6af2a45e8362cd9fe26c639c4c585e LibreOffice_4.2.8.2_Win_x86.msi
$ du -sh LibreOffice_4.2.8.2_Win_x86.msi
211M LibreOffice_4.2.8.2_Win_x86.msi
$ wine --version
wine-3.7-77-g540c48b911
Regards
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list