When --reinstall-all is given, re-deploy all refs,
regardless whether they were removed from the repo
or not. This can be used to ensure that directories
in the checkout have the right mode, which does not
otherwise get corrected.
Closes: #2473
Approved by: alexlarsson
If a .removed directory is left behind, that can
cause things to behave in confusing ways. Try to
remove it and report an error if it fails.
Closes: #2473
Approved by: alexlarsson
When operating on a system installation as non-root,
making changes will fail, and the experience is a
bit confusing. Be explicit about it.
Closes: #2473
Approved by: alexlarsson
When --force is not given, ask the user for confirmation
whether he wants to remove refs that are installed from
the remote, and if he agrees, uninstall them.
Note that this is different from --force, which just
leaves the apps behind.
Closes: #577Closes: #2518
Approved by: alexlarsson
When we deploy e.g. app/org.foo.bar/x86_64/stable, then we
also create a deploy/app/org.foo.bar/x86_64/stable ref pointing to
the latest deployed commit. We also remove it when an app is uninstalled.
This means that a prune operation will not delete objects that are deployed
(which would not save any space anyway). This is nice because this can
happen for instance when you flatpak update --no-deploy.
Fixes https://github.com/flatpak/flatpak/issues/2085Closes: #2563
Approved by: alexlarsson
When a running cli transaction is interupted by Ctrl-C,
we exit with a hidden cursor. Add a signal handler which
shows the cursor before exiting.
Closes: #2561Closes: #2570
Approved by: alexlarsson
Use OPTIONAL_REPO since an empty repo seems repairable,
and also dont stop completing options after the second.
This is a copy-paste error from other completion functions.
Closes: #2585
Approved by: alexlarsson
This lets completion keep working after you type
flatpak remote-add --installation=empty
We already use OPTIONAL_REPO in the command, so there
is really no reason to not do the same for completion.
Closes: #2585
Approved by: alexlarsson
This lets completion keep working after you type
flatpak make-current --installation=empty
It is somewhat cosmetic since there's nothing to
install on an empty repo, but no need to silently
disappear the remaining options.
Closes: #2585
Approved by: alexlarsson
This lets completion keep working after you type
flatpak install --installation=empty
It is somewhat cosmetic since there's nothing to
install on an empty repo, but no need to silently
disappear the remaining options.
Closes: #2585
Approved by: alexlarsson
The --list and --get implementations work just fine
on empty repos (reporting the default values). So
don't err out prematurely during option parsing.
Closes: #2585
Approved by: alexlarsson
Move the code that is handling the empty options
(--version, etc) to the one place where we parse them.
This gets this code out of the completion path and
make flatpak_option_context_parse easier to understand.
Closes: #2585
Approved by: alexlarsson
We never want g_option_context_parse to produce help
output when we are in the middle of completion.
But we still want to see --help, -h, -? among the
completions.
To achieve that, disable the built-in help and add
(ignored) help entries to our option context when
we are completing.
Closes: #2585
Approved by: alexlarsson
It's no longer true that it's the pull code's job to resolve a ref to a
specific commit. Ever since commit 66eee3c2c this is the job of the
resolve_ops() function used by FlatpakTransaction (at least, when a
transaction is being used). So update a couple comments to avoid
confusion.
Closes: #2587
Approved by: alexlarsson