This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=11d1b249cf7bd838d6c608d99a5b61a87e6e3ebf

commit 11d1b249cf7bd838d6c608d99a5b61a87e6e3ebf
Author: Guillem Jover <[email protected]>
AuthorDate: Fri Jun 26 06:35:56 2020 +0200

    dpkg-realpath, dpkg-m-h: Export DPKG_ROOT variable
    
    We need to make sure we initialize and export DPKG_ROOT so that dpkg
    child processes get the environment variable.
---
 scripts/dpkg-maintscript-helper.sh | 1 +
 scripts/dpkg-realpath.sh           | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/scripts/dpkg-maintscript-helper.sh 
b/scripts/dpkg-maintscript-helper.sh
index 459165372..7e640661d 100755
--- a/scripts/dpkg-maintscript-helper.sh
+++ b/scripts/dpkg-maintscript-helper.sh
@@ -594,6 +594,7 @@ set -e
 PROGNAME=$(basename "$0")
 version="unknown"
 DPKG_ROOT=${DPKG_ROOT:+$(realpath "$DPKG_ROOT")}
+export DPKG_ROOT
 
 PKGDATADIR=scripts
 
diff --git a/scripts/dpkg-realpath.sh b/scripts/dpkg-realpath.sh
index b3cdab608..30a8d290b 100755
--- a/scripts/dpkg-realpath.sh
+++ b/scripts/dpkg-realpath.sh
@@ -50,7 +50,7 @@ END
 
 canonicalize() {
   local src="$1"
-  local root="$2"
+  local root="$DPKG_ROOT"
   local loop=0
   local result="$root"
   local dst
@@ -117,6 +117,9 @@ canonicalize() {
 
 setup_colors
 
+DPKG_ROOT="${DPKG_ROOT:-}"
+export DPKG_ROOT
+
 while [ $# -ne 0 ]; do
   case "$1" in
   --instdir|--root)
@@ -153,6 +156,6 @@ done
 
 [ -n "$pathname" ] || badusage "missing pathname"
 
-canonicalize "$pathname" "${DPKG_ROOT:-}"
+canonicalize "$pathname"
 
 exit 0

-- 
Dpkg.Org's dpkg

Reply via email to