From b4b346cd317b4de0f454409595610917653b6c95 Mon Sep 17 00:00:00 2001
From: Stewart Martin-Haugh <smh@cern.ch>
Date: Tue, 15 May 2018 17:29:07 +0200
Subject: [PATCH] Remove obsolete Bootstrap.py

Former-commit-id: 210fbe404c22626033aef9c30526e10fc379a130
---
 .../AthenaCommon/python/AthOptionsParser.py   | 15 ++----------
 Control/AthenaCommon/share/Bootstrap.py       | 23 -------------------
 Control/AthenaCommon/share/Preparation.py     | 13 ++---------
 3 files changed, 4 insertions(+), 47 deletions(-)
 delete mode 100755 Control/AthenaCommon/share/Bootstrap.py

diff --git a/Control/AthenaCommon/python/AthOptionsParser.py b/Control/AthenaCommon/python/AthOptionsParser.py
index 8d093f697e0..b4c0129447c 100644
--- a/Control/AthenaCommon/python/AthOptionsParser.py
+++ b/Control/AthenaCommon/python/AthOptionsParser.py
@@ -23,7 +23,7 @@ _useropts = "bidc:hl:svp:r:t:"
 _userlongopts = [
     "batch", "interactive", "no-display", "debug=", "command=", "help",
     "loglevel=", "showincludes", "trace=", "check-properties",
-    "version", "preconfig=",
+    "version",
     "leak-check=", "leak-check-execute", "delete-check=", "heapmon",
     "perfmon", "pmon=", "repeat-evts=", "profile-python=",
     "enable-ers-hdlr=",
@@ -78,7 +78,6 @@ Accepted command line options:
  -t, --check-properties <level>       ...  check properties based on setting history,
                                               report details depend <level>
  -v, --version                        ...  print version number
- -p, --preconfig                      ...  specify location of bootstrap file
      --perfmon                        ...  enable performance monitoring toolkit
                                            (same as --pmon=perfmon)
      --pmon=<level-or-name>           ...  enable performance monitoring toolkit
@@ -140,7 +139,6 @@ def parse(chk_tcmalloc=True):
     opts.showincludes = 0        # don't show include files
     opts.trace_pattern = ""      # defaults decided in Include module
     opts.check_properties = 0    # no checking by default
-    opts.preconfig = "AthenaCommon"       # location of bootstrap file
     opts.do_pmon = False         # default is to NOT enable perfmon
     opts.nbr_repeat_evts = 0     # default is to NOT repeat events
     opts.enable_ers_hdlr = False # enable/disable TDAQ ERS signal handlers
@@ -195,14 +193,8 @@ def parse(chk_tcmalloc=True):
     _p = 0
     args = sys.argv[1:]
     for arg in args:
-        if arg == '-p' or arg == '--preconfig':
-            _p = 1
-            _opts.append(arg)
-            continue
-
         if (arg[-3:] == '.py' and 
-            not ( _p or arg[:11] == '--preconfig'
-                  or arg[:7] == '--trace' )):
+            (arg[:7] != '--trace' )):
             scripts.append(arg)
         elif arg[-4:] == '.pkl' and not '=' in arg:
             fromdb = arg
@@ -286,9 +278,6 @@ def parse(chk_tcmalloc=True):
             print __version__
             sys.exit()
             
-        elif opt in ("-p", "--preconfig"):
-            opts.preconfig = arg
-            
         elif opt in ("--leak-check", "--leak-check-execute", "--delete-check"):
             if using_tcmalloc == False:
                 # early import is needed for proper offloading later
diff --git a/Control/AthenaCommon/share/Bootstrap.py b/Control/AthenaCommon/share/Bootstrap.py
deleted file mode 100755
index 01eeb46098c..00000000000
--- a/Control/AthenaCommon/share/Bootstrap.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#**************************************************************
-#
-# Athena bootstrap options file
-#
-#==============================================================
-
-#--------------------------------------------------------------
-# Atlas specific event loop and output stream
-#--------------------------------------------------------------
-theApp.EventLoop         = "AthenaEventLoopMgr"
-theApp.OutStreamType     = "AthenaOutputStream"
-
-#--------------------------------------------------------------
-# take care of job options legacy
-#--------------------------------------------------------------
-theApp.JobOptionsPath    = ""
-theApp.JobOptionsType    = "NONE"
-
-#==============================================================
-#
-# End of Athena bootstrap options file
-#
-#**************************************************************
diff --git a/Control/AthenaCommon/share/Preparation.py b/Control/AthenaCommon/share/Preparation.py
index 93bb8875d36..e5b2d026be1 100644
--- a/Control/AthenaCommon/share/Preparation.py
+++ b/Control/AthenaCommon/share/Preparation.py
@@ -29,17 +29,8 @@ from AthenaCommon.Logging import log
 
 # load all entries so far into the workspace of include()
 
-if 3 < len(opts.preconfig) and opts.preconfig[-3:] == ".py":   # user provided
-   _msg.warning("Bootstrap and preconfig are no longer needed. "
-                "Please update your scripts !")
-   include(opts.preconfig)
-else:
-   if opts.preconfig != 'AthenaCommon':
-      _msg.warning("Bootstrap and preconfig are no longer needed. "
-                   "Please update your scripts !")
-   include( "%s/Bootstrap.py" % opts.preconfig )
-   if not opts.run_batch:                               # i.e. interactive
-      theApp.EventLoop = "PyAthenaEventLoopMgr"         # from AthenaServices
+if not opts.run_batch:                               # i.e. interactive
+   theApp.EventLoop = "PyAthenaEventLoopMgr"         # from AthenaServices
 
 ## create the application manager and start in a non-initialised state
 from AthenaCommon.AppMgr import ToolSvc, ServiceMgr, theAuditorSvc
-- 
GitLab