-
Notifications
You must be signed in to change notification settings - Fork 62
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
Provide better output on toltecctl uninstall #692
Open
Eeems
wants to merge
37
commits into
testing
Choose a base branch
from
Eeems-patch-10
base: testing
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
f0c8013
Provide better output on toltecctl uninstall
Eeems 71c5462
Update version
Eeems 46ab86b
Remove extra whitespace left by the github editor
Eeems 99fb2f6
Make variable local
Eeems c3dba52
No longer use a subshell
Eeems 1649a09
Merge branch 'testing' into Eeems-patch-10
Eeems f10380a
Merge branch 'testing' into Eeems-patch-10
Eeems 25372bd
Merge branch 'testing' into Eeems-patch-10
Eeems f45e08b
Merge branch 'testing' into Eeems-patch-10
Eeems 03d090e
Merge branch 'testing' into Eeems-patch-10
Eeems 90d6117
Merge branch 'testing' into Eeems-patch-10
Eeems ecee049
Merge branch 'testing' into Eeems-patch-10
Eeems 325cd4d
Fix toltec-bootstrap version
Eeems 8937f96
Merge branch 'testing' into Eeems-patch-10
Eeems 038d359
Merge branch 'testing' into Eeems-patch-10
Eeems b7e1753
Merge branch 'testing' into Eeems-patch-10
Eeems 44228c5
Merge branch 'testing' into Eeems-patch-10
Eeems 0e024aa
Merge branch 'testing' into Eeems-patch-10
Eeems 94af3c3
Add missing dependency to launcherctl
Eeems 08c582d
Merge branch 'testing' into Eeems-patch-10
Eeems ea59852
Bump toltec-bootstrap version
Eeems fcedcd4
Force launcherctl to uninstall before xochitl
Eeems 2645de9
Make uninstall way more fault tolerant, and report better errors
Eeems a11076d
Fix error line output
Eeems 9c24c05
Better handle failed uninstalls
Eeems c96df00
Add extra log line
Eeems 30663b7
Fix entware-rc depends
Eeems dcf6d73
fix final exit
Eeems 52b100e
Merge branch 'testing' into Eeems-patch-10
Eeems 96720a3
Merge branch 'testing' into Eeems-patch-10
Eeems 8deff1c
Update toltecctl
Eeems 7604217
Merge branch 'testing' into Eeems-patch-10
Eeems 54d5dcb
Update toltecctl
Eeems 3cd792e
Merge branch 'testing' into Eeems-patch-10
Eeems 3e5c0a1
Merge branch 'testing' into Eeems-patch-10
Eeems 118c9a1
Merge branch 'testing' into Eeems-patch-10
Eeems bf0683f
Merge branch 'testing' into Eeems-patch-10
Eeems File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
completed vs complete, wrong variable names
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.
You seem to be reviewing an outdated version, this is
$complete
for me when I lookThere 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.
Ok, I'm reviewing patches in order, not a full diff. I'm more used to a workflow where a PR is force updated instead of incremental patches and a squash afterwards.
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.
Also I think there is operator order issue here:
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.
Since they are declared as local it could be that they aren't working as expected. Although when I tested this originally it was working as I expected.
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 don't think local makes any difference here,
!
has higher priority than&&
hence it applies only to VAR1 and from the look of it you wanted to apply it to the whole expression (V1 && V2 && V3)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 would have wrapped it in
(
and)
if I was trying to apply it to all of them, I'm checking if not complete, and success and clean. success/clean are true by default and get changed to false when something else handles reporting an error.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.
Ah, ok then. From reading the code it looked to me like you are looking for a failure scenario (e.g. at least one of those vars is false).
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.
In this case, I'm only wanting to handle the error if the error handler is triggered and we did not complete the uninstall, and nothing set success or clean to false due to their own error handling.
It is less than ideal, thus the extra comments on the variable declarations. I couldn't really come up with a cleaner way to handle this with the limitations bash has on error handling.
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 would have to analyze this fully to check the logic completely. I'm too tired now.
What I did find though is that you make a dep between
clean
andsuccess
so checking both in this line might be at least redundant.https://github.com/toltec-dev/toltec/blob/Eeems-patch-10/package/toltec-bootstrap/toltecctl#L885
But I'm not able to check the logic fully now.