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

[repo_update] Address shellcheck issues, simplify pushd+LINK logic #130

Merged
merged 6 commits into from
Jun 5, 2020

Conversation

MarijnS95
Copy link
Contributor

This is an excerpt from #128 containing cleanups and style improvements only. All the functional work on re-entrancy has been dropped, as that needs more time and discussion (and is, for what it's worth, already a far too massive timesink). See that PR for some of the review comments and suggestions.

Most notably this introduces a new function to deduplicate pushd+LINK= logic, whose arguments are always identical except one repository.

MarijnS95 added 6 commits June 4, 2020 10:12
We will be comparing picked commits/reverts and silently skip them if
already applied (only if applied on top of the selected manifest tag),
but for that both diff and context must be identical (even if using
patch-id).

The ipacfg-mgr patch has been re-pushed on top of the current tag to
have this matching context again.

Signed-off-by: Marijn Suijten <[email protected]>
Introduce a function that takes a path which is also used to construct
the fetch URL. Takes a second optional argument in case the path differs
from the fetch URL, as is the case with ipacfg-mgr.
This also hides bloaty LINK=$HTTP && LINK+= logic.

Signed-off-by: Marijn Suijten <[email protected]>
Prevent leaking function-local variables outside which may
unintentionally hide other bugs with "disastrous" results.

Signed-off-by: Marijn Suijten <[email protected]>
No argument is ever (supposed to be) passed to popd, so omit it.

Signed-off-by: Marijn Suijten <[email protected]>
@jerpelea jerpelea merged commit 6cc0cd8 into sonyxperiadev:master Jun 5, 2020
@MarijnS95 MarijnS95 deleted the improvements branch June 5, 2020 12:15

[ "$ANDROOT" != "$PWD" ] && echo "WARNING: enter_aosp_dir was not called from $ANDROOT. Please fix the script to call popd after every block of patches!"

LINK="$HTTP://android.googlesource.com/platform/${2:-$1}"
Copy link
Contributor

Choose a reason for hiding this comment

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

By the way, we may want to modify device/sample or some other repo that doesn't start with platform/.
But that's for another day when we actually need it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But that's for another day when we actually need it.

Exactly my thought. Simplify where possible, refactor when necessary.

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.

3 participants