Module: check_mk
Branch: master
Commit: 8a6aac008b15c0bf275d9a207bf978c35d4236d1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8a6aac008b15c0…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Oct 15 16:53:31 2014 +0200
now able to handle package code updates of vanilla and baked msi container
---
agents/windows/msibuild/msi-update | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/agents/windows/msibuild/msi-update b/agents/windows/msibuild/msi-update
index 667f9ae..811b73a 100755
--- a/agents/windows/msibuild/msi-update
+++ b/agents/windows/msibuild/msi-update
@@ -34,7 +34,6 @@ def bail_out(text):
sys.stderr.write("ERROR: %s\n" % text)
sys.exit(1)
-
try:
if sys.argv[1] == '-v':
opt_verbose = True
@@ -159,10 +158,19 @@ for entry in [ "Property", "File",
"Upgrade" ]:
os.system((path_prefix + "msibuild %(new_msi_file)s -i
%(work_dir)s/%(file)s.idt") % \
{ "work_dir" : work_dir, "new_msi_file": new_msi_file,
"file": entry })
-# Update summary info with new uuid (HACK! - the msibuild way is not working on all
systems...)
+# Update summary info with new uuid (HACK! - the msibuild tool is not able to do this on
all systems)
+# In this step we replace the package code with a new uuid. This uuid is important,
because it is
+# the unqiue identifier for this package. Inside the package the uuid is split into two
halfs.
+# Each of it is updated with the corresponding new package code. Since msi-update uses
the
+# vanilla_container.msi as well as the baked_container.msi we need to handle both..
package_code = ("{%s}" % uuid.uuid1()).upper()
-os.system("sed -i -e s/{08012468-53DE-4/%(start)s/ -e
s/2A3-BAA9-FE4C2A129135}/%(end)s/ %(new_msi_file)s" % \
- {"new_msi_file": new_msi_file, "start": package_code[:16],
"end": package_code[16:]})
+summary_info = {"new_msi_file": new_msi_file, "start":
package_code[:16], "end": package_code[16:]}
+default_package_codes = {
+ "vanilla_container.msi": { "dftl_start":
"{08012468-53DE-4", "dftl_end": "2A3-BAA9-FE4C2A129135}"},
+ "baked_container.msi" : { "dftl_start":
"{47ED1918-CEDF-4", "dftl_end": "D37-943C-B4DBC3F58E6C}"}
+}
+summary_info.update(default_package_codes[msi_file])
+os.system("sed -i -e 's/%(dftl_start)s/%(start)s/' -e
's/%(dftl_end)s/%(end)s/' %(new_msi_file)s" % summary_info)
# Remove original product.cab from stream
verbose("Removing product.cab from %s" % new_msi_file)