pmcf 6.53.0 → 6.53.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "6.53.0",
3
+ "version": "6.53.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/content.mjs CHANGED
@@ -67,6 +67,11 @@ export class content extends core {
67
67
  name: "replaces",
68
68
  packagingProperty: true
69
69
  },
70
+ conflicts: {
71
+ ...string_set_attribute_writable,
72
+ name: "conflicts",
73
+ packagingProperty: true
74
+ },
70
75
  optional: {
71
76
  ...string_set_attribute_writable,
72
77
  name: "optional",
@@ -103,6 +108,7 @@ export class content extends core {
103
108
  _optional = new Set();
104
109
  _groups = new Set();
105
110
  _hooks = new Set();
111
+ _conflicts = new Set();
106
112
 
107
113
  get host() {
108
114
  return this.owner.host;
@@ -205,6 +211,16 @@ export class content extends core {
205
211
  );
206
212
  }
207
213
 
214
+ set conflicts(value) {
215
+ this._conflicts = union(value, this._conflicts);
216
+ }
217
+
218
+ get conflicts() {
219
+ return this.expand(
220
+ this.unionFromDirections(["this", "extends"], "_conflicts")
221
+ );
222
+ }
223
+
208
224
  set optional(value) {
209
225
  this._optional = union(value, this._optional);
210
226
  }
@@ -16,7 +16,8 @@ import {
16
16
  integer_attribute_writable,
17
17
  integer_attribute,
18
18
  secret_attribute_writable,
19
- asArray
19
+ asArray,
20
+ leafValues
20
21
  } from "pacc";
21
22
  import {
22
23
  base,
@@ -858,15 +859,25 @@ export class bind extends CoreService {
858
859
  }
859
860
 
860
861
  async writeServers(outputControl) {
862
+
863
+ // TODO
864
+ const all = new Map();
865
+ for (const service of this.primaries) {
866
+ for (const subnet of service.host.network.subnets.values()) {
867
+ //console.log("SA", subnet.fullName);
868
+ all.set(subnet.address, service);
869
+ }
870
+ }
871
+
861
872
  await writeLines(
862
873
  join(outputControl.dir, "etc/named"),
863
874
  `servers.conf`,
864
- asArray(this.primaries).map(service => {
875
+ all.entries().map(([subnet, service]) => {
865
876
  return [
866
- `server ${service.address()} {`,
877
+ `server ${subnet} {`,
867
878
  " keys {" +
868
879
  asArray(service.keys.values())
869
- .filter(key=>key.tags.has('server'))
880
+ .filter(key => key.tags.has("server"))
870
881
  .map(key => ` ${key.name};`)
871
882
  .join("") +
872
883
  " };",