Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

[Proposal] Move cloned dependencies to temporary directories #82

Open
erfanian opened this issue Mar 6, 2018 · 3 comments
Open

[Proposal] Move cloned dependencies to temporary directories #82

erfanian opened this issue Mar 6, 2018 · 3 comments

Comments

@erfanian
Copy link
Contributor

erfanian commented Mar 6, 2018

Currently we fetch the following assets when running usb.go:

  • The Linux Kernel
  • Linux Firmware
  • Vboot
  • Chrome

I propose that we move cloning these resources to the os.TempDir. Build artifacts that are required for successful execution will be copied to a new stable directory in os.TempDir.

usb would lose support for the following flags:

  • fetch
  • skiproot
  • skipkern
  • keys

Instead, the utility would gain support for one new flag, which would indicate that it should attempt to retrieve all dependencies and recreate any build artifacts. The utility would now check for the presence of the build artifacts in the os.TempDir, and if they were not found, would again attempt to retrieve and recreate all of the build artifacts.

This would have to be done in a way that would still support the static and dynamic build modes.

This may result in more time spent compiling if users reboot frequently.

@rminnich
Copy link
Member

rminnich commented Mar 6, 2018

how about a tmp/ in a persistent place. I don't want to refetch all this stuff very time I reboot.
also, skiproot and skipkern are extremely useful, since I frequently want to test a new kern with an old initramfs, for example. I'd rather not lose these.

These flags seem hacky but if you spend enough time building images they are timesavers. I think this proposal could use some tuning.

@erfanian
Copy link
Contributor Author

erfanian commented Mar 6, 2018

How frequently do you reboot? The cloning should only take a few minutes.

Perhaps it would make more sense to expose the specific kernel tag you'd like to experiment with as a flag?

@hugelgupf
Copy link
Member

It could be like a local vendor directory, in your repo.

./nvendor/kernel
./nvendor/chromium

If you want to redownload your kernel, blow away nvendor/kernel.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants