summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2005-10-02 09:29:29 +0000
committerjmmv <jmmv@pkgsrc.org>2005-10-02 09:29:29 +0000
commit82da29a08ee6528f25847b3af5a79a68ff943e11 (patch)
tree2f990659d280601436d0301a996c1770cea5bf5c
parentdd09b5ada64a094fbce5bcc839d239af364dd1c8 (diff)
downloadpkgsrc-82da29a08ee6528f25847b3af5a79a68ff943e11.tar.gz
Update to 1.1:
- Raise an appropriate warning if pkg_admin pmatch fails due to an incorrect pattern (e.g., cairo>=0.5.2-head is unrecognized).
-rw-r--r--pkgtools/verifypc/Makefile4
-rw-r--r--pkgtools/verifypc/files/verifypc.sh12
2 files changed, 11 insertions, 5 deletions
diff --git a/pkgtools/verifypc/Makefile b/pkgtools/verifypc/Makefile
index 34e1d89e4e1..3e771a9804e 100644
--- a/pkgtools/verifypc/Makefile
+++ b/pkgtools/verifypc/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.1.1.1 2005/10/01 12:56:51 jmmv Exp $
+# $NetBSD: Makefile,v 1.2 2005/10/02 09:29:29 jmmv Exp $
#
-DISTNAME= verifypc-1.0
+DISTNAME= verifypc-1.1
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/verifypc/files/verifypc.sh b/pkgtools/verifypc/files/verifypc.sh
index a380b8621b1..d19e97202b4 100644
--- a/pkgtools/verifypc/files/verifypc.sh
+++ b/pkgtools/verifypc/files/verifypc.sh
@@ -1,6 +1,6 @@
#!@SH@
#
-# $NetBSD: verifypc.sh,v 1.1.1.1 2005/10/01 12:56:51 jmmv Exp $
+# $NetBSD: verifypc.sh,v 1.2 2005/10/02 09:29:29 jmmv Exp $
#
# verifypc - Sanity check package dependencies according to pkg-config
# Copyright (c) 2005 Julio M. Merino Vidal <jmmv@NetBSD.org>
@@ -83,7 +83,7 @@ search_file_in_depends() {
#
check_match() {
local dep="${1}" pcname="${2}" pcop="${3}" pcver="${4}"
- local pkgdep pkgname
+ local out pkgdep pkgname ret
if [ ${pcop} != ">" -a ${pcop} != ">=" -a ${pcop} != "-" ]; then
warn "unsupported operator ${pcop} in ${pcname} dependency"
@@ -93,9 +93,15 @@ check_match() {
pkgdep=$(echo ${dep} | cut -d : -f 1 | sed 's|>=|-|;s|>|-|')
pkgname=$(echo ${pkgdep} | cut -d - -f 1)
- if ! pkg_admin pmatch "${pkgname}${pcop}${pcver}" "${pkgdep}"; then
+ out=$(pkg_admin pmatch "${pkgname}${pcop}${pcver}" "${pkgdep}" 2>&1)
+ ret=$?
+ if [ ${ret} -ne 0 ]; then
warn "${pcname} not correct; '${pcop} ${pcver}' needed"
return 1
+ elif [ -n "${out}" ]; then
+ warn "${pcname} pmatch failed; wanted" \
+ "${pkgname}${pcop}${pcver}, have ${pkgdep}"
+ return 1
fi
return 0
}