| 1 |
2.1.0 behaviour: |
| 2 |
|
| 3 |
|
| 4 |
__git foo |
| 5 |
__package git --state present |
| 6 |
|
| 7 |
__git bar |
| 8 |
__package git --state present |
| 9 |
|
| 10 |
|
| 11 |
require="__git/foo" __git bar: |
| 12 |
|
| 13 |
__git bar |
| 14 |
__git foo |
| 15 |
__package git --state present |
| 16 |
__package git --state present |
| 17 |
__git foo <---| |
| 18 |
__package git --state present ---| |
| 19 |
|
| 20 |
-> detects circular dependency |
| 21 |
|
| 22 |
-------------------------------------------------------------------------------- |
| 23 |
|
| 24 |
require="__apt_repository/somewhere-where-you-can-find-package-git __git/foo" __git bar |
| 25 |
|
| 26 |
__git bar |
| 27 |
__apt_repository somewhere-where-you-can-find-package-git |
| 28 |
|
| 29 |
__git foo |
| 30 |
__package git --state present |
| 31 |
__package_apt git depends nachher auf __apt_repository |
| 32 |
__package git --state present |
| 33 |
__git foo <---| |
| 34 |
__package git --state present ---| |
| 35 |
__apt_repository somewhere-where-you-can-find-package-git |
| 36 |
|
| 37 |
possible solutions: |
| 38 |
- __package git does not depend on __git foo (clear dependency) |
| 39 |
- because it DOES NOT depend on it! |
| 40 |
- but we don't know whether this is always true :-/ |
| 41 |
- multiple instances of __package git exist, with |
| 42 |
- different required BY |
| 43 |
- different requirements |
| 44 |
- define non inheritent dependencies (?) |
| 45 |
- because __git bar really depends only on __git foo |
| 46 |
- proposal: introduce require_non_recursive and require_recursive (previously: require) |
| 47 |
- recording the source of the dependency and use it to assist resolving (?) |
| 48 |
__package git: |
| 49 |
inherited require: __git foo von __git bar |
| 50 |
__git foo: |
| 51 |
inherited autorequire: __package git durch Nutzung |
| 52 |
- break out circular references (?) |
| 53 |
- if either of both parties is only locked by the other, allow execution of this one? |
| 54 |
|
| 55 |
-------------------------------------------------------------------------------- |
| 56 |
|
| 57 |
__package foo |
| 58 |
__package_apt foo |
| 59 |
|
| 60 |
__package bar |
| 61 |
__package_apt bar |
| 62 |
|
| 63 |
require="__package/foo" __package bar |
| 64 |
|
| 65 |
__package bar |
| 66 |
__package foo |
| 67 |
__package_apt foo |
| 68 |
__package_apt bar |
| 69 |
__package foo |
| 70 |
|
| 71 |
|
| 72 |
-------------------------------------------------------------------------------- |
| 73 |
|
| 74 |
__type1 var1 |
| 75 |
__type2 FIX |
| 76 |
|
| 77 |
__type1 var2 |
| 78 |
__type2 FIX |
| 79 |
|
| 80 |
|
| 81 |
-------------------------------------------------------------------------------- |
| 82 |
facts: |
| 83 |
- use is different from require="", as use makes USED depend on parent deps |
| 84 |
- use = called/defined in the manifest of a type |
| 85 |
- it is currently not recorded, where an object gained its requirements and autorequirements |
| 86 |
-------------------------------------------------------------------------------- |
| 87 |
requirements: |
| 88 |
- a type should be a black box: |
| 89 |
I can require an object and it is ensured, |
| 90 |
everything it needs is executed before me. |
| 91 |
|
| 92 |
-------------------------------------------------------------------------------- |
| 93 |
possible implementations |
| 94 |
- requiring it should include everything it USES |
| 95 |
-------------------------------------------------------------------------------- |
| 96 |
solutions: |
| 97 |
__type1 DEPENDS but does not use __type2 FIX |
| 98 |
|
| 99 |
|
| 100 |
-------------------------------------------------------------------------------- |
| 101 |
|
| 102 |
Change proposal: |
| 103 |
|
| 104 |
Each object only depends on the objects it directly requires, tree build to |
| 105 |
ensure correct running behaviour: |
| 106 |
|
| 107 |
|
| 108 |
__git bar |
| 109 |
__git foo |
| 110 |
__package git --state present |
| 111 |
|
| 112 |
__git foo |
| 113 |
__package git --state present |
| 114 |
|
| 115 |
Order: |
| 116 |
|
| 117 |
1) |
| 118 |
__package/git (leaf node!) |
| 119 |
|
| 120 |
2) |
| 121 |
__git/foo (new leaf node!) |
| 122 |
|
| 123 |
3) |
| 124 |
__git/bar (new leaf node!) |
| 125 |
|
| 126 |
|
| 127 |
For __package: |
| 128 |
|
| 129 |
__sometype bar |
| 130 |
__package foo |
| 131 |
|
| 132 |
__package foo |
| 133 |
__package_apt foo |
| 134 |
|
| 135 |
1) __package_apt/foo (leaf node) |
| 136 |
|
| 137 |
2) __package/foo (new leaf node) |
| 138 |
|
| 139 |
3) __sometype/bar (new leaf node) |