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: unpacking / extracting cleanup #3078

Merged
merged 4 commits into from
Nov 4, 2018

Conversation

antonlacon
Copy link
Contributor

I was looking at adjusting PKG_BUILD and came across these cleanups. There shouldn't be anything exciting in here. This replaces a few places that should be using PKG_BUILD too. To ease looking it up, PKG_BUILD is defined in config/path: https://github.com/LibreELEC/LibreELEC.tv/blob/master/config/path#L132

Tested with an RPi build.

Copy link
Contributor

@MilhouseVH MilhouseVH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, looks good - just a few minors/suggestions.

scripts/unpack Outdated Show resolved Hide resolved
scripts/unpack Outdated Show resolved Hide resolved
scripts/extract Outdated Show resolved Hide resolved
scripts/build Outdated Show resolved Hide resolved
scripts/build Outdated Show resolved Hide resolved
scripts/build Show resolved Hide resolved
@antonlacon antonlacon force-pushed the buildsystem-to-merge2 branch 2 times, most recently from 8450be8 to 3b3af3f Compare November 3, 2018 21:05
@antonlacon
Copy link
Contributor Author

These should be adjusted for, and a couple quotes and the printf -> die message in unpack.

@MilhouseVH
Copy link
Contributor

Thanks for this cleanup.

One minor (additional) suggestion - in scripts/extract, how would you feel about splitting:

[ ! -d "$SOURCES/$1" -o ! -d "$2" ] && die "$PKG_NAME: $SOURCES/$1 not found"

into

[ ! -d "$SOURCES/$1" ] && die "$PKG_NAME: source $SOURCES/$1 not found"
[ ! -d "$2" ] && die "$PKG_NAME: target $2 not found"

?

@MilhouseVH
Copy link
Contributor

Although I'm happy to remove $SED, since it's currently used in 15 packages it might be better to address that in a separate PR, where we can apply any missing -e -i options as required.

@antonlacon
Copy link
Contributor Author

antonlacon commented Nov 4, 2018

Test split, errant ";" removed and echo to replace printf most places. The spot in config/functions where it's used with awk needs confirmation; it looks straight forward, but I don't use awk.

And $SED -> sed in build.

config/functions Outdated Show resolved Hide resolved
scripts/create_addon Outdated Show resolved Hide resolved
@antonlacon antonlacon force-pushed the buildsystem-to-merge2 branch 2 times, most recently from d4ab41f to 1361656 Compare November 4, 2018 00:24
@MilhouseVH
Copy link
Contributor

Looks good to me, thanks. Unless any objections/additions I'd say we can merge this in the next day or so. I'll include in my test builds as well.

Convert to config/functions/die()
Use PKG_BUILD and have it quoted
Replace `` with $()

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Add copyright
Convert to config/functions/die()
Make use of bash default value mechanic
Combine some if tests
Get PKG_BUILD quoted
Replace `` with $()

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
@MilhouseVH MilhouseVH merged commit 1226636 into LibreELEC:master Nov 4, 2018
@antonlacon antonlacon deleted the buildsystem-to-merge2 branch November 8, 2018 23:10
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