Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OXT-1073 : mirror upstream layer repos #240

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dozylynx
Copy link
Contributor

OpenEmbedded core takes a long time to clone from source, so this speeds up the build.
Use copies of upstream layers in the local git mirror, if available.
Make them available by default when setting up the git mirror.

Signed-off-by: Christopher Clark [email protected]

Christopher Clark added 2 commits April 11, 2017 15:15
Finds the submodules of the master branch of openxt.git
and adds them to the local git mirror alongside the OpenXT repos.

Signed-off-by: Christopher Clark <[email protected]>
@jean-edouard
Copy link
Member

Your code is incredibly hard to read, and would make build setups more complicated, less flexible and prone to errors (like if a submodule gets added later, or if the branch you want to build doesn't use the same submodules).

If we really want this (I don't), then git submodules is probably not the right tool for us, and we should replace it entirely.

If your end-goal is to reduce build time, there are many other areas that could be improved.
For example, removing the "x11" distro feature on all the images (except UIVM) could shave off dozens of minutes, not seconds!

TL;DR: that's a -1 for me.

@dozylynx
Copy link
Contributor Author

Well, I'm saddened to hear that these two commits, each with fewer than twenty lines of commented shell code, with clear variable names, exceed your complexity tolerance threshold for the project build system.

I made these changes by tuning my local build to reduce the time to get bitbake active and submitted the PR since it should be valuable to anyone else using the project's recommended build system.

  • "incredibly hard to read" : it uses sed twice.

Though they are challenging to read, regular expressions have been a standard UNIX tool syntax for a long time. Their use for this task, parsing and amending the necessary config file, is reasonable.

  • "more complicated" : It adds six more git repositories to a git mirror,
    and less than thirty lines of commented shell code total to the build system.

  • "less flexible" : I don't believe so.
    You don't have to put the repositories in your mirror if you don't want to.

  • "prone to errors" : No, it handles them gracefully.
    "(like if a submodule gets added later, or if the branch you want to build doesn't use the same submodules)"

Either of those cases work just fine. A comment in the patch:
Detect presence in the mirror with git's ls-remote command
shows where the git mirror copy will be used, only if there is one, otherwise leaving the git submodule configuration unchanged and defaulting to the existing behaviour: clone from upstream.

Improve the prior two commits by removing use of "sed", add further
intermediate variables with explanatory names and use git to access its
configuration files.

Signed-off-by: Christopher Clark <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants