Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

DESTDIR in 0.7.12 doesn't append --prefix #3489

Closed
joshwilsdon opened this Issue · 3 comments

2 participants

@joshwilsdon

These tests were run on Ubuntu 12.04, but the same behavior has been reproduced on SmartOS.

With 0.6.17:

./configure --prefix=/usr/node --without-ssl
make
make install DESTDIR=../out-6.17

results in:

$ find out-6.17/ -maxdepth 3 -type d
out-6.17/
out-6.17/usr
out-6.17/usr/node
out-6.17/usr/node/lib
out-6.17/usr/node/bin
out-6.17/usr/node/share
out-6.17/usr/node/include
$

With node 0.7.12:

./configure --prefix=/usr/node --without-ssl
make
make install DESTDIR=../out-7.12

results in:

$ find out-7.12/ -maxdepth 3 -type d
out-7.12/
out-7.12/lib
out-7.12/lib/node
out-7.12/lib/node/wafadmin
out-7.12/lib/node_modules
out-7.12/lib/node_modules/npm
out-7.12/bin
out-7.12/share
out-7.12/share/man
out-7.12/share/man/man1
out-7.12/include
out-7.12/include/node
out-7.12/include/node/uv-private
$ 

notice that prefix is no longer included.

@bnoordhuis
Owner

Yes, that's a deliberate change I made in f805139. DESTDIR wasn't working as many people expected it to, including myself.

Can you explain why (or if) you think the old behavior is better?

@joshwilsdon

There are a few reasons the pre-0.7.12 behavior is better, not least of which is that this is how most people who have used other projects will expect it to work:

I imagine this change will break most if not all maintained packages of node and require package maintainers to do additional work. It could also require special casing in their code as node now behaves differently from most other tools.

The biggest arguments in my opinion are:

  • the original version (where the result is ${DESTDIR}/${prefix}) is what every other project does and what people will expect
  • the point of DESTDIR is for staged installs such as installing into a chroot environment for example when building a package, for these you want 'make DESTDIR=/tmp/newpackage install' to install the whole tree including the prefix there as you configured it. With this change you always need to manually do make DESTDIR=/tmp/newpackage/${prefix}.
  • It's not clear what problem this change was trying to solve
@bnoordhuis bnoordhuis referenced this issue from a commit
@bnoordhuis bnoordhuis Revert "build: fix `make install DESTDIR=/path`"
This reverts commit f805139.

The reverted commit made DESTDIR behave more like we want it to but it was
pointed out in #3489 that it makes life a lot harder for distro package
maintainers.

Those guys and gals already have a hard enough time as it is, let's not make
their jobs even more hellish.
8966480
@bnoordhuis
Owner

Fair enough. Reverted in 8966480.

@bnoordhuis bnoordhuis closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.