summary refs log tree commit diff
path: root/pkgs/tools/admin/google-cloud-sdk/gsutil-disable-updates.patch
blob: de44ea7e79151b61f79f958ed278f52da9f7c674 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
diff --git a/platform/gsutil/gslib/command_runner.py b/platform/gsutil/gslib/command_runner.py
index 06ca5e5..4a4e225 100644
--- a/platform/gsutil/gslib/command_runner.py
+++ b/platform/gsutil/gslib/command_runner.py
@@ -61,7 +61,6 @@ from gslib.utils.text_util import InsistAsciiHeaderValue
 from gslib.utils.text_util import print_to_fd
 from gslib.utils.unit_util import SECONDS_PER_DAY
 from gslib.utils.update_util import LookUpGsutilVersion
-from gslib.tests.util import HAS_NON_DEFAULT_GS_HOST
 
 
 def HandleHeaderCoding(headers):
@@ -331,17 +330,6 @@ class CommandRunner(object):
     Returns:
       Return value(s) from Command that was run.
     """
-    command_changed_to_update = False
-    if (not skip_update_check and
-        self.MaybeCheckForAndOfferSoftwareUpdate(command_name, debug)):
-      command_name = 'update'
-      command_changed_to_update = True
-      args = [_StringToSysArgType('-n')]
-
-      # Check for opt-in analytics.
-      if system_util.IsRunningInteractively() and collect_analytics:
-        metrics.CheckAndMaybePromptForAnalyticsEnabling()
-
     if not args:
       args = []
 
@@ -414,18 +402,10 @@ class CommandRunner(object):
       ShutDownGsutil()
     if GetFailureCount() > 0:
       return_code = 1
-    if command_changed_to_update:
-      # If the command changed to update, the user's original command was
-      # not executed.
-      return_code = 1
-      print('\n'.join(
-          textwrap.wrap(
-              'Update was successful. Exiting with code 1 as the original command '
-              'issued prior to the update was not executed and should be re-run.'
-          )))
     return return_code
 
   def MaybeCheckForAndOfferSoftwareUpdate(self, command_name, debug):
+    return False
     """Checks the last time we checked for an update and offers one if needed.
 
     Offer is made if the time since the last update check is longer