dependency order unclear
alban opened this issue · 1 comments
appc/spec says:
The dependencies are applied in order and each image dependency can overwrite files from the previous dependency.
It is not really clear how it works. In rkt/rkt#1752, we have this example of dependencies:
A->B
A->C
A->D
C->B
C->E
D->B
D->E
If we flatten the tree, depth-first, we get the list: A, B, C, E, D. If we flatten the tree, breadth-first, we get the list: A, B, C, D, E. When a file exists in all layers, should we take E's version or D's version? I think the depth-first list makes more sense and we should take E's version.
Another example, with path whitelist:
A->B
A->C
A->D
B->D
B->C
(notice how the order between C and D differs)
The depth-first list is A, B, C, D. If all layers have /file1
and /file2
, but B has a path whitelist={/file2}, then /file1
is hidden from B.aci. Does it mean that we should take D's version of /file1
but C's version of /file2
?
I think it's a little worse than that in that we don't really discuss recursive dependencies at all
https://github.com/appc/spec/blob/master/spec/ace.md#filesystem-setup
Would you mind putting together a proposal to clarify?