|
@@ -137,8 +137,7 @@ func (ldm *LayerDownloadManager) Download(ctx context.Context, initialRootFS ima
|
|
missingLayer = false
|
|
missingLayer = false
|
|
rootFS.Append(diffID)
|
|
rootFS.Append(diffID)
|
|
// Register this repository as a source of this layer.
|
|
// Register this repository as a source of this layer.
|
|
- withRegistered, hasRegistered := descriptor.(DownloadDescriptorWithRegistered)
|
|
|
|
- if hasRegistered { // As layerstore may set the driver
|
|
|
|
|
|
+ if withRegistered, ok := descriptor.(DownloadDescriptorWithRegistered); ok { // As layerstore may set the driver
|
|
withRegistered.Registered(diffID)
|
|
withRegistered.Registered(diffID)
|
|
}
|
|
}
|
|
continue
|
|
continue
|
|
@@ -360,8 +359,8 @@ func (ldm *LayerDownloadManager) makeDownloadFunc(descriptor DownloadDescriptor,
|
|
}
|
|
}
|
|
|
|
|
|
progress.Update(progressOutput, descriptor.ID(), "Pull complete")
|
|
progress.Update(progressOutput, descriptor.ID(), "Pull complete")
|
|
- withRegistered, hasRegistered := descriptor.(DownloadDescriptorWithRegistered)
|
|
|
|
- if hasRegistered {
|
|
|
|
|
|
+
|
|
|
|
+ if withRegistered, ok := descriptor.(DownloadDescriptorWithRegistered); ok {
|
|
withRegistered.Registered(d.layer.DiffID())
|
|
withRegistered.Registered(d.layer.DiffID())
|
|
}
|
|
}
|
|
|
|
|
|
@@ -453,8 +452,7 @@ func (ldm *LayerDownloadManager) makeDownloadFuncFromDownload(descriptor Downloa
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
- withRegistered, hasRegistered := descriptor.(DownloadDescriptorWithRegistered)
|
|
|
|
- if hasRegistered {
|
|
|
|
|
|
+ if withRegistered, ok := descriptor.(DownloadDescriptorWithRegistered); ok {
|
|
withRegistered.Registered(d.layer.DiffID())
|
|
withRegistered.Registered(d.layer.DiffID())
|
|
}
|
|
}
|
|
|
|
|