summaryrefslogtreecommitdiff
path: root/mk/scripts
diff options
context:
space:
mode:
authorrillig <rillig>2005-11-18 11:07:27 +0000
committerrillig <rillig>2005-11-18 11:07:27 +0000
commit19eef8a09ba5b2b3a88eb91001e24c18c9a82611 (patch)
treeb7058f28b63209a8257c6b8c8ac675c944aee307 /mk/scripts
parent71ab10f57619e8b7b052067e7572996f0298bdc3 (diff)
downloadpkgsrc-19eef8a09ba5b2b3a88eb91001e24c18c9a82611.tar.gz
Added a few FIXMEs at places where this program might fail unexpectedly.
Diffstat (limited to 'mk/scripts')
-rwxr-xr-xmk/scripts/mkdatabase6
1 files changed, 5 insertions, 1 deletions
diff --git a/mk/scripts/mkdatabase b/mk/scripts/mkdatabase
index b738dfb06c9..845e5a688c4 100755
--- a/mk/scripts/mkdatabase
+++ b/mk/scripts/mkdatabase
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: mkdatabase,v 1.8 2005/11/18 10:58:37 rillig Exp $
+# $NetBSD: mkdatabase,v 1.9 2005/11/18 11:07:27 rillig Exp $
#
# Script for generating a database with complete dependency information
# for a particular package
@@ -139,6 +139,7 @@ yes) set -v;;
esac
if [ ! -d "$TMPDIR" ]; then
+ # FIXME: wouldn't it be better to fail in this case?
mkdir -p "$TMPDIR"
fi
@@ -151,6 +152,8 @@ case ${DATABASE} in
;;
*)
+ # FIXME: wouldn't it be better to fail in this case?
+
# make sure we have the full path to the database file
DATABASE=`pwd`/${DATABASE}
;;
@@ -172,6 +175,7 @@ if [ $append_flag = yes ]; then
case $debug_flag in
yes) echo "Looking for $pkgpath before appending";;
esac
+ # FIXME: $pkgpath may contain special regex characters.
if grep "^index $pkgpath " "${DATABASE}" >/dev/null 2>&1 ; then
echo "$prompt $pkgpath has already been depended. Skipping..."
exit 0