1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

Minor Bugfix

============
If a user were to specify /var/db/pkg/foo-1.2/ on the command line,
the old code already failed, but by telling people that it's ok to
do that now, I exposed one more place this needed to be fixed. Take
the opportunity to fix this in a more thorough way.
This commit is contained in:
Doug Barton 2007-02-25 08:05:22 +00:00
parent a8e6b40ca6
commit e06c42072e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=185861
2 changed files with 9 additions and 10 deletions

View File

@ -8,7 +8,7 @@
#
PORTNAME= portmaster
PORTVERSION= 1.13
PORTVERSION= 1.14
CATEGORIES= ports-mgmt
MASTER_SITES= # none
DISTFILES= # none

View File

@ -1,6 +1,6 @@
#!/bin/sh
# Local version: 1.151
# Local version: 1.152
# $FreeBSD$
# Copyright (c) 2005-2007 Douglas Barton, All rights reserved
@ -1191,20 +1191,19 @@ fi
# Exercised in the common case of not using -p option
case "$portdir" in
'') case "$1" in
'') argv=${1%/}
case "$argv" in
'') test -z "$UPDATE_REQ_BYS" && usage ;;
${pd}/*) portdir="${1#$pd/}" ;;
/*) upg_port="${1##*/}" ;;
${pd}/*) portdir="${argv#$pd/}" ;;
/*) upg_port="${argv##*/}" ;;
\.) portdir="${PWD##*/ports/}" ;;
*) if [ -d "${pd}/${1}" ]; then
portdir=$1
*) if [ -d "${pd}/${argv}" ]; then
portdir=$argv
else
upg_port=$1
upg_port=$argv
fi
;;
esac
portdir=${portdir%/}
upg_port=${upg_port%/}
esac
case "$upg_port" in