Dont hardcode path to config.h#465
Conversation
|
Could you please resolve the conflicts? Then, we can proceed with the merge. |
2a3d57a to
8ab85eb
Compare
|
Done CI doesn't have meson 1.4.0 yet. Is that a problem? |
@mrc0mmand: ^ |
|
Hmpf, this is quite a big meson version bump and it cuts off some currently still supported distributions, most importantly Ubuntu Noble (24.04, LTS) - released in Apr 2024, supported until Apr 2029, currently has meson 1.3.2, so I'm still not sure if it's worth it. As I said in #454 (comment) you don't really have to use full path to the |
|
Ah... gotta love eternally-outdated distros. Feel free to close this PR if you don't think it's worth it. |
|
We had a discussion with @jrybar-rh and @vmihalko and agreed to go ahead with this change. @notpeelz if you cherry-pick mrc0mmand@a6beaea on top of this PR it should make the CodeQL check happy and this PR should be ready to go. |
Ubuntu 22.04 (Noble) ships meson 1.3.4 (ATTOW) but we need at least meson 1.4.0, so install a newer version via pip.
8ab85eb to
97f80e4
Compare
|
Oh that's great news. I've rebased and applied your patch. |
|
Ah, here seems to be the hiccup 😄 |
Ah, whoops, forgot about that one. I'll submit a follow-up. |
-> #551 |
| ) | ||
|
|
||
| compiler_common_flags += ['-include', 'config.h'] | ||
| compiler_common_flags += ['-include', config_h.full_path()] |
There was a problem hiding this comment.
You don't need to bump the minimum required version. You do "need" the full path if polkit can ever be built as a subproject -- the compiler is always run from the global_build_root(), that is, the same directory as the build.ninja file, and config.h is generated where current_build_dir() == project_build_root(), which is the same directory as build.ninja except in a subproject.
But regardless, the string config_h.full_path() is provided for API equivalence with other objects. You could have always reliably guaranteed the location quite simply:
config_h_full_path = meson.current_build_dir() / 'config.h'No version bump needed.
There was a problem hiding this comment.
Ah, that's actually pretty neat, thanks a lot for the explanation!
Split from #454 as requested.
This is a minor change that requires meson >= 1.4.0, which isn't available in Fedora 39.
F39 becomes EOL on 2024-11-12.