lib: osutils.GetGlobalTempDir: replace with tempfile.gettempdir

There's no need for our own cover function here as the tempfile module
provides a perfectly good public API that does the same thing.  It was
added originally as a refactor of the existing osutils.SetGlobalTempdir
(probably due to the author not knowing about tempfile.gettempdir), but
the use of tempfile._get_default_tempdir in osutils.SetGlobalTempdir is
correct -- we need to avoid grabbing locks there.

Unwind GetGlobalTempDir and improve the SetGlobalTempdir documentation
so it hopefully doesn't happen again.

BUG=None
TEST=CQ passes

Change-Id: If99c4a2ad1dfa8b1d1c3693e5dedf196c4cab5d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4568869
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Sergey Frolov <sfrolov@google.com>
Commit-Queue: Sergey Frolov <sfrolov@google.com>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/cbuildbot.py b/scripts/cbuildbot.py
index cff7d2fa..b3ca6ea 100644
--- a/scripts/cbuildbot.py
+++ b/scripts/cbuildbot.py
@@ -16,6 +16,7 @@
 import os
 import pickle
 import sys
+import tempfile
 
 from chromite.cbuildbot import builders
 from chromite.cbuildbot import cbuildbot_alerts
@@ -279,9 +280,8 @@
             "Bootstrapping cbuildbot may involve checking out "
             "multiple copies of chromite. All these checkouts "
             "will be contained in the directory specified here. "
-            "Default:%s"
-        )
-        % osutils.GetGlobalTempDir(),
+            f"(Default: {tempfile.gettempdir()})"
+        ),
     )
     parser.add_remote_option(
         "--android_rev",