summaryrefslogtreecommitdiffstats
path: root/scripts/libmakepkg/lint_pkgbuild
AgeCommit message (Collapse)AuthorFilesLines
2017-01-04Update copyright yearsAllan McRae17-17/+17
Signed-off-by: Allan McRae <allan@archlinux.org>
2017-01-04makepkg: Disallow forward slashes in pkgverSteef Hegeman1-2/+2
scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in now raises an error when pkgver contains forward slashes. pkgver containing a forward slash results in a package filename containing a forward slash, which isn't a valid filename. Signed-off-by: Steef Hegeman <steefhegeman@hotmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-10-10lint_pkgbuild/pkgname: pkgname is not allowed to be emptyChristian Hesse1-0/+5
We checked for empty array elements, but did not catch empty array. Add a check for that case as well. Signed-off-by: Christian Hesse <mail@eworm.de> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-20libmakepkg: increase robustness of the detection of array variablesAllan McRae1-3/+3
Extract array detection into its own utility function that ensures extglob is enabled. Suggested-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-25Fix testing of arrays status for arch specific variablesZuyi Hu1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-04Update copyright years for 2016Allan McRae17-17/+17
make update-copyright OLD=2015 NEW=2016 Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-23lint_pkgbuild/variable: increase robustnessAllan McRae1-12/+54
Approach the detection of variables of the wrong type using an approach similar to that used for construction of .SRCINFO files. While doing silly things in bash could still result in false negatives, this approach should be very robust to generatinf false positives results. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-23lint_pkgbuild: explicitly return valueAllan McRae5-4/+12
Set the return value to be local and always explictly returns it. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-05Refactor lint_source to work with earlier versions of BashAaron Campbell1-1/+1
Negative subscripts to indexed arrays are not supported before 4.2. However, since substring expansion works on arrays, we can specify an offset of -1 to be taken relative to one greater than the maximum index of the specified array (see Parameter Expansion section of the bash man page). This works with both Bash 4.1 and 4.2, and 4.1 is already the oldest supported by pacman. Signed-off-by: Aaron Campbell <aaron@monkey.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-27libmakepkg: fix pkgver checkingAllan McRae1-2/+2
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-22libmakepkg: remove declaration of unused local variablesAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-22libmakepkg: return 1 on error in arch arrayAllan McRae1-2/+2
The return value was being assigned when an error was found in a PKGBUILD's arch array but it never was returned. Also remove error message explaining about adding the arch array to a PKGBUILD. That was added a long time ago when the arch array first became compulsory. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-07libmakepkg: check if PKGBUILD variables are arrays or not as appropriateAllan McRae1-0/+65
When extracting variables from PKGBUILD (e.g. for .SRCINFO creation) we make assumptions about whether variables are arrays or not. This adds a check to the PKGBUILD linter to ensure variables are arrays or not as appropriate. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-16makepkg: put further restrictions on pkgbaseAllan McRae1-0/+9
pkgbase should be subject to the same restrictions as pkgname Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-16makepkg: merge validate_pkgver into check_pkgverAllan McRae1-8/+4
The check that pkgver is non-empty done in check_pkgver should also be performed after running the pkgver() function. Merge validate_pkgver into check_pkgver and run check_pkgver after updating pkgver. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-16libmakepkg: extract PKGBUILD linting functionsAllan McRae16-0/+790
Signed-off-by: Allan McRae <allan@archlinux.org>