Signed-off-by: Tibor Vass <tibor@docker.com>
| ... | ... |
@@ -516,6 +516,15 @@ func (p *puller) Snapshot(ctx context.Context) (cache.ImmutableRef, error) {
|
| 516 | 516 |
return nil, err |
| 517 | 517 |
} |
| 518 | 518 |
|
| 519 |
+ // TODO: handle windows layers for cross platform builds |
|
| 520 |
+ |
|
| 521 |
+ if p.src.RecordType != "" && cache.GetRecordType(ref) == "" {
|
|
| 522 |
+ if err := cache.SetRecordType(ref, p.src.RecordType); err != nil {
|
|
| 523 |
+ ref.Release(context.TODO()) |
|
| 524 |
+ return nil, err |
|
| 525 |
+ } |
|
| 526 |
+ } |
|
| 527 |
+ |
|
| 519 | 528 |
return ref, nil |
| 520 | 529 |
} |
| 521 | 530 |
|
| ... | ... |
@@ -72,6 +72,8 @@ func newController(rt http.RoundTripper, opt Opt) (*control.Controller, error) {
|
| 72 | 72 |
cm, err := cache.NewManager(cache.ManagerOpt{
|
| 73 | 73 |
Snapshotter: snapshotter, |
| 74 | 74 |
MetadataStore: md, |
| 75 |
+ // TODO: implement PruneRefChecker to correctly mark cache objects as "Shared" |
|
| 76 |
+ PruneRefChecker: nil, |
|
| 75 | 77 |
}) |
| 76 | 78 |
if err != nil {
|
| 77 | 79 |
return nil, err |