We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove 'spack bootstrap' from the commands
As a Spack maintainer I want to remove the `spack bootstrap` command (outdated since #14062) so that I could reduce the amount of boilerplate code in the project.

### Rationale

The `spack bootstrap` command was used to "Bootstrap packages needed for spack to run smoothly" and in reality it has always just installed `environment-modules~X`. Since #14062 shell integration  doesn't require `environment-modules` anymore making the command outdated. I would  therefore remove that command from the code base.

### Description

Just remove the command and any test / package associated only with it.


### Additional information

Opening the issue to check what is the consensus towards this.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `lib/spack/spack/cmd/bootstrap.py`
Content:
```
1 # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
2 # Spack Project Developers. See the top-level COPYRIGHT file for details.
3 #
4 # SPDX-License-Identifier: (Apache-2.0 OR MIT)
5 
6 import llnl.util.cpu
7 import llnl.util.tty as tty
8 
9 import spack.repo
10 import spack.spec
11 import spack.cmd.common.arguments as arguments
12 
13 description = "Bootstrap packages needed for spack to run smoothly"
14 section = "admin"
15 level = "long"
16 
17 
18 def setup_parser(subparser):
19     arguments.add_common_arguments(subparser, ['jobs'])
20     subparser.add_argument(
21         '--keep-prefix', action='store_true', dest='keep_prefix',
22         help="don't remove the install prefix if installation fails")
23     subparser.add_argument(
24         '--keep-stage', action='store_true', dest='keep_stage',
25         help="don't remove the build stage if installation succeeds")
26     arguments.add_common_arguments(subparser, ['no_checksum'])
27     subparser.add_argument(
28         '-v', '--verbose', action='store_true', dest='verbose',
29         help="display verbose build output while installing")
30 
31     cache_group = subparser.add_mutually_exclusive_group()
32     cache_group.add_argument(
33         '--use-cache', action='store_true', dest='use_cache', default=True,
34         help="check for pre-built Spack packages in mirrors (default)")
35     cache_group.add_argument(
36         '--no-cache', action='store_false', dest='use_cache', default=True,
37         help="do not check for pre-built Spack packages in mirrors")
38     cache_group.add_argument(
39         '--cache-only', action='store_true', dest='cache_only', default=False,
40         help="only install package from binary mirrors")
41 
42     cd_group = subparser.add_mutually_exclusive_group()
43     arguments.add_common_arguments(cd_group, ['clean', 'dirty'])
44 
45 
46 def bootstrap(parser, args, **kwargs):
47     kwargs.update({
48         'keep_prefix': args.keep_prefix,
49         'keep_stage': args.keep_stage,
50         'install_deps': 'dependencies',
51         'verbose': args.verbose,
52         'dirty': args.dirty,
53         'use_cache': args.use_cache,
54         'cache_only': args.cache_only
55     })
56 
57     # Define requirement dictionary defining general specs which need
58     # to be satisfied, and the specs to install when the general spec
59     # isn't satisfied.
60     requirement_dict = {
61         # Install environment-modules with generic optimizations
62         'environment-modules': 'environment-modules~X target={0}'.format(
63             llnl.util.cpu.host().family
64         )
65     }
66 
67     for requirement in requirement_dict:
68         installed_specs = spack.store.db.query(requirement)
69         if(len(installed_specs) > 0):
70             tty.msg("Requirement %s is satisfied with installed "
71                     "package %s" % (requirement, installed_specs[0]))
72         else:
73             # Install requirement
74             spec_to_install = spack.spec.Spec(requirement_dict[requirement])
75             spec_to_install.concretize()
76             tty.msg("Installing %s to satisfy requirement for %s" %
77                     (spec_to_install, requirement))
78             kwargs['explicit'] = True
79             package = spack.repo.get(spec_to_install)
80             package.do_install(**kwargs)
81
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/lib/spack/spack/cmd/bootstrap.py b/lib/spack/spack/cmd/bootstrap.py
deleted file mode 100644
--- a/lib/spack/spack/cmd/bootstrap.py
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
-# Spack Project Developers. See the top-level COPYRIGHT file for details.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-import llnl.util.cpu
-import llnl.util.tty as tty
-
-import spack.repo
-import spack.spec
-import spack.cmd.common.arguments as arguments
-
-description = "Bootstrap packages needed for spack to run smoothly"
-section = "admin"
-level = "long"
-
-
-def setup_parser(subparser):
-    arguments.add_common_arguments(subparser, ['jobs'])
-    subparser.add_argument(
-        '--keep-prefix', action='store_true', dest='keep_prefix',
-        help="don't remove the install prefix if installation fails")
-    subparser.add_argument(
-        '--keep-stage', action='store_true', dest='keep_stage',
-        help="don't remove the build stage if installation succeeds")
-    arguments.add_common_arguments(subparser, ['no_checksum'])
-    subparser.add_argument(
-        '-v', '--verbose', action='store_true', dest='verbose',
-        help="display verbose build output while installing")
-
-    cache_group = subparser.add_mutually_exclusive_group()
-    cache_group.add_argument(
-        '--use-cache', action='store_true', dest='use_cache', default=True,
-        help="check for pre-built Spack packages in mirrors (default)")
-    cache_group.add_argument(
-        '--no-cache', action='store_false', dest='use_cache', default=True,
-        help="do not check for pre-built Spack packages in mirrors")
-    cache_group.add_argument(
-        '--cache-only', action='store_true', dest='cache_only', default=False,
-        help="only install package from binary mirrors")
-
-    cd_group = subparser.add_mutually_exclusive_group()
-    arguments.add_common_arguments(cd_group, ['clean', 'dirty'])
-
-
-def bootstrap(parser, args, **kwargs):
-    kwargs.update({
-        'keep_prefix': args.keep_prefix,
-        'keep_stage': args.keep_stage,
-        'install_deps': 'dependencies',
-        'verbose': args.verbose,
-        'dirty': args.dirty,
-        'use_cache': args.use_cache,
-        'cache_only': args.cache_only
-    })
-
-    # Define requirement dictionary defining general specs which need
-    # to be satisfied, and the specs to install when the general spec
-    # isn't satisfied.
-    requirement_dict = {
-        # Install environment-modules with generic optimizations
-        'environment-modules': 'environment-modules~X target={0}'.format(
-            llnl.util.cpu.host().family
-        )
-    }
-
-    for requirement in requirement_dict:
-        installed_specs = spack.store.db.query(requirement)
-        if(len(installed_specs) > 0):
-            tty.msg("Requirement %s is satisfied with installed "
-                    "package %s" % (requirement, installed_specs[0]))
-        else:
-            # Install requirement
-            spec_to_install = spack.spec.Spec(requirement_dict[requirement])
-            spec_to_install.concretize()
-            tty.msg("Installing %s to satisfy requirement for %s" %
-                    (spec_to_install, requirement))
-            kwargs['explicit'] = True
-            package = spack.repo.get(spec_to_install)
-            package.do_install(**kwargs)

{"golden_diff": "diff --git a/lib/spack/spack/cmd/bootstrap.py b/lib/spack/spack/cmd/bootstrap.py\ndeleted file mode 100644\n--- a/lib/spack/spack/cmd/bootstrap.py\n+++ /dev/null\n@@ -1,80 +0,0 @@\n-# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n-# Spack Project Developers. See the top-level COPYRIGHT file for details.\n-#\n-# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n-\n-import llnl.util.cpu\n-import llnl.util.tty as tty\n-\n-import spack.repo\n-import spack.spec\n-import spack.cmd.common.arguments as arguments\n-\n-description = \"Bootstrap packages needed for spack to run smoothly\"\n-section = \"admin\"\n-level = \"long\"\n-\n-\n-def setup_parser(subparser):\n-    arguments.add_common_arguments(subparser, ['jobs'])\n-    subparser.add_argument(\n-        '--keep-prefix', action='store_true', dest='keep_prefix',\n-        help=\"don't remove the install prefix if installation fails\")\n-    subparser.add_argument(\n-        '--keep-stage', action='store_true', dest='keep_stage',\n-        help=\"don't remove the build stage if installation succeeds\")\n-    arguments.add_common_arguments(subparser, ['no_checksum'])\n-    subparser.add_argument(\n-        '-v', '--verbose', action='store_true', dest='verbose',\n-        help=\"display verbose build output while installing\")\n-\n-    cache_group = subparser.add_mutually_exclusive_group()\n-    cache_group.add_argument(\n-        '--use-cache', action='store_true', dest='use_cache', default=True,\n-        help=\"check for pre-built Spack packages in mirrors (default)\")\n-    cache_group.add_argument(\n-        '--no-cache', action='store_false', dest='use_cache', default=True,\n-        help=\"do not check for pre-built Spack packages in mirrors\")\n-    cache_group.add_argument(\n-        '--cache-only', action='store_true', dest='cache_only', default=False,\n-        help=\"only install package from binary mirrors\")\n-\n-    cd_group = subparser.add_mutually_exclusive_group()\n-    arguments.add_common_arguments(cd_group, ['clean', 'dirty'])\n-\n-\n-def bootstrap(parser, args, **kwargs):\n-    kwargs.update({\n-        'keep_prefix': args.keep_prefix,\n-        'keep_stage': args.keep_stage,\n-        'install_deps': 'dependencies',\n-        'verbose': args.verbose,\n-        'dirty': args.dirty,\n-        'use_cache': args.use_cache,\n-        'cache_only': args.cache_only\n-    })\n-\n-    # Define requirement dictionary defining general specs which need\n-    # to be satisfied, and the specs to install when the general spec\n-    # isn't satisfied.\n-    requirement_dict = {\n-        # Install environment-modules with generic optimizations\n-        'environment-modules': 'environment-modules~X target={0}'.format(\n-            llnl.util.cpu.host().family\n-        )\n-    }\n-\n-    for requirement in requirement_dict:\n-        installed_specs = spack.store.db.query(requirement)\n-        if(len(installed_specs) > 0):\n-            tty.msg(\"Requirement %s is satisfied with installed \"\n-                    \"package %s\" % (requirement, installed_specs[0]))\n-        else:\n-            # Install requirement\n-            spec_to_install = spack.spec.Spec(requirement_dict[requirement])\n-            spec_to_install.concretize()\n-            tty.msg(\"Installing %s to satisfy requirement for %s\" %\n-                    (spec_to_install, requirement))\n-            kwargs['explicit'] = True\n-            package = spack.repo.get(spec_to_install)\n-            package.do_install(**kwargs)\n", "issue": "Remove 'spack bootstrap' from the commands\nAs a Spack maintainer I want to remove the `spack bootstrap` command (outdated since #14062) so that I could reduce the amount of boilerplate code in the project.\r\n\r\n### Rationale\r\n\r\nThe `spack bootstrap` command was used to \"Bootstrap packages needed for spack to run smoothly\" and in reality it has always just installed `environment-modules~X`. Since #14062 shell integration  doesn't require `environment-modules` anymore making the command outdated. I would  therefore remove that command from the code base.\r\n\r\n### Description\r\n\r\nJust remove the command and any test / package associated only with it.\r\n\r\n\r\n### Additional information\r\n\r\nOpening the issue to check what is the consensus towards this.\r\n\n", "before_files": [{"content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nimport llnl.util.cpu\nimport llnl.util.tty as tty\n\nimport spack.repo\nimport spack.spec\nimport spack.cmd.common.arguments as arguments\n\ndescription = \"Bootstrap packages needed for spack to run smoothly\"\nsection = \"admin\"\nlevel = \"long\"\n\n\ndef setup_parser(subparser):\n    arguments.add_common_arguments(subparser, ['jobs'])\n    subparser.add_argument(\n        '--keep-prefix', action='store_true', dest='keep_prefix',\n        help=\"don't remove the install prefix if installation fails\")\n    subparser.add_argument(\n        '--keep-stage', action='store_true', dest='keep_stage',\n        help=\"don't remove the build stage if installation succeeds\")\n    arguments.add_common_arguments(subparser, ['no_checksum'])\n    subparser.add_argument(\n        '-v', '--verbose', action='store_true', dest='verbose',\n        help=\"display verbose build output while installing\")\n\n    cache_group = subparser.add_mutually_exclusive_group()\n    cache_group.add_argument(\n        '--use-cache', action='store_true', dest='use_cache', default=True,\n        help=\"check for pre-built Spack packages in mirrors (default)\")\n    cache_group.add_argument(\n        '--no-cache', action='store_false', dest='use_cache', default=True,\n        help=\"do not check for pre-built Spack packages in mirrors\")\n    cache_group.add_argument(\n        '--cache-only', action='store_true', dest='cache_only', default=False,\n        help=\"only install package from binary mirrors\")\n\n    cd_group = subparser.add_mutually_exclusive_group()\n    arguments.add_common_arguments(cd_group, ['clean', 'dirty'])\n\n\ndef bootstrap(parser, args, **kwargs):\n    kwargs.update({\n        'keep_prefix': args.keep_prefix,\n        'keep_stage': args.keep_stage,\n        'install_deps': 'dependencies',\n        'verbose': args.verbose,\n        'dirty': args.dirty,\n        'use_cache': args.use_cache,\n        'cache_only': args.cache_only\n    })\n\n    # Define requirement dictionary defining general specs which need\n    # to be satisfied, and the specs to install when the general spec\n    # isn't satisfied.\n    requirement_dict = {\n        # Install environment-modules with generic optimizations\n        'environment-modules': 'environment-modules~X target={0}'.format(\n            llnl.util.cpu.host().family\n        )\n    }\n\n    for requirement in requirement_dict:\n        installed_specs = spack.store.db.query(requirement)\n        if(len(installed_specs) > 0):\n            tty.msg(\"Requirement %s is satisfied with installed \"\n                    \"package %s\" % (requirement, installed_specs[0]))\n        else:\n            # Install requirement\n            spec_to_install = spack.spec.Spec(requirement_dict[requirement])\n            spec_to_install.concretize()\n            tty.msg(\"Installing %s to satisfy requirement for %s\" %\n                    (spec_to_install, requirement))\n            kwargs['explicit'] = True\n            package = spack.repo.get(spec_to_install)\n            package.do_install(**kwargs)\n", "path": "lib/spack/spack/cmd/bootstrap.py"}], "after_files": [{"content": null, "path": "lib/spack/spack/cmd/bootstrap.py"}]}