Commit Graph

280 Commits

Author SHA1 Message Date
Alexander Larsson
e18ab46977 build-update-repo: Add some spew before starting the prune operation
This makes it more obvious what is happening, and which part is slow.
2016-08-29 12:06:16 +02:00
Alexander Larsson
874a67c721 Update: Don't double-call flatpak_dir_cleanup_removed
This is already called automatically from flatpak_dir_deploy_update.
In particular, in the system-installed case this will cause
a warning due to not being able to remove the old checkout with
permission denied.
2016-08-29 11:48:30 +02:00
Alexander Larsson
d069ee808b builder: Make more of the validation warnings instead of errors
We don't want builds to break due to these, as we update flatpak
on the build servers. Also, use g_print instead of g_warning to
print the warnings.
2016-08-25 11:30:10 +02:00
Alexander Larsson
e966d56543 Remove unwanted static deltas after summary is updated 2016-08-24 14:54:29 +02:00
Alexander Larsson
54c5f9a59e Allow specifying partial refs as name in commands
The commands: install, update, uninstall, info, make-current and run
now supports specifying a partial ref for the name. This is a different
way of specifying optional arch and branch arguments.

For instance org.app.App//master is the same as "org.app.App master" or
"--branch=master org.app.App".

This is useful if you're cutting and pasting from e.g. the list -d output.
2016-08-24 09:18:00 +02:00
Alexander Larsson
23c1c22266 commit-from: Support specifying multiple refs
You can list refs, or specify none to mean every source ref
2016-08-23 16:13:04 +02:00
Alexander Larsson
0a3ca96da0 Add --no-update-summary to export, commit-from and import-bundle
We want this for e.g. the build system where we will do multiple
repo operations and then atomically regenerate the summary once.
2016-08-23 15:12:27 +02:00
Alexander Larsson
6386ea3222 build-import-bundle: Update repo similarly to build-export
This makes sure we update the summary, as well as take args for
gpg keys and whether to update the appstream branch.
2016-08-23 14:57:08 +02:00
Alexander Larsson
783cfce518 repo-update: Better static delta creation
We now do the creation of static deltas in parallel, and we
also remove unneeded static deltas.
2016-08-23 10:49:54 +02:00
Alexander Larsson
6578d37984 Drop libgsystem dependency 2016-08-22 16:00:33 +02:00
Alexander Larsson
be8dae4693 Convert to glxn_* console helpers instead of gs_* 2016-08-22 15:08:59 +02:00
Alexander Larsson
fcffefee26 Replace openat() calls from libgsystem 2016-08-22 14:12:31 +02:00
Alexander Larsson
b8a5a0092c build-init: Use flatpak_cp_a instead ofgs_shutil_cp_a 2016-08-22 13:59:00 +02:00
Alexander Larsson
65f1cf993d Create and use flatpak_file_get_path_cached
This is simpler that the one in libgs, as well as lockless. Also, it
removes one more use of libgs.
2016-08-22 10:22:42 +02:00
Alexander Larsson
9c907c992d Replace gs_shutil_rm_rf with small helper wrapper over libglnx 2016-08-22 10:06:08 +02:00
Alexander Larsson
e0bd22bfe8 Add flatpak_mkdir_p helper and use it
This replaces all current callers of gs_file_ensure_directory with
equivalent code.

Actually, two instances were calling gs_file_ensure_directory with
FALSE, i.e. error out on EEXIST, but those cases seem fine with the
do-nothing-if-exists semantics.
2016-08-22 09:29:24 +02:00
Alexander Larsson
1976639153 flatpak: Add build-commit-from command
This creates new commits based on a different repo/branch. Very useful
to e.g. import and sign verified correct commits from an autobuilder
repo.
2016-08-19 17:24:03 +02:00
Alexander Larsson
6d7427f1f7 Simplify appstream branch generation error messages
This removes references to spawning appstream-builder, which we don't
call anymore.
2016-08-19 16:50:59 +02:00
Alexander Larsson
bbf0a57589 build-export: Only warn for Exec lines that are not found
There are various cases where this is ok. For instance to start
a binary in the runtime, such as in:
  https://github.com/flatpak/flatpak/issues/260
2016-08-19 15:58:15 +02:00
Alexander Larsson
db67edcc98 Fix validation of service files
We need to rewrite /app absolute paths just like we do for
desktop files.
2016-08-19 10:47:40 +02:00
Alexander Larsson
92d9d9e4dc Update: Fix crashed when updating runtimes
The debug spew were looking for the "current" ref, but there is
no such thing for runtimes, only apps.
2016-08-17 15:32:11 +02:00
Alexander Larsson
c978377dd1 build-export: Don't fail desktpo validation for absolute pathnames in Exec= 2016-08-11 13:02:20 +02:00
Bastien Nocera
1bd1c73429 build: Better description for --runtime option
"non-devel runtime" isn't an expression in the Flatpak vocabulary, so
explain what it really does.
2016-08-06 16:43:47 +02:00
matthiasclasen
fe133c7204 Merge pull request #233 from matthiasclasen/reduce-icon-validation
Reduce icon validation
2016-08-04 18:45:39 -04:00
Matthias Clasen
d4fd5738f7 flatpak update: Improve output
Print out if an update did not do anything, and generally
improve the output.
2016-08-04 18:41:57 -04:00
Matthias Clasen
eaebfd8cc2 Remove a misleading error message
NAME is not, in fact, required.
2016-08-04 18:39:11 -04:00
Matthias Clasen
8124016247 flatpak update: fail if not installed
Print a diagnostic and fail if the application or runtime
does not exist in flatpak update.
2016-08-04 15:48:45 -04:00
Matthias Clasen
ecb3000e2e Reduce icon validation
While it is frowned upon nowadays, there are still applications
that use system-provided icons for the Icon field in their desktop
file.

Reduce the error to a warning to allow this for now.
2016-08-04 07:49:36 -04:00
Matthias Clasen
b42bc359f6 Validate exports in build-export
Do some basic validation of the exported desktop files, service
files and icons.

Suggested by Bastien Nocera.
2016-07-29 18:41:25 -04: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
003ef9ee2e Revert "Set up logging to the journal" 2016-07-29 00:24:43 +02:00
Matthias Clasen
003d96e3df Add an --arch option to flatpak list
This enables filtering by arch when listing installations.
2016-07-26 13:39:57 -04:00
Matthias Clasen
a60f18c183 Add a --journal option to flatpak run
The --journal option takes one of the values yes, no, auto.
2016-07-25 10:36:00 -04:00
Matthias Clasen
40ae16ffeb Consistency fixes
Don't append a newline to flatpak_fail messages, we don't do that
in most places.
2016-07-23 14:42:58 -04:00
Matthias Clasen
8732c5a8fb Translate errors
These show up in the UI and often refer to (translated) parts of
the UI.
2016-07-23 14:37:02 -04:00
Matthias Clasen
ad34562383 Translate main context summary
We need to use the translations, not just mark the strings
for extraction.
2016-07-23 11:20:28 -04:00
Matthias Clasen
43da58db5f Mark commandline options for translations 2016-07-23 11:01:50 -04:00
Alexander Larsson
51663de427 Remove unused variables 2016-07-01 14:45:53 +02:00
Alexander Larsson
5ab628d0ee Install/update/uninstall related refs
Any "related" references from the same remote are automatically
handled when installing, unless you specify --no-related.

The set of related refs is based on the declared extensions for
the main ref. By default, all such extensions are automatically
installed/updated unless they have "no-autodownload" set to false
in the extension info, and its not already installed locally.

Only extensions marked as "autodelete" will be automatically deleted
when you remove the main ref.

There is some special handling:

Any *.Debug or *.Locale extension is automatically treated as "autodelete".

A *.Locale extension that is autodownloaded will be subsetted using subpaths
such that existing subpaths are kept, and the current locale is added.
2016-06-30 16:55:32 +02:00
Alexander Larsson
853227a3d6 extensions: Minor cleanup
We now store the path to the extension files in the FlatpakExtension
returned from list_extensions instead of having each called look
them up.
2016-06-29 12:20:16 +02:00
Simon McVittie
ee99e8afff Add BWRAP and --with-system-bubblewrap configure arguments
This lets distributors share a system copy of bubblewrap (>= 0.1.0)
between Flatpak and any other projects that benefit from it, if they are
careful to keep new versions in sync. The default is still to use the
bundled submodule, ensuring compatibility and simplifying dependencies.

Enable $PATH search everywhere that runs bwrap, so that $BWRAP doesn't
necessarily need to be a fully-qualified path.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-26 11:09:03 +01:00
Alexander Larsson
640bf9e69c remote-ls: Better multiarch support
By default, only show supported refs. Use --arch to limit it
to a specific arch, or --arch=* to list all.
2016-06-23 13:08:12 +02:00
Alexander Larsson
db192586de make-current: Use find_installed_ref()
This means you don't have to specify the arch if you don't want.
It will still find supported apps.
2016-06-23 12:54:45 +02:00
Alexander Larsson
2966b25ba0 update: Always look at all existing apps when updating
Currently if you specified some of branch/name we used
find_installed_ref, but even in that case we want to
support updating two arches.
2016-06-23 11:36:51 +02:00
Alexander Larsson
8740a9ded3 Add flatpak --supported-arches 2016-06-23 11:12:28 +02:00
Matthias Clasen
9c16751709 flatpak: Add a command to list exported documents
This lists all the files that are exported, possibly limited
to a single app id.
2016-06-16 15:05:18 -04:00
Matthias Clasen
8281e614ce flatpak: Add a way to revoke privileges for exported documents
This adds --forbid-read, --forbid-write, --forbid-delete and
--forbid-grant-permissons options to flatpaks document-export
command, to let it revoke permissions on exported documents.
2016-06-16 15:05:18 -04:00
Matthias Clasen
528b1f8e29 flatpak: Add a document-unexport command
This calls org.freedesktop.portal.Documents.Delete to remove
an exported file from the document database altogether.
2016-06-16 15:05:18 -04:00
Matthias Clasen
52d32da215 flatpak: Add a document-info command
This uses the newly introduced non-portal interface to the
documents portal to obtain and show information about an
exported file.
2016-06-16 15:05:18 -04:00
Matthias Clasen
04d444782c Make variables static
Otherwise, they cause unexpected linking conflicts.
2016-06-15 14:07:36 -04:00