diff options
Diffstat (limited to 'lib/spack/spack/spec.py')
-rw-r--r-- | lib/spack/spack/spec.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 36806b757d..0df0ff71ea 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1145,13 +1145,13 @@ class Spec(object): def short_spec(self): """Returns a version of the spec with the dependencies hashed instead of completely enumerated.""" - return self.format('$_$@$%@$+$=$#') + return self.format('$_$@$%@$+$=$/') @property def cshort_spec(self): """Returns a version of the spec with the dependencies hashed instead of completely enumerated.""" - return self.format('$_$@$%@$+$=$#', color=True) + return self.format('$_$@$%@$+$=$/', color=True) @property def prefix(self): @@ -2374,7 +2374,7 @@ class Spec(object): prefixes as above $+ Options $= Architecture prefixed by 'arch=' - $# 7-char prefix of DAG hash with '-' prefix + $/ 7-char prefix of DAG hash with '-' prefix $$ $ You can also use full-string versions, which elide the prefixes:: @@ -2408,7 +2408,7 @@ class Spec(object): of the package, but no dependencies, arch, or compiler. TODO: allow, e.g., ``$6#`` to customize short hash length - TODO: allow, e.g., ``$##`` for full hash. + TODO: allow, e.g., ``$//`` for full hash. """ color = kwargs.get('color', False) length = len(format_string) @@ -2455,8 +2455,8 @@ class Spec(object): if self.architecture and str(self.architecture): a_str = ' arch' + c + str(self.architecture) + ' ' write(fmt % (a_str), c) - elif c == '#': - out.write('-' + fmt % (self.dag_hash(7))) + elif c == '/': + out.write('/' + fmt % (self.dag_hash(7))) elif c == '$': if fmt != '%s': raise ValueError("Can't use format width with $$.") @@ -2529,7 +2529,7 @@ class Spec(object): hashlen = int(hashlen) else: hashlen = None - out.write(fmt % (self.dag_hash(hashlen))) + out.write('/' + fmt % (self.dag_hash(hashlen))) named = False @@ -3161,7 +3161,7 @@ class UnsatisfiableDependencySpecError(UnsatisfiableSpecError): class AmbiguousHashError(SpecError): def __init__(self, msg, *specs): - specs_str = '\n ' + '\n '.join(spec.format('$.$@$%@+$+$=$#') + specs_str = '\n ' + '\n '.join(spec.format('$.$@$%@+$+$=$/') for spec in specs) super(AmbiguousHashError, self).__init__(msg + specs_str) |