diff --git a/doc/index.docbook b/doc/index.docbook
index e4e40a6..85516c3 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -2140,10 +2140,43 @@ flag.
+
+install-environment-driver
+Cannot be overridden
+By default, &kdesrc-build; will install a shell script that can be
+sourced in a user's profile setup scripts to easily establish needed environment
+variables to run the Plasma desktop built by &kdesrc-build;.
+
+This driver will alter the following files:
+
+
+$XDG_CONFIG_HOME/kde-env-master.sh (normally found at ~/.config/kde-env-master.sh).
+$XDG_CONFIG_HOME/kde-env-user.sh (normally found at ~/.config/kde-env-user.sh).
+
+
+The kde-env-user.sh is optional. It is
+intended for user customizations (see the Troubleshooting and Debugging
+section of the &kde; UserBase for examples of customizable settings), but these settings
+can be set elsewhere by the user in their existing profile setup scripts.
+
+You can disable this feature by setting this option to
+false, and ensuring that the install-session-driver option is
+also disabled.
+
+This option was introduced with &kdesrc-build; 17.08.
+
+&kdesrc-build; will not overwrite your existing files (if present)
+unless you also pass the
+command-line option.
+
+
+
install-session-driverCannot be overridden
-By default, &kdesrc-build; will try to install a driver for the graphical
+If enabled, &kdesrc-build; will try to install a driver for the graphical
login manager that allows you to login to your &kdesrc-build;-built &kde; desktop.This driver will alter the following files:
@@ -2155,7 +2188,8 @@ login manager that allows you to login to your &kdesrc-build;-built &kde; deskto
If you maintain your own login driver then you can disable this feature by setting this
-option to false.
+option to false. If enabled, this feature also enables the
+install-environment-driver feature.This option was introduced with &kdesrc-build; 1.16.
diff --git a/modules/ksb/Application.pm b/modules/ksb/Application.pm
index 78ddf4b..f16da20 100644
--- a/modules/ksb/Application.pm
+++ b/modules/ksb/Application.pm
@@ -693,7 +693,12 @@ sub runAllModulePhases
$ctx->setPersistentOption('global', 'last-failed-module-list', $failedModules);
}
- _installCustomSessionDriver($ctx) if $ctx->getOption('install-session-driver');
+ # env driver is just the ~/.config/kde-env-*.sh, session driver is that + ~/.xsession
+ if ($ctx->getOption('install-environment-driver') ||
+ $ctx->getOption('install-session-driver'))
+ {
+ _installCustomSessionDriver($ctx);
+ }
my $color = 'g[b[';
$color = 'r[b[' if $result;
@@ -2368,7 +2373,7 @@ sub _installCustomSessionDriver
_installCustomFile($ctx, $envScript, "$destDir/kde-env-master.sh",
'kde-env-master-digest');
_installCustomFile($ctx, $sessionScript, "$ENV{HOME}/.xsession",
- 'xsession-digest');
+ 'xsession-digest') if $ctx->getOption('install-session-driver');
if (!pretending()) {
if (! -e "$destDir/kde-env-user.sh") {
@@ -2378,7 +2383,7 @@ sub _installCustomSessionDriver
};
}
- chmod (0744, "$ENV{HOME}/.xsession") or do {
+ if ($ctx->getOption('install-session-driver') && !chmod (0744, "$ENV{HOME}/.xsession")) {
error ("\tb[r[*] Error making b[~/.xsession] executable: $!");
error ("\tb[r[*] If this file is not executable you may not be able to login!");
};
diff --git a/modules/ksb/BuildContext.pm b/modules/ksb/BuildContext.pm
index f106ebc..3e2c3aa 100644
--- a/modules/ksb/BuildContext.pm
+++ b/modules/ksb/BuildContext.pm
@@ -73,20 +73,20 @@ my %internalGlobalOptions = (
# Holds boolean flags that could be altered from cmdline.
our %defaultGlobalFlags = (
- "delete-my-patches" => 0, # Should only be set from cmdline
- "delete-my-settings" => 0, # Should only be set from cmdline
- "disable-agent-check" => 0, # If true we don't check on ssh-agent
- "disable-snapshots" => 1, # 2016-07-31 Temp. disabled until kde.org fixed to supply snapshots
- "ignore-kde-structure" => 0, # Whether to use kde dir structure like extragear/network
- "install-after-build" => 1, # Default to true
- "install-session-driver" => 0,# Default to false
- "purge-old-logs" => 1,
- "run-tests" => 0, # 1 = make test, upload = make Experimental
- "stop-on-failure" => 0,
- "use-clean-install" => 0,
- "use-idle-io-priority" => 0,
- # Controls whether to build "stable" branches instead of "master"
- "use-stable-kde" => 0,
+ "delete-my-patches" => 0, # Should only be set from cmdline
+ "delete-my-settings" => 0, # Should only be set from cmdline
+ "disable-agent-check" => 0, # If true we don't check on ssh-agent
+ "disable-snapshots" => 1, # 2016-07-31 Temp. disabled until kde.org fixed to supply snapshots
+ "ignore-kde-structure" => 0, # Whether to use kde dir structure like extragear/network
+ "install-after-build" => 1,
+ "install-environment-driver" => 1, # Setup ~/.config/kde-env-*.sh for login scripts
+ "install-session-driver" => 0, # Above, + ~/.xsession
+ "purge-old-logs" => 1,
+ "run-tests" => 0, # 1 = make test, upload = make Experimental
+ "stop-on-failure" => 0,
+ "use-clean-install" => 0,
+ "use-idle-io-priority" => 0,
+ "use-stable-kde" => 0,
);
# Holds other cmdline-accessible options that aren't simply binary flags.
diff --git a/vim/syntax/kdesrc-buildrc.vim b/vim/syntax/kdesrc-buildrc.vim
index eca0734..934c11f 100644
--- a/vim/syntax/kdesrc-buildrc.vim
+++ b/vim/syntax/kdesrc-buildrc.vim
@@ -1,9 +1,9 @@
" Vim syntax file
" Language: kdesrc-build configuration file
" Maintainer: Michael Pyne
-" Latest Revision: 31 July 2016
+" Latest Revision: 23 July 2017
-" Copyright (c) 2014-2016 Michael Pyne
+" Copyright (c) 2014-2017 Michael Pyne
" Redistribution and use in source and binary forms, with or without
" modification, are permitted provided that the following conditions
" are met:
@@ -63,19 +63,21 @@ syn keyword ksbrcErrorModuleSetOption contained skipwhite nextgroup=ksbrcStringV
syn keyword ksbrcBoolOption contained skipwhite nextgroup=ksbrcBoolValue
\ build-system-only build-when-unchanged ignore-kde-structure
- \ install-after-build install-session-driver manual-build manual-update
+ \ install-after-build manual-build manual-update
\ no-src reconfigure recreate-configure refresh-build run-tests
\ use-clean-install
syn keyword ksbrcGlobalBoolOption contained skipwhite nextgroup=ksbrcBoolValue
\ async colorful-output disable-agent-check disable-snapshots pretend
- \ purge-old-logs stop-on-failure use-idle-io-priority
+ \ purge-old-logs stop-on-failure use-idle-io-priority install-session-driver
+ \ install-environment-driver
" MUST BE CONSISTENT WITH ABOVE. Used when a global option is used in the
" wrong spot to highlight the error.
syn keyword ksbrcErrorBoolOption contained skipwhite nextgroup=ksbrcBoolValue
\ async colorful-output disable-agent-check disable-snapshots pretend
- \ purge-old-logs stop-on-failure use-idle-io-priority
+ \ purge-old-logs stop-on-failure use-idle-io-priority install-session-driver
+ \ install-environment-driver
" Matches
syn match ksbrcKeyword "\"