summaryrefslogtreecommitdiffstats
path: root/package/pseudo/pseudo-wrapper
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2016-11-08 23:18:35 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-11-09 23:30:15 +0100
commit499f28fc7ce6184c8017ccd229ffc973a520adde (patch)
treeccfa771cf4ba720da34d913521febe336369f1be /package/pseudo/pseudo-wrapper
parent74a3e75bb8208a8f3bb8426549fce1ea09b3be8a (diff)
downloadbuildroot-499f28fc7ce6184c8017ccd229ffc973a520adde.tar.gz
buildroot-499f28fc7ce6184c8017ccd229ffc973a520adde.zip
package/pseudo: provide better legacy handling for fakeroot
We now have a wrapper that makes pseudo behaves like the fakeroot of the good ol' days. So the symlink will just magically keep old scripts working as they did before the switch to pseudo. However, using fakeroot is deprecated, and we want people to stop using it altogether and switch to pseudo. So, make the wrapper recognise how it's called, and if called as fakeroot, print a warning message. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Gaƫl PORTAY <gael.portay@savoirfairelinux.com> Cc: Patrick Keroulas <patrick.keroulas@savoirfairelinux.com> Cc: Erico Nunes <nunes.erico@gmail.com> Cc: Julien BOIBESSOT <julien.boibessot@free.fr> Cc: Arnout Vandecappelle <arnout@mind.be> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/pseudo/pseudo-wrapper')
-rw-r--r--package/pseudo/pseudo-wrapper9
1 files changed, 8 insertions, 1 deletions
diff --git a/package/pseudo/pseudo-wrapper b/package/pseudo/pseudo-wrapper
index feaa7fcecb..9c8dbdbfab 100644
--- a/package/pseudo/pseudo-wrapper
+++ b/package/pseudo/pseudo-wrapper
@@ -1,5 +1,12 @@
#!/bin/sh
+if [ "${0##*/}" = "fakeroot" ]; then
+ cat >&2 <<-_EOF_
+ WARNING: fakeroot has been replaced with pseudo.
+ WARNING: Update your script(s) to use pseudo or pseudo-wrapper instead.
+ _EOF_
+fi
+
export PSEUDO_PREFIX="$(dirname "${0%/*}")"
export PSEUDO_OPTS="-t0"
if [ -n "${TARGET_DIR}" ]; then
@@ -9,4 +16,4 @@ if [ -n "${BASE_DIR}" ]; then
export PSEUDO_LOCALSTATEDIR="${BASE_DIR}/build/.pseudodb"
fi
-exec "${0%-wrapper}" "${@}"
+exec "${0%/*}/pseudo" "${@}"
OpenPOWER on IntegriCloud