mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-03-23 12:35:44 +00:00
Fix image comparison when running intermediate targets with depends_on
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
This commit is contained in:
parent
8956fc1e5a
commit
2b223f55fa
@ -597,7 +597,7 @@ module.exports = class ApplicationManager extends EventEmitter
|
||||
if target.dependsOn?
|
||||
for dependency in target.dependsOn
|
||||
dependencyService = _.find(targetApp.services, (s) -> s.serviceName == dependency)
|
||||
if !_.find(availableImages, (image) => @images.isSameImage(image, { name: dependencyService.imageName }))?
|
||||
if !_.find(availableImages, (image) => image.dockerImageId == dependencyService.image or @images.isSameImage(image, { name: dependencyService.imageName }))?
|
||||
return false
|
||||
return true
|
||||
|
||||
|
@ -258,8 +258,8 @@ module.exports = class Images extends EventEmitter
|
||||
@imageCleanupFailures[image] = Date.now()
|
||||
|
||||
@hasSameDigest: (name1, name2) ->
|
||||
hash1 = name1.split('@')[1]
|
||||
hash2 = name2.split('@')[1]
|
||||
hash1 = name1?.split('@')[1]
|
||||
hash2 = name2?.split('@')[1]
|
||||
return hash1? and hash1 == hash2
|
||||
|
||||
@isSameImage: (image1, image2) ->
|
||||
|
Loading…
x
Reference in New Issue
Block a user