From fd5fd19bb921b05ee02b2544fa96485326c81e7b Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Mon, 21 Dec 2015 04:38:57 +0100 Subject: [PATCH] wusa-MSU_Package_Installer: Improve tracing and warn if cabinet contains compressed files. --- patches/patchinstall.sh | 4 ++ ...rove-tracing-of-installation-process.patch | 69 +++++++++++++++++++ ...ng-when-encountering-msdelta-compres.patch | 39 +++++++++++ 3 files changed, 112 insertions(+) create mode 100644 patches/wusa-MSU_Package_Installer/0006-wusa-Improve-tracing-of-installation-process.patch create mode 100644 patches/wusa-MSU_Package_Installer/0007-wusa-Print-warning-when-encountering-msdelta-compres.patch diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 7aaadf29..215f7415 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -6824,12 +6824,16 @@ if test "$enable_wusa_MSU_Package_Installer" -eq 1; then patch_apply wusa-MSU_Package_Installer/0003-wusa-Treat-empty-update-list-as-error.patch patch_apply wusa-MSU_Package_Installer/0004-wusa-Implement-WOW64-support.patch patch_apply wusa-MSU_Package_Installer/0005-wusa-Add-workaround-to-be-compatible-with-Vista-pack.patch + patch_apply wusa-MSU_Package_Installer/0006-wusa-Improve-tracing-of-installation-process.patch + patch_apply wusa-MSU_Package_Installer/0007-wusa-Print-warning-when-encountering-msdelta-compres.patch ( echo '+ { "Michael Müller", "wusa: Implement basic installation logic.", 1 },'; echo '+ { "Michael Müller", "wusa: Ignore systemProtection subkey of registry key.", 1 },'; echo '+ { "Michael Müller", "wusa: Treat empty update list as error.", 1 },'; echo '+ { "Michael Müller", "wusa: Implement WOW64 support.", 1 },'; echo '+ { "Sebastian Lackner", "wusa: Add workaround to be compatible with Vista packages.", 1 },'; + echo '+ { "Sebastian Lackner", "wusa: Improve tracing of installation process.", 1 },'; + echo '+ { "Michael Müller", "wusa: Print warning when encountering msdelta compressed files.", 1 },'; ) >> "$patchlist" fi diff --git a/patches/wusa-MSU_Package_Installer/0006-wusa-Improve-tracing-of-installation-process.patch b/patches/wusa-MSU_Package_Installer/0006-wusa-Improve-tracing-of-installation-process.patch new file mode 100644 index 00000000..68c8dfb8 --- /dev/null +++ b/patches/wusa-MSU_Package_Installer/0006-wusa-Improve-tracing-of-installation-process.patch @@ -0,0 +1,69 @@ +From 2038bc924b8e3a3b1d5a1e989e9d2a74570c0dc1 Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Mon, 21 Dec 2015 04:27:02 +0100 +Subject: wusa: Improve tracing of installation process. + +--- + programs/wusa/main.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/programs/wusa/main.c b/programs/wusa/main.c +index 834da33..6a893ec 100644 +--- a/programs/wusa/main.c ++++ b/programs/wusa/main.c +@@ -469,6 +469,8 @@ static BOOL install_files_copy(struct assembly_entry *assembly, const WCHAR *sou + } + else + { ++ WINE_TRACE("Copying %s -> %s\n", debugstr_w(source), debugstr_w(target)); ++ + if (!create_parent_directory(target)) + { + WINE_ERR("Failed to create parent directory for %s\n", debugstr_w(target)); +@@ -688,6 +690,8 @@ static BOOL install_registry_value(struct assembly_entry *assembly, HKEY key, st + static const WCHAR reg_dwordW[] = {'R','E','G','_','D','W','O','R','D',0}; + static const WCHAR reg_binaryW[] = {'R','E','G','_','B','I','N','A','R','Y',0}; + ++ WINE_TRACE("Setting registry key %s = %s\n", debugstr_w(registrykv->name), debugstr_w(registrykv->value)); ++ + if (!strcmpW(registrykv->value_type, reg_szW)) + return install_registry_string(assembly, key, registrykv, REG_SZ, dryrun); + if (!strcmpW(registrykv->value_type, reg_expand_szW)) +@@ -724,6 +728,8 @@ static BOOL install_registry(struct assembly_entry *assembly, BOOL dryrun) + break; + } + ++ WINE_TRACE("Processing registry key %s\n", debugstr_w(registryop->key)); ++ + if (!dryrun && RegCreateKeyExW(root, path, 0, NULL, REG_OPTION_NON_VOLATILE, sam, NULL, &subkey, NULL)) + { + WINE_ERR("Failed to open registry key %s\n", debugstr_w(registryop->key)); +@@ -810,6 +816,8 @@ static BOOL install_assembly(struct list *manifest_list, struct assembly_identit + if (!install_assembly(manifest_list, &dependency->identity, dryrun)) return FALSE; + } + ++ WINE_TRACE("Installing assembly %s%s\n", debugstr_w(name), dryrun ? " (dryrun)" : ""); ++ + if (!install_files(assembly, dryrun)) + { + WINE_ERR("Failed to install all files for %s\n", debugstr_w(name)); +@@ -822,6 +830,8 @@ static BOOL install_assembly(struct list *manifest_list, struct assembly_identit + return FALSE; + } + ++ WINE_TRACE("Installation of %s finished\n", debugstr_w(name)); ++ + assembly->status = ASSEMBLY_STATUS_INSTALLED; + return TRUE; + } +@@ -1065,6 +1075,7 @@ static BOOL install_msu(WCHAR *filename, struct installer_state *state) + goto done; + } + ++ WINE_TRACE("Installation finished\n"); + ret = TRUE; + + done: +-- +2.6.4 + diff --git a/patches/wusa-MSU_Package_Installer/0007-wusa-Print-warning-when-encountering-msdelta-compres.patch b/patches/wusa-MSU_Package_Installer/0007-wusa-Print-warning-when-encountering-msdelta-compres.patch new file mode 100644 index 00000000..4e970c06 --- /dev/null +++ b/patches/wusa-MSU_Package_Installer/0007-wusa-Print-warning-when-encountering-msdelta-compres.patch @@ -0,0 +1,39 @@ +From b1dbdbafa126589fdaf8f92eb0706eab0ff85f56 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20M=C3=BCller?= +Date: Mon, 21 Dec 2015 04:09:11 +0100 +Subject: wusa: Print warning when encountering msdelta compressed files. + +--- + programs/wusa/main.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/programs/wusa/main.c b/programs/wusa/main.c +index 6a893ec..299aff2 100644 +--- a/programs/wusa/main.c ++++ b/programs/wusa/main.c +@@ -892,6 +892,7 @@ static void installer_cleanup(struct installer_state *state) + + static BOOL load_assemblies_from_cab(const WCHAR *filename, struct installer_state *state) + { ++ static const WCHAR manifest_cix_xmlW[] = {'_','m','a','n','i','f','e','s','t','_','.','c','i','x','.','x','m','l',0}; + static const WCHAR manifestW[] = {'.','m','a','n','i','f','e','s','t',0}; + static const WCHAR mumW[] = {'.','m','u','m',0}; + static const WCHAR starW[] = {'*',0}; +@@ -910,6 +911,14 @@ static BOOL load_assemblies_from_cab(const WCHAR *filename, struct installer_sta + return FALSE; + } + ++ if (!(path = path_combine(temp_path, manifest_cix_xmlW))) return FALSE; ++ if (GetFileAttributesW(path) != INVALID_FILE_ATTRIBUTES) ++ { ++ WINE_FIXME("Cabinet uses proprietary msdelta file compression which is not (yet) supported.\n"); ++ WINE_FIXME("Installation of msu file will most likely fail.\n"); ++ } ++ heap_free(path); ++ + if (!(path = path_combine(temp_path, starW))) return FALSE; + search = FindFirstFileW(path, &data); + heap_free(path); +-- +2.6.4 +