summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ob-buildopk.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ob-buildopk.sh b/src/ob-buildopk.sh
index 1e661cc..5dd7917 100644
--- a/src/ob-buildopk.sh
+++ b/src/ob-buildopk.sh
@@ -1,6 +1,6 @@
# Pack binary package files into an opk file
#
-# Copyright (C) 2012 Patrick McDermott
+# Copyright (C) 2012, 2019 Patrick McDermott
#
# This file is part of opkbuild.
#
@@ -34,18 +34,23 @@ build_opk()
ob_info "$(ob_get_msg 'build_opk')" \
"${binary}_${version}_${arch}_${plat}.opk"
+ mkdir -p '.opkbuild'
+
# Don't dereference symbolic links. They might be absolute paths, and
# we don't want to attempt to affect the system on which we're building.
# Also, we want to set the mtimes of the links themselves, if possible.
- if ${HAVE_TOUCH_NODEREF}; then
+ rm -f '.opkbuild/touch-noderef.none' '.opkbuild/touch-noderef.link'
+ ln -s '.opkbuild/touch-noderef.none' '.opkbuild/touch-noderef.link'
+ ${TOUCH} -h '.opkbuild/touch-noderef.link' 1>/dev/null 2>/dev/null || :
+ if ! test -f '.opkbuild/touch-noderef.none'; then
find_not_link='' touch_noderef='-h'
else
find_not_link='! -type l' touch_noderef=''
fi
+ rm -f '.opkbuild/touch-noderef.none' '.opkbuild/touch-noderef.link'
# Detect whether BusyBox tar inserts files listed with -T in reverse
# order.
- mkdir -p '.opkbuild'
touch '.opkbuild/a' '.opkbuild/b'
if [ x"$(printf '.opkbuild/a\n.opkbuild/b\n' | ${TAR} -c -T - | \
${TAR} -t | head -n 1)" = x'b' ]; then