[libcalamares] Remove TMP-related environment variables
When running a command in the chroot, don't set TMP (and similar) variables because those directories might nog make sense in the target (yet). FIXES #2269
This commit is contained in:
parent
5583c15291
commit
1b655c26ef
@ -29,6 +29,8 @@ This release contains contributions from (alphabetically by first name):
|
|||||||
- In CMake, "view" is no longer accepted as an alias of the module
|
- In CMake, "view" is no longer accepted as an alias of the module
|
||||||
type "viewmodule" in function `calamares_add_plugin()`.
|
type "viewmodule" in function `calamares_add_plugin()`.
|
||||||
- Plain Ubuntu builds have been added to the CI roster. (thanks Simon)
|
- Plain Ubuntu builds have been added to the CI roster. (thanks Simon)
|
||||||
|
- Commands that run in the target system (in the chroot) no longer
|
||||||
|
use the TMP-related environment variables from the host. #2269
|
||||||
|
|
||||||
## Modules ##
|
## Modules ##
|
||||||
- The *displaymanager* module configuration for `greetd` has some more
|
- The *displaymanager* module configuration for `greetd` has some more
|
||||||
|
@ -128,6 +128,14 @@ Calamares::Utils::Runner::run()
|
|||||||
{
|
{
|
||||||
auto env = QProcessEnvironment::systemEnvironment();
|
auto env = QProcessEnvironment::systemEnvironment();
|
||||||
env.insert( "LC_ALL", "C" );
|
env.insert( "LC_ALL", "C" );
|
||||||
|
// No guarantees that host settings for /tmp/ make sense in target
|
||||||
|
if ( m_location == RunLocation::RunInTarget )
|
||||||
|
{
|
||||||
|
env.remove( "TEMP" );
|
||||||
|
env.remove( "TEMPDIR" );
|
||||||
|
env.remove( "TMP" );
|
||||||
|
env.remove( "TMPDIR" );
|
||||||
|
}
|
||||||
process.setProcessEnvironment( env );
|
process.setProcessEnvironment( env );
|
||||||
}
|
}
|
||||||
process.setProcessChannelMode( QProcess::MergedChannels );
|
process.setProcessChannelMode( QProcess::MergedChannels );
|
||||||
|
Loading…
Reference in New Issue
Block a user