From 3a95740e6c9e8e9fd66284ae6f3f20dba449d548 Mon Sep 17 00:00:00 2001 From: Anders Ingemann Date: Sun, 7 Jul 2013 22:08:57 +0200 Subject: [PATCH] Actually get MakeTarball to spit out the same sha twice in a row --- providers/ec2/tasks/bootstrap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/providers/ec2/tasks/bootstrap.py b/providers/ec2/tasks/bootstrap.py index 0ba9326..9e27f36 100644 --- a/providers/ec2/tasks/bootstrap.py +++ b/providers/ec2/tasks/bootstrap.py @@ -25,7 +25,9 @@ class MakeTarball(Task): from hashlib import sha1 import os.path executable, options, arguments = get_bootstrap_args(info) - tarball_id = sha1(repr(frozenset(options + arguments))).hexdigest()[0:8] + # Filter info.root which points at /target/volume-id, we won't ever hit anything with that in there. + hash_args = [arg for arg in arguments if arg != info.root] + tarball_id = sha1(repr(frozenset(options + hash_args))).hexdigest()[0:8] tarball_filename = 'debootstrap-{id}.tar'.format(id=tarball_id) info.tarball = os.path.join(info.manifest.bootstrapper['tarball_dir'], tarball_filename) if os.path.isfile(info.tarball):