ww: intern canonical directory package actions
This commit is contained in:
@@ -25,6 +25,7 @@ type pkggroup = struct {
|
||||
dir: str,
|
||||
pkg: str,
|
||||
external: bool,
|
||||
production: bool,
|
||||
plan: i32,
|
||||
root: str,
|
||||
bin: str,
|
||||
@@ -608,8 +609,10 @@ fn pkgstartbuild(p: *pkgplan, groups: []pkggroup, builder: str, includes: []str,
|
||||
for (i < p.end) {
|
||||
let g: *pkggroup = &groups[i];
|
||||
append(ba, "--ww-package-test");
|
||||
if (g.external) { append(ba, "external"); }
|
||||
if (g.production) { append(ba, "production"); }
|
||||
else { if (g.external) { append(ba, "external"); }
|
||||
else { append(ba, "same"); };
|
||||
};
|
||||
append(ba, g.pkg);
|
||||
append(ba, g.dir);
|
||||
append(ba, g.bin);
|
||||
@@ -953,6 +956,7 @@ export fn packagecommand(args: []str) int = {
|
||||
g.pkg = srcs[j].pkg;
|
||||
g.external = f.prodpkg.len != 0
|
||||
&& strings.compare(f.prodpkg, g.pkg) != 0;
|
||||
g.production = false;
|
||||
append(groups, g);
|
||||
};
|
||||
};
|
||||
@@ -964,6 +968,7 @@ export fn packagecommand(args: []str) int = {
|
||||
g.pkg = f.prodpkg;
|
||||
if (g.pkg.len == 0) { g.pkg = srcs[f.start].pkg; };
|
||||
g.external = false;
|
||||
g.production = true;
|
||||
append(groups, g);
|
||||
};
|
||||
i += 1;
|
||||
|
||||
Reference in New Issue
Block a user