In the process of trying to plan out the best way to fix the issue where
module names passed on the command line that are implicit subprojects of
a kde-projects module go unrecognized, I decided that I needed a better
way to navigate the API.
There is a Doxygen::Filter::Perl available which seems decent as it
allows one to use the nice and familiar Doxygen tool, but it seems a bit
buggy still.
NaturalDocs is a tool which seems better able to cope with kdesrc-build
and its code, although it prefers comments to be formatted unlike the
normal qdoc/JavaDoc syntax used by Doxygen. However it's not that much
different and is easier to install and use otherwise. Maybe when I get
some time I'll go ahead and properly convert everything.
Skip the kde-build-metadata update phase if --no-src is passed, or if in
--pretend mode. I know I've noticed this myself and even heard
complaints about this behavior but surprisingly I can't find an open bug
to close.
It's easiest to describe by giving the test case:
module-set kde-workspace-utils
repository kde-projects
use-modules kde/kdeutils
branch KDE/4.9
end-module-set
This pulled in all modules available under the kde/kdeutils virtual
path, including print-manager (a program only available from KDE/4.10
on). When kdesrc-build tried to switch the branch of print-manager to
KDE/4.9 it failed after cloning.
Now we don't even try cloning print-manager (or in general, any module
that doesn't have a branch specified for the whole module-set).
To be clear, this is the only level of detail we look at for filtering
at this point: Is a branch option given for the module-set, and if so we
filter out non-matching modules that would be implicitly selected.
BUG:307694
FIXED-IN:1.16
The merge was mostly straightforward. I ran
git log --oneline $(git merge-base master modularize)..master
to see all changes applied to master while this topic branch was being
worked in order to ensure they weren't accidentally missed:
83bee36 SVN_SILENT made messages (.desktop file)
f2299f1 xsession: Disable session driver installation by default.
05f8745 Remove undefined method for default module handling.
2 were merged correctly, the session driver default had to be
re-committed to the appropriate module.
Conflicts:
kdesrc-build
This can be used as a run-time check later to ensure that kdesrc-build
finds compatible versions of its component modules (though that isn't
done yet).
This may yet be moved to the kdesrc-build-setup script instead so
disable this by default so that those tracking kdesrc-build git don't
have to necessarily deal with this handling. It can still be manually
enabled.
This will cause a conflict with the 'modularize' branch, which should be
resolved by merging this change into the ksb::BuildContext Perl module.
This was changed some time ago to pull from kdesrc-buildrc-sample if no
other config was defined, which ended up removing the method being
called here. But I didn't remove all usages of that method, which was
caught by a user yesterday.
This was the last remaining module embedded into the main script file,
so if we leave it here this completes the transition of modules out of
the main script.
This makes modularizing the build systems less annoying. I was surprised
that creating a class using a scalar variable instead of the bareword
works without tripping warnings about using references, but it works
just fine in testing here, test suite still passes.
This also required updating the test suite, which rather surprisingly
doesn't seem to need further modification (probably since the test-suite
includes kdesrc-build as a prerequisite, which sets up the @INC
modifications required).
This is probably the most dangerous change up to this point just because
a lot of modules descend from GitUpdate. I've run 'ack' on the source
tree just to make sure I didn't miss any renames from other modules at
this point. I've also built a kde-project module (which uses the new
ksb::Updater::Git indirectly) and it looks like everything still works
fine.
This PhaseList was one of the first modules added as part of the
refactoring effort, but I don't think it has ended up very useful (or at
least not as I had designed).
This move also required fixing ksb::BuildContext which had not 'use'd
ksb::PhaseList before, it had worked by accident.
Moving ksb::Util required splitting out script version tracking to a
separate module, as ksb::Util was using the previously-global versionNum
variable automatically.
Easy enough, seemed to work the first time. But I had to be careful to
remember to re-insert 'use IPC;' package declarations in each individual
module actually using these constants. It should be possible to remove
the ksb::IPC stuff by exporting the constants from the IPC.pm using
Exporter, but I'm not doing that at this point.
This is the lead-in to work which will eventually split out kdesrc-build
into component Perl modules and complete the modularization process.
This commit makes it possible for Perl to locate kdesrc-build modules
that are located in the XDG app-data directory (in case kdesrc-build is
installed), with a fallback to the kdesrc-build script directory (in
case kdesrc-build is run from a git checkout).
Although I am "modularizing" kdesrc-build, this is not an attempt to
split into CPAN-quality modules, rather we're just splitting into
separate files modules that are already conceptually separate
internally. At this point kdesrc-build will still be a single package
using as few dependencies as possible. However this will make it
possible to clone useful Perl modules if needed and will continue on the
path of de-cluttering the main script.
Feature seems to work in my testing, time to push out to master and verify it
doesn't break anything. I will also post the revised documentation to the
website.
If you don't like the idea of kdesrc-build adding a .xsession for you, then
you can set 'install-session-driver' to false in your kdesrc-buildrc.
My reading of the git-fetch manpage left me with the idea that adding
the '-t' (for --tag) option would additionally cause all tags to be
fetched from the given repository. The manpage doesn't actually say this
though, and git apparently instead downloads just the tags (and needed
objects), so this change has caused master branches around the
kdesrc-build world to stop updating. :(
The idea behind this had been to ensure that if the 'tag' option were
used in kdesrc-build that git would have the most up-to-date list of
tags available, but I guess we'll just have to go back to
crossing-our-fingers and hoping git already knows about the tag for now.