From 806e94dcd8dbdf7bf1909657fd4331cfe17b4ab0 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 10 Dec 2018 16:52:59 +0100 Subject: Set PATH=/usr/sbin:/usr/bin:/sbin:/bin when running dpkg This avoids a lot of problems from local installations of scripting languages and other stuff in /usr/local for which maintainer scripts are not prepared. [v3: Inherit PATH during tests, check overrides work] [v2: Add testing] --- doc/apt.conf.5.xml | 7 +++++++ doc/examples/configure-index | 4 ++++ 2 files changed, 11 insertions(+) (limited to 'doc') diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index 64a26bc4a..ffbcba5a4 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -776,6 +776,13 @@ APT::Compressor::rev { using the list notation and each list item is passed as a single argument to &dpkg;. + + + This is a string that defines the PATH + environment variable used when running dpkg. It may be set to any + valid value of that environment variable; or the empty string, in + which case the variable is not changed. + This is a list of shell commands to run before/after invoking &dpkg;. diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 99aedfd19..d7bd3daba 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -461,6 +461,10 @@ DPkg // Probably don't want to use force-downgrade.. Options {"--force-overwrite";"--force-downgrade";} + // Defaults to /usr/sbin:/usr/bin:/sbin:/bin, might be set to empty + // string to inherit from environment + Path ""; + // Auto re-mounting of a readonly /usr Pre-Invoke {"mount -o remount,rw /usr";}; Post-Invoke {"mount -o remount,ro /usr";}; -- cgit v1.2.3