Commit Graph

33 Commits (9c3f77da3a0e66546334e58d9ea24bb4e94bfa63)

Author SHA1 Message Date
Alexander Larsson 28261d839e update/install: Install/Update runtime dependencies as needed
When an application requires a runtime that is not installed, search
for it and prompt for permissions to install it. Also, update required
runtimes when the app is being updated.
2016-10-19 12:40:49 +02:00
Alexander Larsson b2af78fb6f remotes: Add no-use-for-deps property
If this is set for a remote we will never automatically look for
dependencies in it. This makes dependency search faster, as we
don't need to search in app-only remotes.
2016-10-19 11:34:22 +02:00
Mario Sanchez Prada 7e5f2580a6 New internal API to update configuration of remotes from their summary file
The new function flatpak_dir_update_remote_configuration() can be called
to fetch the contents of the summary file from the remote's source location
and update the local configuration in the installation directory accordingly.

For now, only the xa.title and xa.default-branch configuration parameters
are supported, since those seem to be the only relevant ones at the moment.
2016-10-14 16:42:17 +01:00
Mario Sanchez Prada 44dcc77a18 Check and use the remote's default branch when installing flatpaks
If no branch is explicitly stated when installing a flatpak, and several
options (branches) are available for the same ID, we now check the remote's
default branch and use that one, if it's defined and available for the app.

https://github.com/flatpak/flatpak/issues/221
2016-10-14 16:42:17 +01:00
Mario Sanchez Prada c492def9a7 Fetch the default branch when adding a remote from its repo's summary file
Just like we do with the title, fetch the default-branch from the
repository's summary file and use that information when adding a
remote reference from the command line.

https://github.com/flatpak/flatpak/issues/221
2016-10-14 16:23:15 +01:00
Alexander Larsson c23316cb5d Add FlatpakKinds flag and use instead of booleans 2016-10-14 11:20:53 +02:00
Alexander Larsson bef4de5308 Support default-branch setting in remote configuration
For now this is a purely client side setting which lets you store
the default branch to use for a remote. This is mostly meant to
be used for UI tools, although the CLI could also be made to use this.

You can set this manually in the CLI with --default-branch, or via a
flatpakrepo file (new key DefaultBranch).
2016-10-06 11:36:28 +02:00
Alexander Larsson edac377e86 origin remotes: Store main ref
If you install an app via a bundle of a .flatpakref file then
the ref of the app is also saved with the remote metadata.
2016-09-12 11:58:22 +02:00
Alexander Larsson 71500ae5ec Add support for .flatpakref files
These are similar to .flatpakrepo, but for a single app.

For example, if you have a file gedit.flatpakref with this:

[Flatpak Ref]
Title=GEdit
Name=org.gnome.gedit
Branch=stable
Url=http://sdk.gnome.org/repo-apps/
IsRuntime=False
GPGKey=mQENBFUUCGcBCAC/K9WeV4xCaKr3NKRqPXeY5mpaXAJyasLqCtrDx92WUgbu0voWrhohNAKpqizod2dvzc/XTxm3rHyIxmNfdhz1gaGhynU75Qw4aJVcly2eghTIl++gfDtOvrOZo/VuAq30f32dMIgHQdRwEpgCwz7WyjpqZYltPAEcCNL4MTChAfiHJeeiQ5ibystNBW8W6Ymf7sO4m4g5+/aOxI54oCOzD9TwBAe+yXcJJWtc2rAhMCjtyPJzxd0ZVXqIzCe1xRvJ6Rq7YCiMbiM2DQFWXKnmYQbj4TGNMnwNdAajCdrcBWEMSbzq7EzuThIJRd8Ky4BkEe1St6tuqwFaMZz+F9eXABEBAAG0KEdub21lIFNESyAzLjE2IDxnbm9tZS1vcy1saXN0QGdub21lLm9yZz6JATgEEwECACIFAlUUCGcCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEArkz6VV0VKBa5cH/0vXa31YgEjNk78gGFXqnQxdD1WYA87OYxDi189l4lA802EFTF4wCBuZyDOqdd5BhS3Ab0cR778DmZXRUP2gwe+1zTJypU2JMnDpkwJ4NK1VP6/tE4SAPrznBtmb76BKaWBqUfZ9Wq1zg3ugvqkZB/Exq+usypIOwQVp1KL58TrjBRda0HvRctzkNhr0qYAtkfLFe0GvksBp4vBm8uGwAx7fw/HbhIjQ9pekTwvB+5GwDPO/tSip/1bQfCS+XJB8Ffa04HYPLGedalnWBrwhYY+G/kn5Zh9L/AC8xeLwTJTHM212rBjPa9CWs9C6a57MSaeGIEHLC1hEyiJJ15w8jmY=

You can then install gedit with
  flatpak install --from gedit.flatpakref
2016-09-09 16:50:32 +02:00
Alexander Larsson fbca999cc9 Create /app/(.updated|.removed) file after update/uninstall
This way running apps can easily detect this and restart themselves.
2016-09-06 09:16:04 +02:00
Matthias Clasen 75218c4a65 Fix license headers
We were referring to the nonexisting "version 2" of the
Lesser GPL. It should be "version 2.1".
2016-07-29 14:27:49 -04:00
Alexander Larsson 764cb91cbe Remove workaround for issue #144 now that ostree is fixed
The fix for this is in ostree 2016.7

https://github.com/flatpak/flatpak/issues/144
2016-07-29 01:20:40 +02:00
Alexander Larsson 5da7a0411a lib: Support listing related refs 2016-07-01 10:32:57 +02:00
Alexander Larsson 4a40fece78 Add flatpak_dir_install_or_update
This is needed in the case where we can do any, such as when
installing related refs, which may be already installed.
2016-06-30 16:55:31 +02:00
Alexander Larsson 8293527dbd FlatpakDir: Add flatpak_dir_find_remote/local_related
This lets us find all the "related" refs to a ref in a particular
remote, or locally.  These are the things we should automatically
download or delete when installing/updating/uninstalling the ref.

The implementation currently looks at all the extensions handled by the
app/runtime. For debug extensions and extensions marked no-autodownload we
only consider them related if its already locally installed. For locale
extensions we always consider them related, but we only pull the current
locale data for it.
2016-06-30 16:55:26 +02:00
Alexander Larsson 9be05bc511 common: Remove unused functions 2016-06-29 16:43:02 +02:00
Alexander Larsson 9915e3740b Disable static deltas for system-helper updates
Due to an issue with ostree (https://github.com/ostreedev/ostree/pull/362)
applying non-from-scratch deltas fail when using parent_repo such as
in the system-helper case. We fix this temporarily by disabling the
use of deltas for that case.
2016-06-23 12:16:02 +02:00
Alexander Larsson cfef57e343 Properly handle subpaths on update 2016-06-07 22:12:51 +02:00
Alexander Larsson 8ef84cc3d1 Move shared bundle install code to flatpak_dir_install_bundle 2016-06-03 14:30:25 +02:00
Alexander Larsson 13707f6b18 system-helper: Support directly pulling local remotes
For a local (file:// uri) remote, do an (untrusted) direct pull instead
of pulling into the users cached repo first. This way we do less copies,
as well as guaranteeing the source of the data. The later means its
mostly safe to also allow this for non-gpg signed remotes.
2016-06-02 15:30:08 +02:00
Alexander Larsson eeaa832095 Replace bash completion shell script with C-based version
This doesn't do everything yet, but its got the basics covered.
2016-05-27 16:30:13 +02:00
Alexander Larsson 910328e535 Support no-deploy and no-pull via system helper 2016-05-20 13:30:50 +02:00
Alexander Larsson 251dcdb680 system-helper: Never use a system helper recursively 2016-05-17 11:54:44 +02:00
Alexander Larsson 1504f7bd7f system-helper: Support add/modify/delete of remotes 2016-05-13 16:23:43 +02:00
Alexander Larsson 2875cdead5 remote-delete: Move to FlatpakDir and add checks for installed refs
You can't remove a remote unless you --force or there are no installs
from it.
2016-05-13 14:17:46 +02:00
Alexander Larsson 753cdc97fd Fix typo: flatpak_dir_modify_remove -> flatpak_dir_modify_remote 2016-05-13 13:59:48 +02:00
Alexander Larsson 5407b8efc6 system-helper: Support uninstall 2016-05-12 21:23:36 +02:00
Alexander Larsson fe0a1be5f8 common: Add flags for flatpak_dir_uninstall
This is better than a list of booleans.
2016-05-12 19:52:48 +02:00
Alexander Larsson c5e178f339 Use flatpak_dir_uninstall for app and lib 2016-05-12 17:18:14 +02:00
Alexander Larsson 2ef6d9d5d9 common: Remove FlatpakDirError in favour of FlatpakError from the lib 2016-05-12 16:43:16 +02:00
Alexander Larsson 9e4bb25b2c modify-remote: Move the actual config rewriting to FlatpakDir
This is in preparation for doing this in the system helper.
2016-05-11 15:43:40 +02:00
Alexander Larsson 1877f0be8d system-helper: Add support for updating appstream branch 2016-05-11 10:35:24 +02:00
Alexander Larsson c24528d369 Rename source files to flatpak 2016-05-09 09:00:20 +02:00