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

buildsystem: save/load build config, simplify clean and build --all #2518

Merged
merged 3 commits into from
Feb 25, 2018
Merged

buildsystem: save/load build config, simplify clean and build --all #2518

merged 3 commits into from
Feb 25, 2018

Conversation

MilhouseVH
Copy link
Contributor

Following on from #2516, this is an attempt to save some "state" within each build directory so that it doesn't have to be parsed from the build directory name which isn't going to be reliable/easy in every case.

Have I missed anything (any variables, reasons why this won't work)?

It's not perfect, I realise it's possible to rebuild with different DEBUG values each time, so the presence of DEBUG is somewhat informational and probably shouldn't be relied upon, but would represent the last value used.

The config is only saved when executing scripts/image - not sure if this is going to be a problem with addons. I can't imagine anyone builds the main image exclusively using scripts/build.

@MilhouseVH
Copy link
Contributor Author

MilhouseVH commented Feb 22, 2018

Just thinking about the scripts/build --all <pkg> change... if you have an le9.0 (ie. master) and an le8.2 build directory then running scripts/build --all <pkg> will attempt to build the package in both build directories (in sequence) using the current branch which will be wrong for at least one of the build directories, resulting in carnage. So use with caution...

Edit: Maybe we could store the current branch, and validate it on load (return 1 if wrong branch)?

@MilhouseVH
Copy link
Contributor Author

I've added an update which checks that the current branch is the same branch used to create the build.

@HiassofT
Copy link
Member

HiassofT commented Feb 23, 2018

Checking if the branch matches seems counter-productive to me. I use feature/topic/merge branches a lot when testing new features which means the branch name would never match.

I'm using separate worktrees for each LE repository branch (8.2, master, rockchip) so all builddirs within a tree are built - roughly - from the same LE version.

Switching back and forth between eg 8.2 and master in the same tree looks like a rather odd thing to me. If this is an issue we want to solve, it should be handled at major version level, not branch name. Or just state that this is not supported.

@MilhouseVH
Copy link
Contributor Author

Ok, dropped branch check. Anyone using this will just need to be wary when switching branches.

@chewitt chewitt merged commit 15c3e9e into LibreELEC:master Feb 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants