1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-07 07:02:53 +03:00

fbcode_builder: getdeps: add list-deps subcommand

Summary:
While the command isn't necessarily super useful
on its own, it does show that the plumbing for walking the
deps is functioning, and that is important when it comes
to building.

The output lists the projects in the order that they
would be built.

The `fetch` command has been augmented to add a `--recursive`
flag that uses the same mechanism to recursively fetch
the dependencies.

Reviewed By: simpkins

Differential Revision: D14691004

fbshipit-source-id: b00bf6ad4742f8bb0a70698f71a5fe03d6a1f453
This commit is contained in:
Wez Furlong
2019-05-03 15:52:39 -07:00
committed by Facebook Github Bot
parent 1c49eff9ca
commit d0c4fccca9
3 changed files with 144 additions and 6 deletions

View File

@@ -96,3 +96,21 @@ class HostType(object):
and self.distro == b.distro
and self.distrovers == b.distrovers
)
def context_from_host_tuple(host_tuple=None):
""" Given an optional host tuple, construct a context appropriate
for passing to the boolean expression evaluator so that conditional
sections in manifests can be resolved. """
if host_tuple is None:
host_type = HostType()
elif isinstance(host_tuple, HostType):
host_type = host_tuple
else:
host_type = HostType.from_tuple_string(host_tuple)
return {
"os": host_type.ostype,
"distro": host_type.distro,
"distro_vers": host_type.distrovers,
}