Alexander Larsson
1ee1ed6eb9
lib: Fix a tiny leak
2016-02-26 14:17:07 +01:00
Alexander Larsson
38c24d536a
Update test-lib.c with the appstream api change
2016-02-26 12:53:47 +01:00
Alexander Larsson
d43d8cd8c8
Change xdg_app_bundle_ref_get_appdata to xdg_app_bundle_ref_get_appstream
...
This is technically an ABI break, but nothing is using this yet.
2016-02-26 12:52:38 +01:00
Alexander Larsson
26c2bb1b81
lib: Add xdg_app_bundle_ref_get_installed_size()
2016-02-25 21:34:44 +01:00
Alexander Larsson
0e1d83e94c
lib: Add XdgAppBundleRef api to get appdata and icons
2016-02-25 20:12:04 +01:00
Alexander Larsson
6c5e1a8a92
Fix some compiler warning (unused vars)
2016-02-25 16:09:49 +01:00
Alexander Larsson
382ae396b3
lib: Add xdg_app_installation_install_bundle
2016-02-25 16:05:13 +01:00
Alexander Larsson
69052c7d9a
lib: Add XdgAppBundleRef
2016-02-24 14:44:16 +01:00
Alexander Larsson
ca4187ac27
Fix typos in header
2016-02-24 13:48:03 +01:00
Alexander Larsson
3d18255ba3
Add xdg_app_installation_get_remote_by_name
2016-02-18 11:40:48 +01:00
Alexander Larsson
e0b08161d7
lib: Add xdg_app_installation_get_path
2016-02-16 16:30:33 +01:00
Alexander Larsson
ac851cae9e
lib: Return GBytes from xdg_app_installed_ref_load_metadata()
...
This is an ABI break, but nothing uses this yet.
2016-02-16 16:11:01 +01:00
Alexander Larsson
93006c5a40
Update exports on uninstall via library too
2016-02-09 16:17:02 +01:00
Richard Hughes
79aacf0640
lib: Fix crash during uninstall
2016-02-03 11:00:25 +01:00
Alexander Larsson
77ae6b1df0
lib: Fix up doc details
2016-01-28 11:37:35 +01:00
Alexander Larsson
fba7408d53
lib: Add some missing docs
2016-01-28 11:36:07 +01:00
Sam Thursfield
68c0e04adc
Fix some misc. gtk-doc warnings
2016-01-28 11:26:29 +01:00
Sam Thursfield
66cdd7b197
Document the structs in libxdg-app
2016-01-28 11:26:12 +01:00
Sam Thursfield
dcf1df2454
Complete documentation for XdgAppInstallation
2016-01-28 11:25:50 +01:00
Sam Thursfield
5c847d54fa
Avoid gtk-doc warnings: multiple ID for constraint linkend
...
This fixes the huge number of gtk-doc warnings that look like this:
Warning: multiple "IDs" for constraint linkend: XdgAppRef
Based on:
https://mail.gnome.org/archives/commits-list/2010-September/msg00222.html
2016-01-28 11:25:34 +01:00
Alexander Larsson
7940a773ef
Always build libxmlapp
2016-01-22 22:19:52 +01:00
Alexander Larsson
f363fddd32
lib: Properly finishe OstreeAsyncProgress objects
2016-01-22 15:14:36 +01:00
Alexander Larsson
42f069dd5f
lib: Add xdg_app_ref_parse
2016-01-20 17:11:14 +01:00
Alexander Larsson
8da9d592ba
appstream: Add timestamp which is updated each time the appstream is pulled
2016-01-20 15:14:01 +01:00
Alexander Larsson
df44834b0c
Revert "lib: Allow passing NULL for remote name in update_appstream"
...
This reverts commit 9a185947a3
.
This was problematic wrt how partial errors are reported
2016-01-19 22:06:06 +01:00
Alexander Larsson
9a185947a3
lib: Allow passing NULL for remote name in update_appstream
2016-01-19 21:59:43 +01:00
Alexander Larsson
388d3ce500
lib: update_appstream - work around main context issue
2016-01-19 18:57:19 +01:00
Alexander Larsson
1d89c2fcab
lib: Add xdg_app_remote_get_appstream_dir
2016-01-19 15:18:44 +01:00
Alexander Larsson
2bede34952
lib: Add getter for installed size on InstalledRef
2016-01-19 15:05:06 +01:00
Alexander Larsson
2abe3ff911
Fix possible read of uninitialized variable
2016-01-19 12:38:03 +01:00
Alexander Larsson
de7e19e40f
The plural of appdata is appstream
2016-01-18 21:06:42 +01:00
Alexander Larsson
22b30f7074
lib: Add xdg_app_installation_update_appdata_sync
2016-01-15 16:15:25 +01:00
Alexander Larsson
a1b5bb1507
xdg_app_installation_list_remote_refs_sync: Don't crash on weird refs
2016-01-15 14:53:34 +01:00
Alexander Larsson
78601a42ce
lib: xdg_app_installation_fetch_remote_size_sync
2016-01-14 16:45:44 +01:00
Alexander Larsson
f7a1fdaa99
xdg-app: Deprecate install/update/uninstall-app/runtime
...
We just have install/updata/uninstall and have --app and --runtime
options if you really want to specify the type. Otherwise we just
automatically chose the right thing.
2016-01-13 15:34:08 +01:00
Alexander Larsson
1934562ca2
run: Be more flexible with --runtime option, and add --runtime-version
...
This makes it easier to experiment with running an app with a
different runtime.
2016-01-12 09:57:20 +01:00
Alexander Larsson
25ef0aaeae
lib: Add xdg_app_installation_create_monitor
...
This just returns a new file monitor for the .changes file.
2015-12-21 11:13:00 +01:00
Alexander Larsson
cd490d12a7
XdgAppDir: Touch .changes file each time something changes
2015-12-21 11:12:25 +01:00
Alexander Larsson
ea543c8f93
lib/app: Add support for repo priorities
...
New repos default to prio 1, bundle repos default to prio 0.
Listing repos returns in sorted order, with add order as secondary
sort key.
2015-12-21 10:28:15 +01:00
Alexander Larsson
2f74965935
lib: Add cancellable to Installation constructors
2015-12-18 14:20:28 +01:00
Alexander Larsson
fdc9b62988
lib: Always initialize the repo on Installation creation
...
This means we can fail if the repo doesn't exist yet and we have
no write rights.
2015-12-18 12:27:26 +01:00
Alexander Larsson
feed03c284
lib: Expose latest_commit on installed app and let you use it
...
When updating you can pass flags to not deploy and to not pull.
2015-12-18 12:14:57 +01:00
Alexander Larsson
41b3db5e01
lib: Add xdg_app_installation_list_installed_refs_for_update
2015-12-17 21:37:30 +01:00
Alexander Larsson
e6509ff11c
lib: Add xdg_app_ref_format_ref
2015-12-17 21:37:14 +01:00
Alexander Larsson
3087186a36
lib: Make list_remotes return a GPtrArray
2015-12-17 21:07:52 +01:00
Alexander Larsson
6a507970c5
lib: Move all sync operations from XdgAppRemote to XdgAppInstallation
...
Its much easier to handle locking etc when all the i/o operations
are on XdgAppInstallation, and the other objects are pure data carriers.
2015-12-17 20:51:59 +01:00
Alexander Larsson
874fce2b77
lib: Move app launching to XdgAppInstallation
2015-12-17 20:34:25 +01:00
Alexander Larsson
e7903a8033
lib: Move fetch_metadata_sync from RemoteRef to Remote
...
We want to make the Ref objects pure data storage
2015-12-17 20:19:27 +01:00
Alexander Larsson
7da16de205
lib: get_current => get_is_current
2015-12-17 20:10:10 +01:00
Alexander Larsson
dd7f18aaf2
lib: Always use "branch" not "version" in API
...
"version" is really confusin
2015-12-17 20:00:48 +01:00
Alexander Larsson
4ea61d3830
lib: Return GPtrArray from xdg_app_remote_list_refs_sync
2015-12-17 19:57:01 +01:00
Alexander Larsson
b9c582bc75
lib: Change how listing installed refs work
...
Now we return a GPtrArray, and the main call returns both apps
and runtimes, and a new _by_kind version lets you get only a specific one.
2015-12-17 19:50:40 +01:00
Alexander Larsson
570ba8b55f
Add --enable-libxdgapp configure flag and disable lib by default
2015-12-16 15:27:42 +01:00
Alexander Larsson
2175ffa77d
Add missing EXTRA_DIST to pass distcheck
2015-12-16 13:22:04 +01:00
Alexander Larsson
9c77b86d3d
lib: Fix return value type warnings
2015-12-16 13:03:55 +01:00
Alexander Larsson
8b5208a995
Add lock file for each xdg-app dir.
...
This protects the stuff outside the repo (such as deploys, exports,
active checkout, current branch, etc). However, we rely on ostree
concurrency handling for handling concurrent pulls and prunes.
For reading (e.g. list-apps, etc), we don't do any locking, as these
all writes are essentially updated atomically (last change is atomic) and
any once you return such information it could be out of date anyway.
2015-12-15 16:20:28 +01:00
Alexander Larsson
8f700b9aca
lib: Use the new installed/not-installed custom GErrors
2015-12-15 15:33:23 +01:00
Alexander Larsson
856c8210a9
lib: Add custom GError codes
2015-12-15 15:27:37 +01:00
Alexander Larsson
be4f0d86d8
common: Add and use xdg_app_dir_deploy_update()
2015-12-15 15:21:00 +01:00
Alexander Larsson
423a5af15b
lib: Add xdg_app_installation_uninstall
2015-12-15 15:07:41 +01:00
Alexander Larsson
604f71937a
Use xdg_app_compose_ref helper
2015-12-15 14:58:12 +01:00
Alexander Larsson
43a09b3646
Fix unused variable warnings
2015-12-15 14:34:52 +01:00
Alexander Larsson
4342959f6d
lib: Add xdg_app_installation_update
2015-12-15 12:43:56 +01:00
Alexander Larsson
9285d055ab
lib: Add xdg_app_installation_install
2015-12-15 12:26:59 +01:00
Alexander Larsson
c382cfc212
lib: Fix compiler warning in test app
2015-12-15 08:44:50 +01:00
Alexander Larsson
e9d713cb96
lib: Better fix for old glib
2015-12-15 08:37:24 +01:00
Alexander Larsson
ca06b3e66f
lib: Fix build with older glib
2015-12-14 22:01:21 +01:00
Alexander Larsson
4177f358cb
common: Make it explicit that XdgAppError are portal errors
2015-12-08 12:16:38 +01:00
Alexander Larsson
a28ced36c7
lib: Add xdg_app_installation_load_app_overrides()
2015-12-08 11:48:22 +01:00
Alexander Larsson
8d576298ca
lib: Minor indentation cleanups
2015-12-08 11:02:32 +01:00
Alexander Larsson
a62f64d265
lib: Add xdg_app_remote_ref_fetch_metadata_sync helper
...
This does direct soup access on the repo. Not ideal, but good for now.
2015-12-08 11:01:13 +01:00
Alexander Larsson
ef93bd8d15
lib: Fix declaration of xdg_app_installed_ref_load_metadata
...
We changed this to not be const
2015-12-07 16:36:08 +01:00
Alexander Larsson
0fe5f6552a
lib: Add XdgAppDir to RemoteRef private
2015-12-07 16:35:53 +01:00
Alexander Larsson
d987501e02
lib: Always load installed ref metadata each time
...
This is needed in case it changes over time.
2015-12-07 16:31:01 +01:00
Alexander Larsson
188bb00b1b
lib: xdg_app_remote_fetch_ref_sync
...
For now this downloads the summary file each time.
2015-12-07 16:17:06 +01:00
Alexander Larsson
6558c812af
lib: Add some more debug spew to test-lib
2015-12-07 16:16:43 +01:00
Alexander Larsson
eca699ca5a
lib: Rename xdg_app_remote_list_refs to xdg_app_remote_list_refs_sync
2015-12-07 16:16:02 +01:00
Alexander Larsson
a8a7b28ce9
lib: Add remote_name to XdgAppRemoteRef
2015-12-07 16:14:52 +01:00
Alexander Larsson
5b1931dc8d
lib: Add xdg_app_installed_ref_launch()
2015-12-07 13:36:39 +01:00
Alexander Larsson
a4df4ff811
lib: Add XdgAppRemoteRef subclass
...
This doesn't do anything yet, but its a place to hang remote-specific
ops off.
2015-12-04 15:35:13 +01:00
Alexander Larsson
5fd830d3b0
lib: Make getters for XdgAppRemote return copies of strings for options
...
This makes it possible to handle the case when these options change
over time.
2015-12-04 11:46:32 +01:00
Alexander Larsson
1ba476bcbe
Merge pull request #90 from ebassi/introspection
...
Introspection
2015-12-04 11:42:47 +01:00
Alexander Larsson
ad7b379398
Add no-enumerate flag to remote and set if for bundle origin remotes
2015-12-04 11:40:51 +01:00
Emmanuele Bassi
c09375c855
Annotate transfer rules for ambiguous return values
...
This silences all the warnings from the introspection scanner.
2015-12-04 10:17:39 +00:00
Emmanuele Bassi
52ba736518
Add introspection support to libxdg-app
...
We may want to use it from non-C languages.
2015-12-04 09:55:40 +00:00
Alexander Larsson
2f6fc54897
lib: Use the new remote helpers
2015-12-04 10:49:16 +01:00
Emmanuele Bassi
82fa0659f9
build: Fix include path for builddir != srcdir
...
We need to add $(top_builddir)/lib to the inclusion path, otherwise the
build will fail.
This has broken gnome-continuous builds of xdg-app.
2015-12-04 01:13:45 +00:00
Alexander Larsson
132d1186d9
Initial version of libxdg-app
...
This is a highlevel library for working with xdg-app without using
the commandline interface. The primary usecase for this is for
creating a graphical frontend for app installation/update.
2015-12-03 22:41:16 +01:00
Alexander Larsson
106a5b06ec
Rename lib/ to common/ in preparation for public xdg-app library
2015-11-26 22:05:38 +01:00
Alexander Larsson
49af288937
Add standard errors needed for portal
2015-11-26 19:18:58 +01:00
Alexander Larsson
47c705db03
portals: Only give blanket access to session-*.scope systemd cgroup
...
This way we won't give false positives if the user systemd session is
not running.
2015-11-26 17:37:46 +01:00
Alexander Larsson
f5cadc018b
Support defining read-only filesystem access
...
If you do something like "--filesystem=host:ro" you get a read-only mount
of the specified filesystem location.
2015-11-26 17:22:37 +01:00
Alexander Larsson
612bf0d08c
xdg-app run: Fix support for --filesystem=~/dir
...
There was a typo here
2015-11-26 15:37:17 +01:00
Alexander Larsson
a16f0251ad
Remove unused helper function
2015-11-26 15:25:57 +01:00
Alexander Larsson
f710eb9322
Correct license, we're LGPL 2+, not 3+
...
Some files accidentally got the LGPL 3+ header, but we
want to be LGPL2+.
2015-11-26 14:50:21 +01:00
Alexander Larsson
787fdee634
Handle PWD env var correctly when spawning apps/builds
...
Propagate PWD to child, and use it (if correct) instead of getcwd
as the cwd and PWD in the child. This makes things nicer if the
PWD contains a symlink, as we avoid to resolve that symlink.
2015-11-25 13:43:22 +01:00
Alexander Larsson
dcd17f82a5
Add autoptr cleanup backport for SoupUri
2015-11-25 12:39:41 +01:00
Alexander Larsson
7962be90f2
deploy: Explicitly pull from the origin
...
If the same branch has been pulled from multiple origins, pick the current
one. This could happen e.g. during update if you change the origin.
2015-11-16 08:25:47 +01:00
Alexander Larsson
c6f4eccd04
lib: Export xdg_app_context_set_session_bus_policy
2015-11-11 11:26:03 +01:00
Alexander Larsson
13b3f19acc
Add install-bundle command
2015-11-11 09:38:39 +01:00