Commit 87648549 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

wrapper recipe: accept hash-files already generated inside partition directory

parent 0e0e8d19
......@@ -26,7 +26,6 @@
##############################################################################
import os, shlex
from six.moves import filter
from slapos.recipe.librecipe import GenericBaseRecipe, generateHashFromFiles
from zc.buildout import UserError
......@@ -51,7 +50,9 @@ class Recipe(GenericBaseRecipe):
hash_files = options.get('hash-files')
if hash_files:
self.hash_files = hash_files.split()
self._existing = list(filter(os.path.exists, self.hash_files))
prefix = os.path.realpath(buildout['buildout']['directory']) + os.sep
self._existing = [x for x in self.hash_files
if os.path.exists(x) and not os.path.realpath(x).startswith(prefix)]
else:
self.hash_files = []
hash_files = options.get('hash-existing-files')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment