Prior to this change, CMAKE_PREFIX_PATH was consistently set (which is
preferred for most find_package() calls) but CMAKE_MODULE_PATH was only
set for Qt5 (if Qt had a different prefix than the module being
installed).
This could lead to situations where "simplified" find_package() calls
would use "Module" mode (using CMAKE_MODULE_PATH) and end up falling
back to a search of system directories. This could result in finding the
wrong module if the module being searched for was installed on the
system.
Summary:
Ignore /usr as prefix or kdedir when prepending environment variables to not
overrule user setting of PKG_CONFIG_PATH.
For me it was enough to fix my build with prepending CMAKE_PREFIX_PATH
conditionally, but in theory the other environment variables should also only
be prepended if it is not /usr to prepend.
Test Plan:
Compiled XCB 1.13 to /opt/xcb and have XCB 1.11 in /usr/.... Set
PKG_CONFIG_PATH to /opt/xcb/lib/pkgconfig.
Without this patch CMake, called by kdesrc-build, finds XCB 1.11 in
/usr/lib/x86_64-linux-gnu according to its log, but sets as version number
1.13 for some reason.
On make this fails. It still uses the lib from /opt/xcb> but does not include
the correct headers in opt/xcb/include.
With the patch CMake directly finds the lib in /opt/xcb and build succeeds.
Reviewers: bshah, mpyne
Reviewed By: mpyne
Subscribers:
Tags:
Differential Revision: https://phabricator.kde.org/D12739
The Mojolicious work exposed this bug but it's a bug all the same. The
way that Perl's glob function works differs based on whether you use it
in a scalar (including boolean) context or whether you use it in a list
context.
I had the parentheses in this test to try to force a list context but
that's apparently not sufficient as I had every fourth Qt module
failing to build due to this glob failing, in my Mojolicious testing.
The revised test successfully forces glob() to use list context, which
means it always returns the same values for a given directory instead of
acting as a non-reentrant iterator.
The git code recognizes when a module that is selected for update/build
implicitly (e.g. because it is included as a subset of a module grouping
that *was* asked for) does not actually have a git branch. This often
happens for newly-introduced modules (which obviously won't already have
historical "stable" branches).
Rather than forcing users to know that a module is new and manually
ignore it we announce we will skip the build for these modules.
However I confused the return code in this function; no errors are
returned, only exceptions are used for errors, which meant kdesrc-build
would try to merrily build the non-existant module anyways.
Fixed by making this an error. I looked at making it possible to
completely elide the module from the update/build list entirely but that
requires a network call (we can't rely on cached source code since
we can't download non-existent sources), and I don't think that's
a good idea. The error message can probably be worded better though.
BUG:392654
FIXED-IN:18.04
Summary: The qtdir config option from .kdesrc-buildrc was seemingly innefective, which is fixed by this patch
Reviewers: mpyne
Differential Revision: https://phabricator.kde.org/D11736
_verifyRefPresent was also broken for tag-based checkouts. Since this
already uses determinePreferredCheckoutSource, which already used
refs/tags/ for tags, this code also doubled-up on tag names.
This whole code path would be a great candidate for that test suite
under t/ if I can ever get it polished up one day :(
To avoid commit spam, I've tested this on my own Qt module directories
by deleting them and forcing them to be checked-out with tags.
Turns out the original code was doubly-broken, since
determinePreferredCheckoutSource was already adding refs/tags/ to
returned git tags.
Rather than possibly breaking other users of that function by removing
it there, instead strip off refs/tags/ during clone if present.
git-clone doesn't like this value as an option to --branch/-b. Instead
just leave it as a plain tag name and hope it doesn't conflict with any
branch names.
There is code to avoid using the TTY code that updates the status of the
build in the current line. This code prevents using the fancy TTY stuff
if progress output is not supported, but doesn't actually ever output
the end result of the build (success or failure), which wasn't the
intent.
In the other situations we don't want to clutter the line output with a
redundant status. Instead of duplicating the "progress output
supported" check later to output the status (or not), I just took out
the check for whether progress output is supported entirely, since the
progress callback can work even with build systems w/out support.
BUG:391396
FIXED-IN:18.04
Summary: Otherwise if, those variables are set startkde doesn't add them in the XDG_* variables and it results in broken system
Test Plan: tested on wayland and normal session
Reviewers: mpyne
Differential Revision: https://phabricator.kde.org/D11039
Also don't ask about the proxy, it's a rare feature, instead just
continue to add the http-proxy option if it's already set in the
environment. Users with more unusual proxy setups will have to read the
docs. :)
Tried to bring in more coverage of the features users are actually
expected to use while eliminating discussion of things that have faded
away, especially now that the migration to Git is substantially
complete.
Some of this is based on user feedback I received earlier, noting that
the Getting Started guide (even as bad as it was), was the best part of
the documentation for them but that there were important things missing.
The docs after this section still need a bunch of cleanup, I think.
The warning here complains about conditions which are already pretty
much fixed from outside of the kdesrc-build user population anyways.
It's still something notable so instead of removing completely I
downgrade it to a debugging message.
BUG:388657
FIXED-IN:18.02
The move to JSON storage of persistent opts break first-time users,
since the refactored code never actually gets around to setting a
persistent_options key in the build context object.
This seemed to work previously with Data::Dumper, but JSON::PP is not
happy with being asked to serialize an undef. On the other hand I had
always thought that sub setPersistentOption would have 'autovivified'
the needed hash table, and the reporter's build process should have
resulted in many calls to setPersistentOption over the build.
BUG:388180
FIXED-IN:18.01
My attempt to make the KDEProjectReader's check for YAML be a runtime check was
thwarted because I had separately used a "use KDEProjectReader" elsewhere,
which Perl ensures happens at compile time.
Instead make the check part of the constructor so that the package can at least
compile without throwing an error.
Perl seems to have settled on the 'parent' module instead of manually defining
variables that tell the interpreter which packages to fall back to. Some
classes now use parent, some still use the old way.
Migrate everything over to be consistent.
YAML is not an appropriate fallback from what I can glean of Perl
community discussions. YAML::XS is preferred, or YAML::Syck. If I can
get repo-metadata to conform to a stricter YAML subset then YAML::Tiny
would work too.
CCBUG:388109
This is needed to try to perform filtering of the module list based on
which git branches are available, which we could do easily when using
kde_projects.xml.
Without that data, we effectively have to wait until the module list is
already made and about to git update a module before we can tell if the
branch will be there. By that time it's too late to have filtered the
module list, so we have to determine whether this should be a hard error
or not later in execution.
To make that choice, we essentially need to know whether the module is
being built because it was specifically asked for or whether it was
brought in as part of a larger module set (and therefore can be ignored
if the git branch is missing).
This adds tracing for the config file to supplement existing tracing of
cmdline selectors.
Maintains a user-friendly improvement from a few years back to make it
easier to use module-sets to grab a wide set of modules without having
to disable individual modules that weren't present at that time.