fix(setup): block finishing without the provider's sync engine (closes #210) - #213
Merged
Merged
Conversation
…#210) Both engines are alternative optdepends (pacman has no OR dependency), so the package also warns at install/upgrade when neither binary is present.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The setup wizard let the user finish and add folders for a provider whose sync engine was not installed. The failure only surfaced later as a generic "Synchronization failed" (or, before #209, as a misleading "Synchronization completed" from the ETag gate).
Fix
Wizard (closes #210):
finish_setupis the single choke point every finish path goes through (first-sync confirmation, resume, decision). It now checks the engine for the currently selected provider - so switching providers re-evaluates the check - and blocks with an actionable dialog naming the package (nextcloud-client/opencloud-desktop) instead of completing.engine_install_hint(provider, engine_present)) covered by a unit test, no real$PATHneeded.Packaging (the "at least one engine" ask): pacman has no "A or B" dependency (ArchWiki PKGBUILD#optdepends: alternative dependencies belong in optdepends), so:
optdependsnow lists BOTH engines:nextcloud-client(nextcloudcmd) andopencloud-desktop(opencloudcmd).nextsync.installwarns on install/upgrade when NEITHERnextcloudcmdnoropencloudcmdis available. Verified in the built package:.PKGINFOcarries both optdepends and.INSTALLis included.With #209 (runtime detection + no false success), #210 (wizard) and this packaging change, all three layers now point at the same fix.
Tests (red-green)
engine_install_hint_blocks_only_when_the_binary_is_missing: never blocks when the engine is present; blocking hints name the right binary and Arch package for both providers.--all-targetsclean, fmt clean, i18n catalog parity clean (3 new strings, ES included).makepkg), includes.INSTALL, and both optdepends are in.PKGINFO.