deptest: Add sanity check to avoid trouble with illegal package names
authormb <mb@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 3 Nov 2010 12:49:38 +0000 (12:49 +0000)
committermb <mb@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 3 Nov 2010 12:49:38 +0000 (12:49 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23819 3c298f89-4303-0410-b956-a3cf2f4a3e73

scripts/deptest.sh

index d72b7a0..762821a 100755 (executable)
@@ -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
This page took 0.024162 seconds and 4 git commands to generate.