summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authordmcmahill <dmcmahill>2005-05-19 11:46:40 +0000
committerdmcmahill <dmcmahill>2005-05-19 11:46:40 +0000
commitcac075e83aed7184f08eda6153e93b6244b7483d (patch)
tree7cfdc4c5716941e1e83b7ae7129e4cfaede54da6 /mk
parent0b4bff8332a28b09206cdffbceec7c6bcb1b9db3 (diff)
downloadpkgsrc-cac075e83aed7184f08eda6153e93b6244b7483d.tar.gz
allow spaces after the "=" in the .pkgcache files. This was noted with
some of the older packages on ftp.netbsd.org. For example, pkg_info -B ftp://ftp.netbsd.org/pub/NetBSD/packages/1.5.2/vax/All/cascade-1.4.tgz will give OPSYS= NetBSD instead of OPSYS=NetBSD
Diffstat (limited to 'mk')
-rwxr-xr-xmk/scripts/genreadme.awk14
1 files changed, 7 insertions, 7 deletions
diff --git a/mk/scripts/genreadme.awk b/mk/scripts/genreadme.awk
index 378bc0d376b..fa2c3e0c793 100755
--- a/mk/scripts/genreadme.awk
+++ b/mk/scripts/genreadme.awk
@@ -1,5 +1,5 @@
#!/usr/bin/awk -f
-# $NetBSD: genreadme.awk,v 1.14 2005/05/19 03:50:39 dmcmahill Exp $
+# $NetBSD: genreadme.awk,v 1.15 2005/05/19 11:46:40 dmcmahill Exp $
#
# Copyright (c) 2002, 2003, 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -816,14 +816,14 @@ function load_cache_file( file ) {
osver = "unknown";
march = "unknown";
} else if( $0 ~/^OPSYS=/ ) {
- opsys = $1;
- gsub(/OPSYS=/, "", opsys);
+ opsys = $0;
+ gsub(/OPSYS=[ \t]*/, "", opsys);
} else if( $0 ~/^OS_VERSION=/ ) {
- osver = $1;
- gsub(/OS_VERSION=/, "", osver);
+ osver = $0;
+ gsub(/OS_VERSION=[ \t]*/, "", osver);
} else if( $0 ~/^MACHINE_ARCH=/ ) {
- march = $1;
- gsub(/MACHINE_ARCH=/, "", march);
+ march = $0;
+ gsub(/MACHINE_ARCH=[ \t]*/, "", march);
} else if( $0 ~/^pkgcache_end /) {
if( debug ) printf("\t%s, OPSYS=%s, OS_VERSION=%s, MACHINE_ARCH=%s\n",
pkgfile, opsys, osver, march);