Skip to content

Error when creating mirror in already existing mirror location #13722

@white238

Description

@white238

I ran spack twice in a row to create a mirror in the same location. I expected it to update the mirror location with new packages. It errored.

Steps to reproduce the issue

$ spack/bin/spack mirror create -d /usr/WS2/white238/serac/mirror --dependencies serac_devtools
$ spack/bin/spack mirror create -d /usr/WS2/white238/serac/mirror --dependencies serac_devtools

Error Message

==> Adding package serac_devtools@fakeversion to mirror
==> Error: 'FileExistsError' object has no attribute 'message'

Running with -d got two stack traces in a single spack run:

Traceback (most recent call last):
File "/usr/WS2/white238/serac/repo/uberenv_libs/spack/lib/spack/spack/mirror.py", line 506, in add_single_spec
pkg_stage.cache_mirror(mirror_stats)
File "/usr/WS2/white238/serac/repo/uberenv_libs/spack/lib/spack/spack/util/pattern.py", line 68, in getter
getattr(item, self.name)(*args, **kwargs)
File "/usr/WS2/white238/serac/repo/uberenv_libs/spack/lib/spack/spack/stage.py", line 508, in cache_mirror
self.mirror_paths.cosmetic_path)
File "/usr/WS2/white238/serac/repo/uberenv_libs/spack/lib/spack/spack/caches.py", line 72, in store
os.symlink(relative_dst, cosmetic_path)
FileExistsError: [Errno 17] File exists: 'serac_devtools-fakeversion.tar.gz' -> '/usr/WS2/white238/serac/mirror/serac_devtools/serac_devtools-fakeversion.tar.gz'

==> [2019-11-13-11:04:55.099182] Successfully updated mirror in file:///usr/WS2/white238/serac/mirror
Archive stats:
50 already present
0 added
1 failed to fetch.
==> [2019-11-13-11:04:55.099393] Error: Failed downloads:
serac_devtools@fakeversion
Traceback (most recent call last):
File "/usr/WS2/white238/serac/repo/uberenv_libs/spack/lib/spack/spack/main.py", line 715, in main
return _invoke_command(command, parser, args, unknown)
File "/usr/WS2/white238/serac/repo/uberenv_libs/spack/lib/spack/spack/main.py", line 457, in _invoke_command
return_val = command(parser, args)
File "/usr/WS2/white238/serac/repo/uberenv_libs/spack/lib/spack/spack/cmd/mirror.py", line 338, in mirror
actionargs.mirror_command
File "/usr/WS2/white238/serac/repo/uberenv_libs/spack/lib/spack/spack/cmd/mirror.py", line 324, in mirror_create
sys.exit(1)
SystemExit: 1

Information on your system

This includes:

  1. llnl, toss3, rzgenie
  2. Custom package.py:

from spack import *

class SeracDevtools(BundlePackage):
"""This is a set of tools necessary for the developers of Serac"""

version('fakeversion')

depends_on('astyle')
depends_on('cmake')
depends_on('cppcheck')
depends_on('doxygen')
depends_on('python')
depends_on('py-sphinx')

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions