diff options
author | Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> | 2024-07-11 18:19:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-11 18:19:04 -0700 |
commit | 737b70cbbfacb3fba8054426e9b5bf8ede6d8faf (patch) | |
tree | 0c3ddc25976d55b906218085fb8a925eb063a459 | |
parent | 03d22128815932f5a9e17a17aff8bb2fff5c5857 (diff) | |
download | spack-737b70cbbfacb3fba8054426e9b5bf8ede6d8faf.tar.gz spack-737b70cbbfacb3fba8054426e9b5bf8ede6d8faf.tar.bz2 spack-737b70cbbfacb3fba8054426e9b5bf8ede6d8faf.tar.xz spack-737b70cbbfacb3fba8054426e9b5bf8ede6d8faf.zip |
Buildcache: remove deprecated --allow-root and preview subcommand (#45204)
-rw-r--r-- | lib/spack/docs/environments.rst | 2 | ||||
-rw-r--r-- | lib/spack/spack/cmd/buildcache.py | 23 | ||||
-rw-r--r-- | lib/spack/spack/test/cmd/buildcache.py | 5 | ||||
-rwxr-xr-x | share/spack/spack-completion.bash | 15 | ||||
-rwxr-xr-x | share/spack/spack-completion.fish | 15 |
5 files changed, 6 insertions, 54 deletions
diff --git a/lib/spack/docs/environments.rst b/lib/spack/docs/environments.rst index 726c2bdf4b..ffa5e5f3c3 100644 --- a/lib/spack/docs/environments.rst +++ b/lib/spack/docs/environments.rst @@ -1316,7 +1316,7 @@ index once every package is pushed. Note how this target uses the generated example/push/%: example/install/% @mkdir -p $(dir $@) $(info About to push $(SPEC) to a buildcache) - $(SPACK) -e . buildcache push --allow-root --only=package $(BUILDCACHE_DIR) /$(HASH) + $(SPACK) -e . buildcache push --only=package $(BUILDCACHE_DIR) /$(HASH) @touch $@ push: $(addprefix example/push/,$(example/SPACK_PACKAGE_IDS)) diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py index dae2acdeb9..f43578257a 100644 --- a/lib/spack/spack/cmd/buildcache.py +++ b/lib/spack/spack/cmd/buildcache.py @@ -70,12 +70,6 @@ def setup_parser(subparser: argparse.ArgumentParser): push = subparsers.add_parser("push", aliases=["create"], help=push_fn.__doc__) push.add_argument("-f", "--force", action="store_true", help="overwrite tarball if it exists") - push.add_argument( - "--allow-root", - "-a", - action="store_true", - help="allow install root string in binary files after RPATH substitution", - ) push_sign = push.add_mutually_exclusive_group(required=False) push_sign.add_argument( "--unsigned", @@ -190,10 +184,6 @@ def setup_parser(subparser: argparse.ArgumentParser): keys.add_argument("-f", "--force", action="store_true", help="force new download of keys") keys.set_defaults(func=keys_fn) - preview = subparsers.add_parser("preview", help=preview_fn.__doc__) - arguments.add_common_arguments(preview, ["installed_specs"]) - preview.set_defaults(func=preview_fn) - # Check if binaries need to be rebuilt on remote mirror check = subparsers.add_parser("check", help=check_fn.__doc__) check.add_argument( @@ -404,11 +394,6 @@ def push_fn(args): else: roots = spack.cmd.require_active_env(cmd_name="buildcache push").concrete_roots() - if args.allow_root: - tty.warn( - "The flag `--allow-root` is the default in Spack 0.21, will be removed in Spack 0.22" - ) - mirror: spack.mirror.Mirror = args.mirror # Check if this is an OCI image. @@ -960,14 +945,6 @@ def keys_fn(args): bindist.get_keys(args.install, args.trust, args.force) -def preview_fn(args): - """analyze an installed spec and reports whether executables and libraries are relocatable""" - tty.warn( - "`spack buildcache preview` is deprecated since `spack buildcache push --allow-root` is " - "now the default. This command will be removed in Spack 0.22" - ) - - def check_fn(args: argparse.Namespace): """check specs against remote binary mirror(s) to see if any need to be rebuilt diff --git a/lib/spack/spack/test/cmd/buildcache.py b/lib/spack/spack/test/cmd/buildcache.py index df4fa72a85..b634e37116 100644 --- a/lib/spack/spack/test/cmd/buildcache.py +++ b/lib/spack/spack/test/cmd/buildcache.py @@ -48,11 +48,6 @@ def mock_get_specs_multiarch(database, monkeypatch): monkeypatch.setattr(spack.binary_distribution, "update_cache_and_get_specs", lambda: specs) -def test_buildcache_preview_just_runs(): - # TODO: remove in Spack 0.21 - buildcache("preview", "mpileaks") - - @pytest.mark.db @pytest.mark.regression("13757") def test_buildcache_list_duplicates(mock_get_specs, capsys): diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 02cb496f6d..7a33021f4c 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -564,14 +564,14 @@ _spack_buildcache() { then SPACK_COMPREPLY="-h --help" else - SPACK_COMPREPLY="push create install list keys preview check download get-buildcache-name save-specfile sync update-index rebuild-index" + SPACK_COMPREPLY="push create install list keys check download get-buildcache-name save-specfile sync update-index rebuild-index" fi } _spack_buildcache_push() { if $list_options then - SPACK_COMPREPLY="-h --help -f --force --allow-root -a --unsigned -u --signed --key -k --update-index --rebuild-index --spec-file --only --fail-fast --base-image --tag -t --private -j --jobs" + SPACK_COMPREPLY="-h --help -f --force --unsigned -u --signed --key -k --update-index --rebuild-index --spec-file --only --fail-fast --base-image --tag -t --private -j --jobs" else _mirrors fi @@ -580,7 +580,7 @@ _spack_buildcache_push() { _spack_buildcache_create() { if $list_options then - SPACK_COMPREPLY="-h --help -f --force --allow-root -a --unsigned -u --signed --key -k --update-index --rebuild-index --spec-file --only --fail-fast --base-image --tag -t --private -j --jobs" + SPACK_COMPREPLY="-h --help -f --force --unsigned -u --signed --key -k --update-index --rebuild-index --spec-file --only --fail-fast --base-image --tag -t --private -j --jobs" else _mirrors fi @@ -608,15 +608,6 @@ _spack_buildcache_keys() { SPACK_COMPREPLY="-h --help -i --install -t --trust -f --force" } -_spack_buildcache_preview() { - if $list_options - then - SPACK_COMPREPLY="-h --help" - else - _installed_packages - fi -} - _spack_buildcache_check() { if $list_options then diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index 54be36e912..a2ffebda7c 100755 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -688,7 +688,6 @@ complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a create complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a install -d 'install from a binary package' complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a list -d 'list binary packages available from mirrors' complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a keys -d 'get public keys available on mirrors' -complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a preview -d 'analyze an installed spec and reports whether executables and libraries are relocatable' complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a check -d 'check specs against remote binary mirror(s) to see if any need to be rebuilt' complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a download -d 'download buildcache entry from a remote mirror to local folder' complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a get-buildcache-name -d 'get name (prefix) of buildcache entries for this spec' @@ -700,14 +699,12 @@ complete -c spack -n '__fish_spack_using_command buildcache' -s h -l help -f -a complete -c spack -n '__fish_spack_using_command buildcache' -s h -l help -d 'show this help message and exit' # spack buildcache push -set -g __fish_spack_optspecs_spack_buildcache_push h/help f/force a/allow-root u/unsigned signed k/key= update-index spec-file= only= fail-fast base-image= t/tag= private j/jobs= +set -g __fish_spack_optspecs_spack_buildcache_push h/help f/force u/unsigned signed k/key= update-index spec-file= only= fail-fast base-image= t/tag= private j/jobs= complete -c spack -n '__fish_spack_using_command_pos_remainder 1 buildcache push' -f -k -a '(__fish_spack_specs)' complete -c spack -n '__fish_spack_using_command buildcache push' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command buildcache push' -s h -l help -d 'show this help message and exit' complete -c spack -n '__fish_spack_using_command buildcache push' -s f -l force -f -a force complete -c spack -n '__fish_spack_using_command buildcache push' -s f -l force -d 'overwrite tarball if it exists' -complete -c spack -n '__fish_spack_using_command buildcache push' -l allow-root -s a -f -a allow_root -complete -c spack -n '__fish_spack_using_command buildcache push' -l allow-root -s a -d 'allow install root string in binary files after RPATH substitution' complete -c spack -n '__fish_spack_using_command buildcache push' -l unsigned -s u -f -a signed complete -c spack -n '__fish_spack_using_command buildcache push' -l unsigned -s u -d 'push unsigned buildcache tarballs' complete -c spack -n '__fish_spack_using_command buildcache push' -l signed -f -a signed @@ -732,14 +729,12 @@ complete -c spack -n '__fish_spack_using_command buildcache push' -s j -l jobs - complete -c spack -n '__fish_spack_using_command buildcache push' -s j -l jobs -r -d 'explicitly set number of parallel jobs' # spack buildcache create -set -g __fish_spack_optspecs_spack_buildcache_create h/help f/force a/allow-root u/unsigned signed k/key= update-index spec-file= only= fail-fast base-image= t/tag= private j/jobs= +set -g __fish_spack_optspecs_spack_buildcache_create h/help f/force u/unsigned signed k/key= update-index spec-file= only= fail-fast base-image= t/tag= private j/jobs= complete -c spack -n '__fish_spack_using_command_pos_remainder 1 buildcache create' -f -k -a '(__fish_spack_specs)' complete -c spack -n '__fish_spack_using_command buildcache create' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command buildcache create' -s h -l help -d 'show this help message and exit' complete -c spack -n '__fish_spack_using_command buildcache create' -s f -l force -f -a force complete -c spack -n '__fish_spack_using_command buildcache create' -s f -l force -d 'overwrite tarball if it exists' -complete -c spack -n '__fish_spack_using_command buildcache create' -l allow-root -s a -f -a allow_root -complete -c spack -n '__fish_spack_using_command buildcache create' -l allow-root -s a -d 'allow install root string in binary files after RPATH substitution' complete -c spack -n '__fish_spack_using_command buildcache create' -l unsigned -s u -f -a signed complete -c spack -n '__fish_spack_using_command buildcache create' -l unsigned -s u -d 'push unsigned buildcache tarballs' complete -c spack -n '__fish_spack_using_command buildcache create' -l signed -f -a signed @@ -804,12 +799,6 @@ complete -c spack -n '__fish_spack_using_command buildcache keys' -s t -l trust complete -c spack -n '__fish_spack_using_command buildcache keys' -s f -l force -f -a force complete -c spack -n '__fish_spack_using_command buildcache keys' -s f -l force -d 'force new download of keys' -# spack buildcache preview -set -g __fish_spack_optspecs_spack_buildcache_preview h/help -complete -c spack -n '__fish_spack_using_command_pos_remainder 0 buildcache preview' -f -a '(__fish_spack_installed_specs)' -complete -c spack -n '__fish_spack_using_command buildcache preview' -s h -l help -f -a help -complete -c spack -n '__fish_spack_using_command buildcache preview' -s h -l help -d 'show this help message and exit' - # spack buildcache check set -g __fish_spack_optspecs_spack_buildcache_check h/help m/mirror-url= o/output-file= scope= s/spec= spec-file= complete -c spack -n '__fish_spack_using_command_pos_remainder 0 buildcache check' -f -k -a '(__fish_spack_specs)' |