[Pkg-javascript-devel] Bug#909232: node-constants-browserify wrong use of DPKG_ROOT

Helmut Grohne helmut at subdivi.de
Thu Sep 20 05:06:23 BST 2018


Package: node-constants-browserify
Version: 1.0.0+dfsg-6

Hi,

I saw that you added support for DPKG_ROOT and that's great.
Unfortunately, it also is wrong.

1. You don't need a Pre-Depends on dpkg for DPKG_ROOT support. The
   feature is explicitly designed to be backwards-compatible. With an
   old dpkg, the variable will be absent and the shell will substitute
   an empty string, which is correct. There is one wrinkle though:
   If you "set -u", you should use "${DPKG_ROOT:-}" instead of just
   "$DPKG_ROOT" for compatibility with older dpkg.

2. Preprending DPKG_ROOT to executables like nodejs is wrong. In the
   typical use, the one inside the chroot will not be executable,
   because it comes from a foreign architecture. Even if it were, it
   would fail loading libraries as the library search path is not
   pointed at the chroot. On the other hand prepending DPKG_ROOT to
   the CONSTANTS_FILE is the intended use.

Helmut



More information about the Pkg-javascript-devel mailing list