-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
chore(subpackages): make TERMUX_SUBPKG_DEPENDS check more readable
#24146
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
Conversation
|
I have now pushed commit 2 of this cleanup PR; This should probably be committed with |
bb777b2 to
c50670e
Compare
a8fd3ad to
3f840d1
Compare
|
The tree-wide rename of |
|
I'd like to merge this in ~6 hours if there's no further comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested building several packages with this in several modes, and I have not seen any problems. There is no way to really test every single possible combination of modes in a short period of time, but it is probably completely working.
|
The The rest of the changes to the subpackage scripts I have validated to preserve all observable previous semantics, but it's of course possible that I missed something. None of these changes except the variable rename should change the public "API" of the build system. |
| local PKG_DEPS_SPC=" ${TERMUX_PKG_DEPENDS//,/} " | ||
| if [ -z "$TERMUX_SUBPKG_DEPEND_ON_PARENT" ] && [ "${PKG_DEPS_SPC/ $SUB_PKG_NAME /}" = "$PKG_DEPS_SPC" ] || [ "$TERMUX_SUBPKG_DEPEND_ON_PARENT" = "true" ]; then | ||
| # Does pacman supports versioned dependencies? | ||
| #TERMUX_SUBPKG_DEPENDS+=", $TERMUX_PKG_NAME (= $TERMUX_PKG_FULLVERSION)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, I saw that this part appears to change whether the pacman TERMUX_SUBPKG_DEPEND_ON_PARENT=true subpackage has a versioned dependency on the pacman parent package or a non-versioned dependency, but maybe you checked to be sure this is completely working. It looks fine to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to check with @Maxython just to be sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hold on, you're right I copied the case here over from the debian subpackage script when I should have included that note from the if statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To answer the question in the comment by the way, yes pacman supports versioned dependencies.
https://wiki.archlinux.org/title/PKGBUILD#Dependencies
But I think that's best left as a matter for another PR, this one isn't meant to change existing behavior.
I'll adjust the comment to make this a TODO.
3f840d1 to
5b6e7c2
Compare
5b6e7c2 to
79d1659
Compare
|
Wiki has been updated, I have also documented |
This is an enhancement based on a question from discord user
444_aaa.This first commit improves the readability of the
TERMUX_SUBPKG_DEPENDScheck by consolidating it into acasestatement.The semantics of requiring an empty variable in order to default to
trueare preserved using the: "${var:=default}"idiom.I will be adding additional commits for general cleanup of the subpackage creation scripts to this PR shortly.