diff options
Diffstat (limited to 'ybd/cache.py')
-rw-r--r-- | ybd/cache.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/ybd/cache.py b/ybd/cache.py index b12d0f3..b4f5e27 100644 --- a/ybd/cache.py +++ b/ybd/cache.py @@ -90,9 +90,6 @@ def cache_key(dn): def hash_factors(dn): hash_factors = {'arch': app.config['arch']} - for factor in dn.get('build-depends', []): - hash_factors[factor] = cache_key(factor) - for factor in dn.get('contents', []): hash_factors[factor.keys()[0]] = cache_key(factor.keys()[0]) @@ -146,6 +143,18 @@ def hash_factors(dn): if dn.get('rpm-metadata'): hash_factors['rpm-metadata'] = dn['rpm-metadata'] + if artifact_version in range(0, 12): + for factor in dn.get('build-depends', []): + hash_factors[factor] = cache_key(factor) + else: + build_depends = [cache_key(bd) for bd in + dn.get('build-depends', [])] + if build_depends: + hash_factors['build-depends'] = build_depends + + if dn.get('prefix'): + hash_factors['prefix'] = dn['prefix'] + return hash_factors |