summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2007-05-20 13:35:55 +0000
committertnn <tnn@pkgsrc.org>2007-05-20 13:35:55 +0000
commit69796d3406ea117170a5c10972fca06059ac1649 (patch)
treed3bfea2b7abe0d5220d67b409a845ac9d460fb0f /pkgtools
parent17416ddbb9cd77a89c76538282a430ee3b1ef6c2 (diff)
downloadpkgsrc-69796d3406ea117170a5c10972fca06059ac1649.tar.gz
- Change the way pkg_rolling-replace parses version numbers. Everything
after the last hyphen is the version, not everything after the first occurence of '-[0-9]'. This allows pkg_rolling-replace users to upgrade packages such as font-bitstream-100dpi. - Use INSTALL_MAN, not INSTALL_SCRIPT. Manpages are not executable. - Bump PKGREVISION.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_rolling-replace/Makefile6
-rwxr-xr-xpkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh18
2 files changed, 12 insertions, 12 deletions
diff --git a/pkgtools/pkg_rolling-replace/Makefile b/pkgtools/pkg_rolling-replace/Makefile
index 9f2e1ceb8c1..0195557f952 100644
--- a/pkgtools/pkg_rolling-replace/Makefile
+++ b/pkgtools/pkg_rolling-replace/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.6 2007/05/11 16:48:55 tnn Exp $
+# $NetBSD: Makefile,v 1.7 2007/05/20 13:35:55 tnn Exp $
DISTNAME= pkg_rolling-replace-0.04
-PKGREVISION= 5
+PKGREVISION= 6
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
@@ -44,7 +44,7 @@ do-extract: check-pkgsrc-patch
do-install: check-pkgsrc-patch
${INSTALL_SCRIPT} ${WRKSRC}/pkg_rolling-replace.sh \
${PREFIX}/sbin/pkg_rolling-replace
- ${INSTALL_SCRIPT} ${FILESDIR}/pkg_rolling-replace.8 \
+ ${INSTALL_MAN} ${FILESDIR}/pkg_rolling-replace.8 \
${PREFIX}/${PKGMANDIR}/man8/pkg_rolling-replace.8
check-pkgsrc-patch:
diff --git a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh b/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh
index 1e36247152a..1a4e0d2c806 100755
--- a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh
+++ b/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# $NetBSD: pkg_rolling-replace.sh,v 1.4 2007/05/11 16:48:55 tnn Exp $
+# $NetBSD: pkg_rolling-replace.sh,v 1.5 2007/05/20 13:35:56 tnn Exp $
#<license>
# Copyright (c) 2006 BBN Technologies Corp. All rights reserved.
#
@@ -123,8 +123,8 @@ check_packages_mismatched()
# Look for the first thing that looks like pkg-version rather
# than category/pkg and remove the version.
for word in $line; do
- if [ "$(echo $word | egrep '^[^/]+-[0-9][^/]*$')" ]; then
- echo $word | sed 's/-[0-9].*//'
+ if [ "$(echo $word | egrep '^[^/]+-[0-9][^-/]*$')" ]; then
+ echo $word | sed 's/-[0-9][^-]*$//'
break #done with this line
fi
done
@@ -139,7 +139,7 @@ check_packages_w_flag()
for pkgver in $(pkg_info -e '*'); do
if pkg_info -Bq $pkgver \
| egrep "^$_flag=[Yy][Ee][Ss]" > /dev/null; then
- echo $pkgver | sed 's/-[0-9].*//'
+ echo $pkgver | sed 's/-[0-9][^-]*$//'
fi
done
}
@@ -148,11 +148,11 @@ check_packages_w_flag()
depgraph_installed()
{
for pkgver in $(pkg_info -e '*'); do
- pkg=$(echo $pkgver | sed 's/-[0-9].*//')
+ pkg=$(echo $pkgver | sed 's/-[0-9][^-]*$//')
# Include $pkg as a node without dependencies in case it has none.
echo $pkg $pkg
for depver in $(pkg_info -Nq $pkg); do
- dep=$(echo $depver | sed 's/-[0-9].*//')
+ dep=$(echo $depver | sed 's/-[0-9][^-]*$//')
echo $dep $pkg
done
done
@@ -327,14 +327,14 @@ while [ -n "$REPLACE_TODO" ]; do
if ! is_member $pkg $DEPENDS_CHECKED; then
echo "${OPI} Checking if $pkg has new depends..."
- OLD_DEPENDS=$(pkg_info -Nq $pkg | sed 's/-[0-9].*[[:>:]]//g')
+ OLD_DEPENDS=$(pkg_info -Nq $pkg | sed 's/-[0-9][^-]*$//')
NEW_DEPENDS=
cd "$PKGSRCDIR/$pkgdir"
bdeps=$(${MAKE} show-depends VARNAME=BUILD_DEPENDS)
rdeps=$(${MAKE} show-depends)
for depver in $bdeps $rdeps; do
- dep=$(echo $depver | sed -e 's/-[0-9].*//' -e 's/[<>]=[0-9].*//' \
- -e 's/-[][].*//')
+ dep=$(echo $depver | sed -E -e 's/[:[].*$/0/' \
+ -e 's/(>=|<=|-)[0-9][^-]*$//')
if ! is_member $dep $OLD_DEPENDS $NEW_DEPENDS; then
NEW_DEPENDS="$NEW_DEPENDS $dep"
DEPGRAPH_SRC="$DEPGRAPH_SRC $dep $pkg"