summaryrefslogtreecommitdiff
path: root/libre/pacman/0001-makepkg-Better-error-messages-for-versions-in-check-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'libre/pacman/0001-makepkg-Better-error-messages-for-versions-in-check-.patch')
-rw-r--r--libre/pacman/0001-makepkg-Better-error-messages-for-versions-in-check-.patch41
1 files changed, 30 insertions, 11 deletions
diff --git a/libre/pacman/0001-makepkg-Better-error-messages-for-versions-in-check-.patch b/libre/pacman/0001-makepkg-Better-error-messages-for-versions-in-check-.patch
index 641984e94..4afdca595 100644
--- a/libre/pacman/0001-makepkg-Better-error-messages-for-versions-in-check-.patch
+++ b/libre/pacman/0001-makepkg-Better-error-messages-for-versions-in-check-.patch
@@ -1,4 +1,4 @@
-From d45e7d7e660704fac084badc1835aff037995b65 Mon Sep 17 00:00:00 2001
+From 0b1dacfbd6ed3e8b8af290a108cbcd90e2fbea5c Mon Sep 17 00:00:00 2001
From: Luke Shumaker <lukeshu@parabola.nu>
Date: Mon, 6 Aug 2018 23:42:48 -0400
Subject: [PATCH 1/4] makepkg: Better error messages for versions in
@@ -29,18 +29,31 @@ good error messages when rejecting if it's because of the epoch or rel.
3. Use check_fullpkgver() in the {,check,make,opt}depends, conflicts, and
provides linters.
---
+ scripts/Makefile.am | 1 +
.../lint_pkgbuild/checkdepends.sh.in | 10 ++--
.../libmakepkg/lint_pkgbuild/conflicts.sh.in | 10 ++--
- .../libmakepkg/lint_pkgbuild/depends.sh.in | 14 +++---
+ .../libmakepkg/lint_pkgbuild/depends.sh.in | 14 ++---
scripts/libmakepkg/lint_pkgbuild/epoch.sh.in | 10 +++-
- .../libmakepkg/lint_pkgbuild/fullpkgver.sh.in | 48 +++++++++++++++++++
+ .../libmakepkg/lint_pkgbuild/fullpkgver.sh.in | 54 +++++++++++++++++++
.../lint_pkgbuild/makedepends.sh.in | 10 ++--
.../libmakepkg/lint_pkgbuild/optdepends.sh.in | 10 ++--
- scripts/libmakepkg/lint_pkgbuild/pkgrel.sh.in | 20 ++++++--
+ scripts/libmakepkg/lint_pkgbuild/pkgrel.sh.in | 20 +++++--
.../libmakepkg/lint_pkgbuild/provides.sh.in | 10 ++--
- 9 files changed, 99 insertions(+), 43 deletions(-)
+ 10 files changed, 106 insertions(+), 43 deletions(-)
create mode 100644 scripts/libmakepkg/lint_pkgbuild/fullpkgver.sh.in
+diff --git a/scripts/Makefile.am b/scripts/Makefile.am
+index f759e149..7cf8bed0 100644
+--- a/scripts/Makefile.am
++++ b/scripts/Makefile.am
+@@ -73,6 +73,7 @@ LIBMAKEPKG_IN = \
+ libmakepkg/lint_pkgbuild/conflicts.sh \
+ libmakepkg/lint_pkgbuild/depends.sh \
+ libmakepkg/lint_pkgbuild/epoch.sh \
++ libmakepkg/lint_pkgbuild/fullpkgver.sh \
+ libmakepkg/lint_pkgbuild/install.sh \
+ libmakepkg/lint_pkgbuild/makedepends.sh \
+ libmakepkg/lint_pkgbuild/optdepends.sh \
diff --git a/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in b/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in
index d5648bd4..0a9ddf67 100644
--- a/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in
@@ -159,10 +172,10 @@ index 93bd05c1..c98f91b0 100644
+}
diff --git a/scripts/libmakepkg/lint_pkgbuild/fullpkgver.sh.in b/scripts/libmakepkg/lint_pkgbuild/fullpkgver.sh.in
new file mode 100644
-index 00000000..761b3dac
+index 00000000..1cac7fbc
--- /dev/null
+++ b/scripts/libmakepkg/lint_pkgbuild/fullpkgver.sh.in
-@@ -0,0 +1,48 @@
+@@ -0,0 +1,54 @@
+#!/bin/bash
+#
+# fullpkgver.sh - Check whether a full version conforms to requirements.
@@ -183,8 +196,8 @@ index 00000000..761b3dac
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
-+[[ -n "$LIBMAKEPKG_LINT_PKGBUILD_PKGVER_SH" ]] && return
-+LIBMAKEPKG_LINT_PKGBUILD_PKGVER_SH=1
++[[ -n "$LIBMAKEPKG_LINT_PKGBUILD_FULLPKGVER_SH" ]] && return
++LIBMAKEPKG_LINT_PKGBUILD_FULLPKGVER_SH=1
+
+LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
+
@@ -197,12 +210,18 @@ index 00000000..761b3dac
+ local fullver=$1 type=$2
+ local ret=0
+
++ # If there are multiple colons or multiple hyphens, there's a
++ # question of how we split it--it's invalid either way, but it
++ # will affect error messages. Let's mimic version.c:parseEVR().
++
+ if [[ $fullver = *:* ]]; then
-+ check_epoch "${fullver%:*}" "$type" || ret=1
-+ fullver=${fullver##*:}
++ # split at the *first* colon
++ check_epoch "${fullver%%:*}" "$type" || ret=1
++ fullver=${fullver#*:}
+ fi
+
+ if [[ $fullver = *-* ]]; then
++ # split at the *last* hyphen
+ check_pkgrel "${fullver##*-}" "$type" || ret=1
+ fullver=${fullver%-*}
+ fi