Commit d54a670a authored by Anthony Mallet's avatar Anthony Mallet
Browse files

[mk] Let tsort-set script still return a package name when none is available

When a package is "not available" for a given platform, the print-pkgnames will
(correctly) return an empty list. This makes tsort-set think that no package
is matching here.

This is bad because:
  * bulk builds results won't be triggered for this package (and appear as
    "unknown" instead of "cannot be built here" / "not available").
  * package sets without NULLGLOB option will incorrectly raise an error

Fix by using the default PKGNAME in tsort-set when print-pkgnames returns the
empty list.
parent 868918ed
......@@ -403,6 +403,10 @@ function pkginfos(pkg, deps, pkgnamep, cmd, dir, i, l, s) {
}
s = close(cmd)
if (s) { xprint("***:Fatal error while scanning " pkg); exit 2 }
if (!(dir in pkgnames) && pkgnamep)
pkgnames[dir,++pkgnames[dir]] = pkgnamep
if (pkgnamep) return pkgnamep
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment