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

fbcode_builder: getdeps: fboss: OpenBCM depends on git-lfs

Summary:
OpenBCM libraries are stored with git LFS. As a result, fetcher fetches LFS pointers and not the contents. Use git-lfs to pull the real contents before copying to install dir using NoopBuilder.
In future, if more builders require git-lfs, we would consider installing
git-lfs as part of the sandcastle infra as against repeating similar
 logic for each builder that requires git-lfs.

Reviewed By: wez

Differential Revision: D18759806

fbshipit-source-id: f988a0460107bc0685e7aba107daba9ed88f71e7
This commit is contained in:
Shrikrishna Khare
2019-12-03 11:40:27 -08:00
committed by Facebook Github Bot
parent dd6348ab5d
commit 3a2cd95655
3 changed files with 31 additions and 1 deletions

View File

@@ -723,6 +723,26 @@ class NopBuilder(BuilderBase):
shutil.copytree(self.src_dir, self.inst_dir)
class OpenBCMBuilder(NopBuilder):
# OpenBCM libraries are stored with git LFS. As a result, fetcher fetches
# LFS pointers and not the contents. Use git-lfs to pull the real contents
# before copying to install dir using NoopBuilder.
# In future, if more builders require git-lfs, we would consider installing
# git-lfs as part of the sandcastle infra as against repeating similar
# logic for each builder that requires git-lfs.
def __init__(self, build_opts, ctx, manifest, src_dir, inst_dir):
super(OpenBCMBuilder, self).__init__(
build_opts, ctx, manifest, src_dir, inst_dir
)
def build(self, install_dirs, reconfigure):
env = self._compute_env(install_dirs)
self._run_cmd(["git", "lfs", "install", "--local"], cwd=self.src_dir, env=env)
self._run_cmd(["git", "lfs", "pull"], cwd=self.src_dir, env=env)
super(OpenBCMBuilder, self).build(install_dirs, reconfigure)
class SqliteBuilder(BuilderBase):
def __init__(self, build_opts, ctx, manifest, src_dir, build_dir, inst_dir):
super(SqliteBuilder, self).__init__(