environment.py: only install root specs explicitly (#31645)
This commit is contained in:
@@ -131,8 +131,9 @@ def setup_parser(subparser):
|
|||||||
help='(with environment) only install already concretized specs')
|
help='(with environment) only install already concretized specs')
|
||||||
subparser.add_argument(
|
subparser.add_argument(
|
||||||
'--no-add', action='store_true', default=False,
|
'--no-add', action='store_true', default=False,
|
||||||
help="""(with environment) only install specs provided as argument
|
help="""(with environment) partially install an environment, limiting
|
||||||
if they are already in the concretized environment""")
|
to concrete specs in the environment matching the arguments.
|
||||||
|
Non-roots remain installed implicitly.""")
|
||||||
subparser.add_argument(
|
subparser.add_argument(
|
||||||
'-f', '--file', action='append', default=[],
|
'-f', '--file', action='append', default=[],
|
||||||
dest='specfiles', metavar='SPEC_YAML_FILE',
|
dest='specfiles', metavar='SPEC_YAML_FILE',
|
||||||
|
|||||||
@@ -1643,7 +1643,9 @@ def install_specs(self, specs=None, **install_args):
|
|||||||
|
|
||||||
installs = []
|
installs = []
|
||||||
for spec in specs_to_install:
|
for spec in specs_to_install:
|
||||||
installs.append((spec.package, install_args))
|
pkg_install_args = install_args.copy()
|
||||||
|
pkg_install_args['explicit'] = spec in self.roots()
|
||||||
|
installs.append((spec.package, pkg_install_args))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
builder = PackageInstaller(installs)
|
builder = PackageInstaller(installs)
|
||||||
|
|||||||
Reference in New Issue
Block a user