pacman/scripts/libmakepkg
Luke Shumaker f7efa6a93d makepkg: Better error messages for versions in (check, make, opt)depends/provides/conflicts
Given the depends

    depends=('foo>=1.2-1.par2')

and the error message

    ==> ERROR: pkgver in depends is not allowed to contain colons, forward slashes, hyphens or whitespace.

One would be lead to believe that the problem is that they gave a pkgrel in
depends at all, not that the pkgrel contains letters.

Each of the (check,make,opt)depends, conflicts, and provides linters use a
glob to trim off properly formed epoch an rel from the full version string,
and pass the remainder to check_pkgver().  This does a good job of
accepting/rejecting full versions, but doesn't do a good job of generating
good error messages when rejecting if it's because of the epoch or rel.

1. Factor out check_epoch() and check_pkgrel() from lint_epoch() and
   lint_pkgrel(), similarly to check_pkgver().
2. Add a check_fullpkgver() that takes a full [epoch:]ver[-rel] string and
   splits it in to epoch/ver/rel, and calls the appropriate check_ function
   on each.
3. Use check_fullpkgver() in the {,check,make,opt}depends, conflicts, and
   provides linters.

Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-10 17:00:03 +10:00
..
buildenv Split prepare_buildenv() to libmakepkg 2018-11-27 22:48:43 +10:00
executable makepkg: fix broken check for the fakeroot binary 2019-01-10 13:25:12 +10:00
integrity Add meson.build files to build with meson 2018-11-02 03:16:34 -04:00
lint_config Add meson.build files to build with meson 2018-11-02 03:16:34 -04:00
lint_package Add meson.build files to build with meson 2018-11-02 03:16:34 -04:00
lint_pkgbuild makepkg: Better error messages for versions in (check, make, opt)depends/provides/conflicts 2019-01-10 17:00:03 +10:00
source Add meson.build files to build with meson 2018-11-02 03:16:34 -04:00
tidy Add meson.build files to build with meson 2018-11-02 03:16:34 -04:00
util Add meson.build files to build with meson 2018-11-02 03:16:34 -04:00
.gitignore libmakepkg: fix .gitignore to simply ignore all generated .sh files 2017-12-07 15:37:20 +10:00
buildenv.sh.in Split prepare_buildenv() to libmakepkg 2018-11-27 22:48:43 +10:00
executable.sh.in libmakepkg/executable: don't rely on scoped value of $ret to flag outcomes 2018-12-04 17:22:27 +10:00
integrity.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
lint_config.sh.in libmakepkg: Add basic rules to lint makepkg.conf variables 2018-03-15 14:34:13 +10:00
lint_package.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
lint_pkgbuild.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
meson.build meson: remove useless mkdir -p 2018-12-12 10:12:41 +10:00
source.sh.in remove unneeded break argument from option parsing 2018-05-12 21:09:37 +10:00
srcinfo.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
tidy.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
util.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00