Add install-environment-driver option.

This installs needed KDE-related environment settings without going so
far as to install .xsession support.  For that, see
install-session-driver, whose documentation has been fixed to make clear
it's not a default.
wilder
Michael Pyne 9 years ago
parent 58f9b7b5d5
commit 9031e6c85f
  1. 38
      doc/index.docbook
  2. 11
      modules/ksb/Application.pm
  3. 28
      modules/ksb/BuildContext.pm
  4. 12
      vim/syntax/kdesrc-buildrc.vim

@ -2140,10 +2140,43 @@ flag.
</entry>
</row>
<row id="conf-install-environment-driver">
<entry>install-environment-driver</entry>
<entry>Cannot be overridden</entry>
<entry><para>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;.</para>
<para>This driver will alter the following files:</para>
<itemizedlist>
<listitem><para><filename>$XDG_CONFIG_HOME/kde-env-master.sh</filename> (normally found at <filename>~/.config/kde-env-master.sh</filename>).</para></listitem>
<listitem><para><filename>$XDG_CONFIG_HOME/kde-env-user.sh</filename> (normally found at <filename>~/.config/kde-env-user.sh</filename>).</para></listitem>
</itemizedlist>
<para>The <filename>kde-env-user.sh</filename> is optional. It is
intended for user customizations (see the <ulink url="https://userbase.kde.org/KDE_System_Administration/Environment_Variables#Troubleshooting_and_Debugging">Troubleshooting and Debugging</ulink>
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.</para>
<para>You can disable this feature by setting this option to
<replaceable>false</replaceable>, and ensuring that the <link
linkend="conf-install-session-driver">install-session-driver</link> option is
also disabled.</para>
<para>This option was introduced with &kdesrc-build; 17.08.</para>
<tip><para>&kdesrc-build; will not overwrite your existing files (if present)
unless you also pass the <option><link
linkend="cmdline-delete-my-settings">--delete-my-settings</link></option>
command-line option.</para></tip>
</entry>
</row>
<row id="conf-install-session-driver">
<entry>install-session-driver</entry>
<entry>Cannot be overridden</entry>
<entry><para>By default, &kdesrc-build; will try to install a driver for the graphical
<entry><para>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.</para>
<para>This driver will alter the following files:</para>
@ -2155,7 +2188,8 @@ login manager that allows you to login to your &kdesrc-build;-built &kde; deskto
</itemizedlist>
<para>If you maintain your own login driver then you can disable this feature by setting this
option to <replaceable>false</replaceable>.</para>
option to <replaceable>false</replaceable>. If enabled, this feature also enables the
<link linkend="conf-install-environment-driver">install-environment-driver</link> feature.</para>
<para>This option was introduced with &kdesrc-build; 1.16.</para>

@ -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!");
};

@ -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.

@ -1,9 +1,9 @@
" Vim syntax file
" Language: kdesrc-build configuration file
" Maintainer: Michael Pyne <mpyne@kde.org>
" Latest Revision: 31 July 2016
" Latest Revision: 23 July 2017
" Copyright (c) 2014-2016 Michael Pyne <mpyne@kde.org>
" Copyright (c) 2014-2017 Michael Pyne <mpyne@kde.org>
" 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 "\<end\s\+global\>"

Loading…
Cancel
Save