summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2003-01-08 17:57:42 +0000
committerjmmv <jmmv@pkgsrc.org>2003-01-08 17:57:42 +0000
commit655c2c15d5b23d42bcebf7b1f4c3ee2276891aac (patch)
tree2b70d737d3a244072d94873793d3a337a118d749 /pkgtools
parentb82840a358ecb122fd13a012bdcb074cb69f30fb (diff)
downloadpkgsrc-655c2c15d5b23d42bcebf7b1f4c3ee2276891aac.tar.gz
Update pkg_comp to 1.5. Fixes:
- Check if all sets exist before extracting any of them. - Treat EXTRAMK properly: only process the variable if it is non-empty.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_comp/Makefile4
-rw-r--r--pkgtools/pkg_comp/files/pkg_comp.sh21
2 files changed, 18 insertions, 7 deletions
diff --git a/pkgtools/pkg_comp/Makefile b/pkgtools/pkg_comp/Makefile
index 964c586fd5e..1ccac992205 100644
--- a/pkgtools/pkg_comp/Makefile
+++ b/pkgtools/pkg_comp/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.5 2002/12/24 16:28:33 jmmv Exp $
+# $NetBSD: Makefile,v 1.6 2003/01/08 17:57:42 jmmv Exp $
-DISTNAME= pkg_comp-1.4
+DISTNAME= pkg_comp-1.5
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkg_comp/files/pkg_comp.sh b/pkgtools/pkg_comp/files/pkg_comp.sh
index 24b1e471db1..d8215e3d621 100644
--- a/pkgtools/pkg_comp/files/pkg_comp.sh
+++ b/pkgtools/pkg_comp/files/pkg_comp.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: pkg_comp.sh,v 1.4 2002/12/24 16:28:34 jmmv Exp $
+# $NetBSD: pkg_comp.sh,v 1.5 2003/01/08 17:57:42 jmmv Exp $
#
# pkg_comp - Build packages inside a clean chroot environment
# Copyright (c) 2002, Julio Merino <jmmv@netbsd.org>
@@ -249,11 +249,19 @@ pkg_makeroot()
if [ -d $DESTDIR ]; then
err "DESTDIR $DESTDIR already exists"
fi
+
+ allsets="$SETS $SETS_X11"
+
+ for s in $allsets; do
+ if [ ! -f $DISTRIBDIR/binary/sets/$s ]; then
+ err "$DISTRIBDIR/binary/sets/$s does not exist"
+ fi
+ done
+
mkdir -p $DESTDIR
cd $DESTDIR
printf "Unpacking sets:"
- allsets="$SETS $SETS_X11"
for s in $allsets; do
printf " $s"
tar xzpf $DISTRIBDIR/binary/sets/$s
@@ -328,10 +336,13 @@ makeroot_mkconf()
echo "LOCALBASE=$LOCALBASE" >> $file
echo "PKG_SYSCONFBASE=$PKG_SYSCONFBASE" >> $file
- if [ ! -f "$EXTRAMK" ]; then
- err "Cannot find $EXTRAMK"
+ if [ -n "$EXTRAMK" ]; then
+ if [ ! -f "$EXTRAMK" ]; then
+ err "Cannot find $EXTRAMK"
+ else
+ cat $EXTRAMK >> $file
+ fi
fi
- cat $EXTRAMK >> $file
}
makeroot_xpkgwedge()