pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_tarup Fix bug in handling of wildcarded p...
details: https://anonhg.NetBSD.org/pkgsrc/rev/2b4cbcbe9c43
branches: trunk
changeset: 478208:2b4cbcbe9c43
user: erh <erh%pkgsrc.org@localhost>
date: Mon Jul 19 17:38:36 2004 +0000
description:
Fix bug in handling of wildcarded package names on the command line.
Bump version to 1.6.1
diffstat:
pkgtools/pkg_tarup/Makefile | 4 ++--
pkgtools/pkg_tarup/files/pkg_tarup | 31 +++++++++++++++++++++++--------
2 files changed, 25 insertions(+), 10 deletions(-)
diffs (67 lines):
diff -r 40a436e02402 -r 2b4cbcbe9c43 pkgtools/pkg_tarup/Makefile
--- a/pkgtools/pkg_tarup/Makefile Mon Jul 19 14:04:29 2004 +0000
+++ b/pkgtools/pkg_tarup/Makefile Mon Jul 19 17:38:36 2004 +0000
@@ -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 -r 40a436e02402 -r 2b4cbcbe9c43 pkgtools/pkg_tarup/files/pkg_tarup
--- a/pkgtools/pkg_tarup/files/pkg_tarup Mon Jul 19 14:04:29 2004 +0000
+++ b/pkgtools/pkg_tarup/files/pkg_tarup Mon Jul 19 17:38:36 2004 +0000
@@ -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 @@
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 @@
shift
done
if [ -z "${PKGS}" ] ; then
+ ${ECHO} "ERROR: No packages to tarup identified!"
usage "$0"
fi
FOR="
Home |
Main Index |
Thread Index |
Old Index