[kde-doc-english] [kdesrc-build] /: dep-resolv: --include-dependencies; cmdline selections override rcfile.

Michael Pyne mpyne at kde.org
Wed Mar 11 02:29:39 UTC 2015


Git commit e1afbc94d79cd1f1275847cb4ea285d2fba39d13 by Michael Pyne.
Committed on 11/03/2015 at 02:24.
Pushed by mpyne into branch 'master'.

dep-resolv: --include-dependencies; cmdline selections override rcfile.

Add and document the --include-dependencies option. Useful with
--print-modules as a quick way to determine what dependencies a given
module on the command line has, especially if you do a quick
"kdesrc-build --metadata-only" first.

Also, make selecting modules on the command line override
"include-dependencies" as an rc file option, since otherwise it's
impossible to ask just to build a single module if that module is in a
module set with included dependencies.

Use the newly-added --include-dependencies option to force dependency
resolution to happen even if you specify modules to build on the command
line.

M  +36   -0    doc/man-kdesrc-build.1.docbook
M  +11   -1    modules/ksb/Application.pm
M  +1    -0    modules/ksb/BuildContext.pm

http://commits.kde.org/kdesrc-build/e1afbc94d79cd1f1275847cb4ea285d2fba39d13

diff --git a/doc/man-kdesrc-build.1.docbook b/doc/man-kdesrc-build.1.docbook
index f7d0037..c02635f 100644
--- a/doc/man-kdesrc-build.1.docbook
+++ b/doc/man-kdesrc-build.1.docbook
@@ -420,6 +420,42 @@ combining short options into one at this point. (E.g. running
 
 <varlistentry>
 <term>
+<option>--include-dependencies</option>
+</term>
+
+<listitem>
+<para>
+    This causes <command>kdesrc-build</command> to include not only the modules
+    it would normally build (either because they were specified on the command
+    line, or mentioned in the configuration file), but also to include
+    <emphasis>known dependencies</emphasis> of those modules in the build.
+</para>
+
+<para>
+    Dependencies are <quote>known</quote> to <command>kdesrc-build</command> based on the
+    contents of the special <emphasis>kde-build-metadata</emphasis> git
+    repository, which is managed for you by the script (see also the
+    <option>--metadata-only</option> option). The KDE community keeps the
+    dependency information in that module up to date, so if
+    <command>kdesrc-build</command> appears to show the wrong dependencies then
+    it may be due to missing or incorrect dependency information.
+</para>
+
+<para>
+    All known dependencies will be included, which may be more than you need.
+    Consider using the <option>--resume-from</option> option (and similar
+    options) to control the build list when using this option.
+</para>
+
+<para>
+    To see just the list of modules that would be built, use <option>--print-modules</option> or
+    <option>--pretend</option>.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
 <option>--stop-on-failure</option>
 </term>
 
diff --git a/modules/ksb/Application.pm b/modules/ksb/Application.pm
index 2a660e1..2e54731 100644
--- a/modules/ksb/Application.pm
+++ b/modules/ksb/Application.pm
@@ -282,7 +282,7 @@ DONE
         'revision=i', 'resume-from=s', 'resume-after=s',
         'resume', 'stop-on-failure',
         'stop-after=s', 'stop-before=s', 'set-module-option-value=s',
-        'metadata-only',
+        'metadata-only', 'include-dependencies',
 
         # Special sub used (see above), but have to tell Getopt::Long to look
         # for strings
@@ -630,6 +630,13 @@ sub generateModuleList
     $self->_defineNewModuleFactory($newModuleSub);
 
     if ($commandLineModules) {
+        if (!$pendingGlobalOptions->{'include-dependencies'}) {
+            # modules were manually selected on cmdline, so ignore module-based
+            # include-dependencies, unless include-dependencies also set on
+            # cmdline.
+            $ctx->setOption('#include-dependencies', 0);
+        }
+
         # select our modules and module-sets, and expand them out
         @modules = $self->_resolveSelectorsIntoModules(
             $ctx, \@selectors, $newModuleSub, \@optionModulesAndSets);
@@ -2874,6 +2881,9 @@ Options:
                          output what the script would have done.
     --refresh-build      Start the build from scratch.
 
+    --include-dependencies Also try to build known dependencies of the modules
+                           to be built.
+
     --verbose            Print verbose output
 
     --help               You\'re reading it. :-)
diff --git a/modules/ksb/BuildContext.pm b/modules/ksb/BuildContext.pm
index c6482f2..ae8f24a 100644
--- a/modules/ksb/BuildContext.pm
+++ b/modules/ksb/BuildContext.pm
@@ -54,6 +54,7 @@ my %internalGlobalOptions = (
     "git-desired-protocol" => 'git', # protocol to grab from kde-projects
     "git-repository-base"  => {}, # Base path template for use multiple times.
     "ignore-modules"       => '', # See also: use-modules, kde-projects
+    "include-dependencies" => 0,  # Recursively include kde-projects module deps?
     "manual-build"         => "",
     "manual-update"        => "",
     "niceness"             => "10",


More information about the kde-doc-english mailing list