[mojosetup] Tweak the uninstaller to add support for the --noprompt option

Francois Gouget fgouget at codeweavers.com
Mon May 23 18:07:18 EDT 2011

# HG changeset patch
# User Francois Gouget <fgouget at codeweavers.com>
# Date 1306186339 -7200
# Node ID d004e8f59159e97d7566e739917c9145ebd32731
# Parent  f0caa14547d2df2ee751d1cf1acf7af09f7bf7a3
Tweak the uninstaller to add support for the --noprompt option.

This makes it possible to non-interactively uninstall a product. This may be useful in case it becomes necessary to uninstall the old product before performing an upgrade (but the old product uninstaller has to support it first).

diff -r f0caa14547d2 -r d004e8f59159 scripts/mojosetup_mainline.lua
--- a/scripts/mojosetup_mainline.lua	Mon May 23 23:31:34 2011 +0200
+++ b/scripts/mojosetup_mainline.lua	Mon May 23 23:32:19 2011 +0200
@@ -2074,7 +2074,9 @@
         local filelist = flatten_manifest(package.manifest, prepend_dest_dir)
         delete_files(filelist, callback, package.delete_error_is_fatal)
         run_config_defined_hook(package.postuninstall, package)
-        MojoSetup.gui.final(_("Uninstall complete"))
+        if not MojoSetup.cmdline("noprompt") then
+            MojoSetup.gui.final(_("Uninstall complete"))
+        end

More information about the mojosetup mailing list