]> cygwin.com Git - cygwin-apps/setup.git/commitdiff
Add --no-version-check option
authorKen Brown <kbrown@cornell.edu>
Thu, 5 Jul 2018 15:22:20 +0000 (11:22 -0400)
committerJon Turney <jon.turney@dronecode.org.uk>
Sat, 7 Jul 2018 11:51:08 +0000 (12:51 +0100)
This suppresses the warning that a newer version of setup is available.

This is intended to be used by shortcuts and scripts that run setup in a
'setup' package.

This would also suppress any future auto-update feature.

ini.cc

diff --git a/ini.cc b/ini.cc
index 7afeba229913ee97392194e15de1eb1889e1d8f2..78684a719c40c7b00d37347ec91f26c66cc63a70 100644 (file)
--- a/ini.cc
+++ b/ini.cc
@@ -62,6 +62,7 @@ IniList setup_ext_list (setup_exts,
                        setup_exts + (sizeof(setup_exts) / sizeof(*setup_exts)));
 
 static BoolOption NoVerifyOption (false, 'X', "no-verify", "Don't verify setup.ini signatures");
+static BoolOption NoVersionCheckOption (false, '\0', "no-version-check", "Suppress checking if a newer version of setup is available");
 
 extern int yyparse ();
 
@@ -401,7 +402,8 @@ do_ini_thread (HINSTANCE h, HWND owner)
        setup_version);
   if (ini_setup_version.size ())
     {
-      if (version_compare (setup_version, ini_setup_version) < 0)
+      if ((version_compare (setup_version, ini_setup_version) < 0)
+          && !NoVersionCheckOption)
        note (owner, IDS_OLD_SETUP_VERSION, setup_version,
              ini_setup_version.c_str ());
     }
This page took 0.036969 seconds and 5 git commands to generate.