Update the content interface to return info from update

Namespace keys used by client for uncompressed

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan
2017-07-12 16:22:13 -07:00
parent 4f388e0e27
commit a78d0bdeac
10 changed files with 318 additions and 181 deletions

View File

@@ -57,12 +57,12 @@ func (i *image) Unpack(ctx context.Context, snapshotterName string) error {
if err != nil {
return err
}
if info.Labels["uncompressed"] != layer.Diff.Digest.String() {
if info.Labels["containerd.io/uncompressed"] != layer.Diff.Digest.String() {
if info.Labels == nil {
info.Labels = map[string]string{}
}
info.Labels["uncompressed"] = layer.Diff.Digest.String()
if err := cs.Update(ctx, info, "labels.uncompressed"); err != nil {
info.Labels["containerd.io/uncompressed"] = layer.Diff.Digest.String()
if _, err := cs.Update(ctx, info, "labels.containerd.io/uncompressed"); err != nil {
return err
}
}