Alexander Larsson
7431fff588
Fix up pyo stale file handling
...
We were not doing what the comments said we should, and we also
want to change what happens in the case of an old py file from
a previous layer (such as a base layer in a runtime) has a non-rewritten
.pyc file. In that case we want to assume its correct and fix it up.
2016-08-11 07:54:48 +02:00
Alexander Larsson
348b7f9ab4
builder: Add some printouts if we remove stale .pyc files
...
This makes it easier to figure out why it disappeared
2016-08-11 07:54:25 +02:00
Alexander Larsson
006d9a1927
Correctly handle .pyc mtimes for .py files changing multiple times
...
If a .py file changes multiple times we can end up in a situation
where there is an .py file with corresponding .pyc file that we
rewrote, so both are now mtime==1. Then a new version of the .py file
is added, but the corresponding .pyc file is not updated. This means
that the .pyc file is stale, and python would not normally use it.
However, we will later change the mtime on the .py file to 1, causing
the old .pyo file to look up-to-date even though its stale.
We fix this by detecting the case where the is a new mtime on a .py file
where the .pyc file doesn't match, and remove the stale .pyc file.
2016-08-10 16:24:11 +02:00
Alexander Larsson
b5204c908d
builder: Clear mtime to 1, not 0, to match what new ostree does
2016-07-01 14:25:22 +02:00
Matthias Clasen
99e4f83e33
Allow inclusions in the module list
...
When we see a string in the modules array, parse it as a json
file and use the resulting BuilderModule object.
2016-06-09 01:01:37 -04:00
Matthias Clasen
2757c63fea
Add a modules property to BuilderModule
...
This will let us load modules recursively.
2016-06-08 23:56:38 -04:00
Matthias Clasen
914b841481
module: Be a bit more robust
...
When we call builder_module_cleanup_collect on a module that
has no changes, we shouldn't crash.
2016-06-08 23:55:57 -04:00
Alexander Larsson
bd66da0dad
builder: Add support for patching mtime in python bytecode headers
...
This makes them work at runtime (as the mtime will then be 0) and
makes builds more repeatable.
2016-06-08 13:28:27 +02:00
Alexander Larsson
8362d9cafe
Merge pull request #36 from matthiasclasen/module-errors
...
flatpak-builder: Print name of failed module on error
2016-05-27 09:02:44 +02:00
Matthias Clasen
5f928b30ac
builder: Prefix module errors
...
Sprinkle g_prefix_error calls in builder-module.c, to make
sure that module-specific errors get a "module foo:" prefix.
This is not quite perfect, since callers tend to impose their
own prefix as well, but at least it clearly identifies the
module in which the error ocurred.
2016-05-27 00:25:28 -04:00
Matthias Clasen
6d1d9724c5
builder: Warn about bad module names
...
Putting spaces or slashes in module names is a recipe for
cryptic error from one of the many constructed flatpak
commandlines. Better warn early on, as soon as we see such
a name.
2016-05-27 00:05:55 -04:00
Alexander Larsson
28c1c65d8f
Builder: Support disabled=true to not build a module
...
This is a simple way to "comment out" a module.
2016-05-09 17:24:42 +02:00
Alexander Larsson
8abbc0186e
Rename everything but the on-disk location to flatpak
2016-05-09 11:11:55 +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
Tristan Van Berkom
401c7b2dea
BuilderModule: Use builder_options_get_config_opts()
...
The configure arguments are now a combination of the
default config-opts plus the accumulative sum of the config-opts
specified in the build-options that are active for a given build
context.
https://bugs.freedesktop.org/show_bug.cgi?id=94940
2016-04-15 10:25:55 +02:00
Alexander Larsson
728e7a89e1
xdg-app-buildeR: Remove unnecessary spew
2016-03-14 11:57:06 +01:00
Alexander Larsson
6c5e1a8a92
Fix some compiler warning (unused vars)
2016-02-25 16:09:49 +01:00
Alexander Larsson
467e8bf4db
builder: Add sources referenced from debuginfo into Debug runtime
2016-02-23 14:13:36 +01:00
Alexander Larsson
90aaed7f7b
builder: Build runtimes in /run/build-runtime
...
This way we the runtime build dir doesn't conflict with the app dir.
Which is good if we want debuginfo with sources for both.
2016-02-23 14:12:20 +01:00
Alexander Larsson
b44bbc13c3
Move migrate_locales to builder-utils.c
2016-02-18 21:47:29 +01:00
Alexander Larsson
d5d47aa458
builder: Support separating out locale data
2016-02-18 19:22:34 +01:00
Alexander Larsson
c07b1807d1
builder: Move CFLAGS/CXXFLAGS handling into BuilderOptions
2016-02-17 10:26:35 +01:00
Alexander Larsson
e233705379
builder: Add build_context_get_build_dir()
2016-02-17 10:26:32 +01:00
Alexander Larsson
393163200d
builder: Always create unversioned symlinks while building modules
...
This way if things go wrong you can always find the latest build
2016-02-17 08:43:29 +01:00
Alexander Larsson
faecde5da5
builder: Report errors if eu_strip fails
...
This was ignoring errors and causing "set-on-top-of-existing-GError"
messages.
2016-02-16 14:45:23 +01:00
Alexander Larsson
ea176cd63a
builder: Put all builds in a .xdg-app-builder/build subdir
...
I.e. instead of .xdg-app-builder/build-foo it will be
.xdg-app-builder/build/foo. This makes it easier to separate these
out, and it allows you to symlink this directory to /run/build to pick
up all sources when you use --keep-build-dirs.
2016-02-10 10:15:25 +01:00
Alexander Larsson
1cc94f4f04
builder: Use predictable names for build dirs
...
Instead of random hex, we use a pure counter
2016-02-08 11:30:48 +01:00
Alexander Larsson
9f2769e0ce
builder: Use non-parallel-make option instead of looking at .NONPARALLEL
2016-02-01 21:40:22 +01:00
Alexander Larsson
622adf88d0
builder: Put debuginfo in the right place for runtimes
2016-01-20 14:00:49 +01:00
Alexander Larsson
071561637a
Remove unused variables
2016-01-19 12:37:51 +01:00
Alexander Larsson
e91a4c79e0
Builder: Support commiting a platform
2016-01-18 15:22:56 +01:00
Alexander Larsson
f3bf30334c
builder: Also apply cleanup to changes in usr
2016-01-14 11:16:17 +01:00
Alexander Larsson
55e934ee76
builder: Fix handling of builddir
2016-01-12 14:25:41 +01:00
Alexander Larsson
a6eab3e732
builder: Don't break if ccache not enabled.
2016-01-12 12:32:44 +01:00
Alexander Larsson
f95cd2d029
builder: Add option to enable ccache use in build
2016-01-12 12:09:09 +01:00
Alexander Larsson
59c8c49bdd
builder: Run builds in /run/build/$modulename
...
This creates repeatable builds for anything that leaves the build
dir in the resulting files, such as debug info.
2016-01-12 11:05:37 +01:00
Alexander Larsson
d3e1ffb4f7
builder: Match debuginfo files against regular cleanup patterns
...
I.e. if /lib/foo is cleaned, also clean /lib/debug/lib/foo.debug
2016-01-11 11:41:50 +01:00
Alexander Larsson
1b2ed4fe09
builder: Pass down global cleanups via BuildContext
2016-01-11 11:40:46 +01:00
Alexander Larsson
5896b5ae08
builder: Pass down keep-build-dirs via BuildContext
2016-01-11 11:40:46 +01:00
Alexander Larsson
825611a758
builder: Break out helpers for path matching
2016-01-11 11:40:46 +01:00
Alexander Larsson
98a7d731ad
builder: Add support for separating out debuginfo
2016-01-11 11:40:46 +01:00
Alexander Larsson
1264335458
builder: Add --disable-updates
...
Download sources, but never update existing sources (like git or bzr).
2015-12-21 10:39:23 +01:00
Alexander Larsson
a0885d4576
builder: Allow specifying custom prefix
2015-12-15 19:36:06 +01:00
Alexander Larsson
54c52d9363
builder: Add --keep-build-dirs option
...
This is useful if you want to later make changes to the built stuff.
2015-12-09 21:10:22 +01:00
Alexander Larsson
b716e0d8eb
Builder: Add a resolved version of the manifest to the built app
2015-12-09 14:26:41 +01:00
Alexander Larsson
3fb4226c81
builder: Make the builder manifest objects serializable to json
2015-12-09 10:33:54 +01:00
Alexander Larsson
7176ca491a
builder: Consider the build_option when checksumming
2015-12-02 08:32:25 +01:00
Alexander Larsson
83a59dd5a5
builder: Build with "make", not "make all"
...
This seems more compatible
2015-12-01 16:06:37 +01:00