summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerh <erh@pkgsrc.org>2004-07-19 17:38:36 +0000
committererh <erh@pkgsrc.org>2004-07-19 17:38:36 +0000
commit85a992eb48a962314f2edf038be7e572b0d93bcb (patch)
tree003ba7913ec7ae66f430594c85c294c7b7bcba58
parent72ffeae4fcd0eb3f2a93f0dffa4fed2101adc3dd (diff)
downloadpkgsrc-85a992eb48a962314f2edf038be7e572b0d93bcb.tar.gz
Fix bug in handling of wildcarded package names on the command line.
Bump version to 1.6.1
-rw-r--r--pkgtools/pkg_tarup/Makefile4
-rw-r--r--pkgtools/pkg_tarup/files/pkg_tarup31
2 files changed, 25 insertions, 10 deletions
diff --git a/pkgtools/pkg_tarup/Makefile b/pkgtools/pkg_tarup/Makefile
index e5ee18cf36d..2bcd493477d 100644
--- a/pkgtools/pkg_tarup/Makefile
+++ b/pkgtools/pkg_tarup/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.20 2004/07/14 16:08:48 erh Exp $
+# $NetBSD: Makefile,v 1.21 2004/07/19 17:38:36 erh Exp $
-DISTNAME= pkg_tarup-1.6
+DISTNAME= pkg_tarup-1.6.1
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkg_tarup/files/pkg_tarup b/pkgtools/pkg_tarup/files/pkg_tarup
index b0d87eb90d3..05f34e94039 100644
--- a/pkgtools/pkg_tarup/files/pkg_tarup
+++ b/pkgtools/pkg_tarup/files/pkg_tarup
@@ -1,6 +1,6 @@
#! @SH@
#
-# $Id: pkg_tarup,v 1.13 2004/07/14 16:08:48 erh Exp $
+# $Id: pkg_tarup,v 1.14 2004/07/19 17:38:36 erh Exp $
#
# Tar up installed package
#
@@ -133,14 +133,28 @@ create_package()
add_to_list()
{
+ local added
+
+ added=0
+
+ oIFS="$IFS"
+ IFS="
+"
# Get expanded name, and escape quotes
- rPKG=`pkg_info -e "$1" | ${SED} -e's/\"/\\\"/g'`
- if [ -z "$rPKG" -o -f "${PKG_DBDIR}/${rPKG}" ] ; then
- ${ECHO} "Error: package $1 not found"
- usage "$0"
- fi
- if ! ${ECHO} "${PKGS}" | ${GREP} -q "\"${rPKG}\"" ; then
- PKGS="${PKGS} \"${rPKG}\""
+ for rPKG in `pkg_info -e "$1" | ${SED} -e's/\"/\\\"/g'` ; do
+ if [ -z "$rPKG" -o -f "${PKG_DBDIR}/${rPKG}" ] ; then
+ ${ECHO} "Error: package $1 not found"
+ usage "$0"
+ fi
+
+ added=1
+ if ! ${ECHO} "${PKGS}" | ${GREP} -q "\"${rPKG}\"" ; then
+ PKGS="${PKGS} \"${rPKG}\""
+ fi
+ done
+ IFS="$oIFS"
+ if [ $added -eq 0 ] ; then
+ ${ECHO} "Warning: no package matching $1 found"
fi
}
@@ -188,6 +202,7 @@ while [ $# -gt 0 ] ; do
shift
done
if [ -z "${PKGS}" ] ; then
+ ${ECHO} "ERROR: No packages to tarup identified!"
usage "$0"
fi
FOR="