pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Two pkcsrc installations in parallel?



On 2019-04-25 14:49, Benny Siegert wrote:
Totally possible, as long as you choose two different prefixes and DB directories. You use the bootstrap script to set up the second instance and build using Blake from the correct directory instead of make.
"Blake" -> "bmake"?

To elaborate on what I noted before, it's important that you do not accidentally run the wrong bmake (or make), since it has the pkgsrc prefix built-in at bootstrap time.

E.g. If you have two bootstrapped trees with the following source, install, and sys prefixes:

1. /pkgsrc-1, /pkg-1, /pkg-1/var
2. /pkgsrc-2, /pkg-2, /pkg-2/var

do not run "/pkg-1/bin/bmake" from within "/pkgsrc-2/lang/gcc7". Doing so will update the wrong package db.?? Be sure to run "bmake" rather than "make" and that the correct "bmake" is first in your PATH.

The auto-pkgsrc-setup script prevents the latter mistake by moving bmake to bmake.bin and installing a wrapper script in its place:

#!/bin/sh -e

if ! pwd | fgrep -q /sharedapps/pkgsrc-2019Q1; then
?????? cat << EOM

?????? ?????? ?????? ?????? ===== Error =====

You are running $(which bmake) from the wrong directory.
It should only be used from within /sharedapps/pkgsrc-2019Q1.
Load the correct environment module so that you are using the appropriate
bmake for $(pwd) or go to /sharedapps/pkgsrc-2019Q1.

EOM
?????? exit 1
fi

# Make sure software installed is world-readable on systems with tighter
# default umask.
umask 022
bmake.bin "$@"

This check is not perfect and it would be better to add such a check inside bmake since the wrapper script could get clobbered by a package upgrade, but I haven't had time to explore this.



Home | Main Index | Thread Index | Old Index