aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Büsch <mb@bu3sch.de>2010-11-03 12:49:38 +0000
committerMichael Büsch <mb@bu3sch.de>2010-11-03 12:49:38 +0000
commitb964989f756e5e46ef4b3f9821d938eed582e55f (patch)
treec9a98aead11b9f05199c9f551bddecaf37106cc6
parente0ef43b324911ff3ca0cd3679daf04fee5785c00 (diff)
downloadupstream-b964989f756e5e46ef4b3f9821d938eed582e55f.tar.gz
upstream-b964989f756e5e46ef4b3f9821d938eed582e55f.tar.bz2
upstream-b964989f756e5e46ef4b3f9821d938eed582e55f.zip
deptest: Add sanity check to avoid trouble with illegal package names
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23819 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-xscripts/deptest.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/deptest.sh b/scripts/deptest.sh
index d72b7a0af6..762821a39c 100755
--- a/scripts/deptest.sh
+++ b/scripts/deptest.sh
@@ -36,6 +36,8 @@ die()
test_package() # $1=pkgname
{
local pkg="$1"
+ [ -z "$(echo "$pkg" | grep -e '/')" -a "$pkg" != "." -a "$pkg" != ".." ] || \
+ die "Package name \"$pkg\" contains illegal characters"
local SELECTED=
for conf in `grep CONFIG_PACKAGE tmp/.packagedeps | grep -E "[ /]$pkg\$" | sed -e 's,package-$(\(CONFIG_PACKAGE_.*\)).*,\1,'`; do
grep "$conf=" .config > /dev/null && SELECTED=1 && break