Commit Graph

229 Commits

Author SHA1 Message Date
Matthias Clasen
0d2b3ec5d0 flatpak enter: Add completion
This was the last command without completion, so we're complete!
2016-06-10 01:09:51 -04:00
Matthias Clasen
de967dfb5b flatpak enter: Stop parsing context options
We don't make any use of these options, and the documentation
does not mention them either, so stop accepting them.
2016-06-10 01:07:07 -04:00
Matthias Clasen
302dbd2910 Trivial whitespace fix 2016-06-10 00:54:04 -04:00
Matthias Clasen
7cdb8c386c completion: Ensure --help options show up
Help was not showing up in completions, which is unfortunate.
2016-06-10 00:47:20 -04: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
7e58da35af remote-add: Support remote-add --from=keyfile NAME
This allows you to have a single file that describes a repo.
It also allows a mimetype handle for it so that you can easily
install it via a single click.
2016-05-31 16:26:59 +02:00
Alexander Larsson
bd7cf1af93 install: Better check for pre-existing installation
We need an actual active installation, not just the base directory.

This caused a failure if the user had tried to install and app but the
installation failed. After that installation failed due to it claiming
to be installed, while uninstall failed due it it *not* being
installed.
2016-05-30 16:35:50 +02:00
Alexander Larsson
8533f06dc0 Add more completions 2016-05-30 14:54:22 +02:00
Alexander Larsson
4e3149e88d Properly show the help in case of no command or unknown command 2016-05-27 16:48:10 +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
9ec3e7346b main: Report unknown command before unknown arg
This fixes: https://github.com/flatpak/flatpak/issues/23
2016-05-26 19:48:25 +02:00
Alexander Larsson
22adaa3c8c info: Default to whatever branch is installed 2016-05-26 19:08:46 +02:00
Alexander Larsson
0b4241b0e5 update: Don't exist on first failure when there are multiple updates 2016-05-26 19:08:42 +02:00
Alexander Larsson
bf294fb7c5 install: Be smarter about choosing the default branch name
We look for any matching ref on the remote and use that if there is a single match.
2016-05-26 19:06:51 +02:00
Alexander Larsson
282709d9ec Fix resolv.conf in "flatpak build"
This regressed when we moved to bubblewrap. We need to always use
a direct bind for building, because it may not necessarily happen
in a real user session where the session-helper works.
2016-05-25 16:38:50 +02:00
Stephan Bergmann
3b6b0da108 exec* returns -1 on error
...so use the == -1 idiom as already used in common/flatpak-run.c
(another fix would be to drop the if completely, as exec* doesn't
return on success)
2016-05-24 17:44:33 +02:00
Tristan Van Berkom
501802270e flatpak-builtins-update.c: Fixed loading of arch option
Code was organized in such a way that the --arch option
was being ignored.

https://bugs.freedesktop.org/show_bug.cgi?id=95489
2016-05-19 12:43:01 +02:00
Alexander Larsson
b24aff6580 Remove unused variables 2016-05-16 16:25:09 +02:00
Alexander Larsson
4a8a225447 remote-delete: Actually look at --force flag 2016-05-13 16:23:13 +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
e5649ead07 Fix debug spew with -v 2016-05-12 21:16:18 +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
712fc9fc08 Use the installed/not-installed errors more consequently 2016-05-12 17:17:27 +02:00
Richard Hughes
c35395185b Actually update the branch when using --update-appstream 2016-05-12 11:07:30 +02:00
Alexander Larsson
12ac77138e add-remote: Support metalink=.. urls 2016-05-11 16:31:33 +02:00
Alexander Larsson
984e850fd6 remote-add: Use flatpak_dir_modify_remove 2016-05-11 16:27:43 +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
fcf137f25d Remove references to --gpg-key= as it never worked 2016-05-11 15:39:11 +02:00
Alexander Larsson
edcf485dde run: More background fd issues fixed
This also simplifies the child_setup func by clearing CLOEXEC
on the needed fds.
2016-05-11 15:33:49 +02:00
Alexander Larsson
3f71025497 run: Fix running in the background
We need to keep all the fd:s needed for bubblewrap alive, so
neuter g_spawn_async:s close of fds and do our own.

Also, we need this so these fds can be closed in the launching app.
2016-05-11 15:14:11 +02:00
Alexander Larsson
4f9ea6bb57 Remove unused variables
This fixes warnings from clang
2016-05-09 12:49:54 +02:00
Alexander Larsson
5e9b247d26 Migrate ~/.local/share/xdg-app to ~/.local/share/flatpak 2016-05-09 12:21:28 +02:00
Alexander Larsson
8abbc0186e Rename everything but the on-disk location to flatpak 2016-05-09 11:11:55 +02:00
Alexander Larsson
ba37b22d78 Rename library to libflatpak 2016-05-09 09:46:26 +02:00
Alexander Larsson
c24528d369 Rename source files to flatpak 2016-05-09 09:00:20 +02:00
Alexander Larsson
6a613d1fab Rename all non-autogenerated symbols to flatpak 2016-05-09 09:00:20 +02:00
Alexander Larsson
1ffdf27d92 uncruftify: Initial run, all non-problematic changes 2016-05-06 16:03:27 +02:00
Alexander Larsson
afa12a446f main: Remove declaration of old deprecated functions
These were removed already
2016-05-06 15:32:31 +02:00
Alexander Larsson
f17fd2a705 enter: Remove cut and paste error code 2016-05-06 15:06:17 +02:00
Alexander Larsson
e12d93b069 Remove spurious ; 2016-05-06 14:23:35 +02:00
Alexander Larsson
663cfcf3a8 Fix make check if uninstalled
This uses various environment variables set during make check
to find the trigger, bwrap and xdg-app-dbusproxy from the build/source dir
rather than the installed location.
2016-05-03 10:27:36 +02:00
Tristan Van Berkom
51e387159b build-export: Add --arch option
This patch adds the --arch option to the build-export builtin command.

Previously build-export derives this from the metadata and then falls back
to xdg_app_get_arch(), except that this does not work when the metadata does
not specify an arch (such as with extensions like .Debug or .Locale).

https://bugs.freedesktop.org/show_bug.cgi?id=95226
2016-05-03 09:05:56 +02:00
Alexander Larsson
123f32015d tests/test-run.sh: Add tests for proper installation 2016-05-02 10:47:59 +02:00
Alexander Larsson
1963957253 cli: Remove old deprecated xdg-app commands
Its been long enough so nothing should be using these, lets drop them.
2016-05-02 09:46:56 +02:00
Alexander Larsson
126d805e90 oci: Use /bin/sh, not sh as the default command
runc doesn't look in PATH for this
2016-04-29 17:07:19 +02:00
Alexander Larsson
4c3bf179e2 Use bubblewrap instead of xdg-app-helper
Bubblewrap is a new tool from project atomic. Its similar to the old
xdg-app-helper, but even more minimal, and a bit more generic. Its designed
to be easy to git submodule install, but at some point we will probably
support using the system installed version too.

Using bubblewraps lets us share the load of security mainainance and
allows other people to use bubblewrap to do their own unprivileged
sandboxes.
2016-04-29 15:52:44 +02:00
Alexander Larsson
6112eb1470 oci: Move the extra files (ref/metadata/commit) too rootfs
Saving them in the image means they will be transferred with it, increasing
the chances that the commit can be recreated from the image.
2016-04-28 20:43:27 +02:00