Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/sets Patches from Lloyd Parkes in PR 41684, plus my ...
details: https://anonhg.NetBSD.org/src/rev/15f461666584
branches: trunk
changeset: 749569:15f461666584
user: apb <apb%NetBSD.org@localhost>
date: Wed Dec 02 15:52:14 2009 +0000
description:
Patches from Lloyd Parkes in PR 41684, plus my changes:
* ${HOSTNAME} is special to bash, so rename the variable to HOSTNAME_CMD.
* Don't use "cd -".
* Don't use only comments in the else part of an if statement.
diffstat:
distrib/sets/makeplist | 4 +++-
distrib/sets/regpkg | 7 ++++---
distrib/sets/sets.subr | 6 +++---
3 files changed, 10 insertions(+), 7 deletions(-)
diffs (82 lines):
diff -r 28df5d706c9c -r 15f461666584 distrib/sets/makeplist
--- a/distrib/sets/makeplist Wed Dec 02 15:51:12 2009 +0000
+++ b/distrib/sets/makeplist Wed Dec 02 15:52:14 2009 +0000
@@ -94,7 +94,9 @@
# to consult the metalog instead of the file system.
#
+(
cd "${prefix}"
+
#
# Match the directories. Use find(1) to avoid repeat calls to
# 'test -d'.
@@ -123,7 +125,7 @@
${FIND} ${args} ${SELECTNONDIRS}
done > "${ffilename}"
-cd -
+)
echo "@cwd ${realprefix}"
if [ -s "${ffilename}" ]; then
diff -r 28df5d706c9c -r 15f461666584 distrib/sets/regpkg
--- a/distrib/sets/regpkg Wed Dec 02 15:51:12 2009 +0000
+++ b/distrib/sets/regpkg Wed Dec 02 15:52:14 2009 +0000
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# $NetBSD: regpkg,v 1.18 2009/12/01 15:49:21 apb Exp $
+# $NetBSD: regpkg,v 1.19 2009/12/02 15:52:14 apb Exp $
#
# Copyright (c) 2003,2009 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -628,11 +628,11 @@
# "@name" line and a lot of "@comment MD5:" lines.
#
{
- rcsid='$NetBSD: regpkg,v 1.18 2009/12/01 15:49:21 apb Exp $'
+ rcsid='$NetBSD: regpkg,v 1.19 2009/12/02 15:52:14 apb Exp $'
utcdate="$(${ENV_CMD} TZ=UTC LOCALE=C \
${DATE} '+%Y-%m-%d %H:%M')"
user="${USER:-root}"
- host="$(${HOSTNAME})"
+ host="$(${HOSTNAME_CMD})"
echo "@name ${pkg}-${t}"
echo "@comment Packaged at ${utcdate} UTC by ${user}@${host}"
echo "@comment Packaged using ${prog} ${rcsid}"
@@ -981,6 +981,7 @@
# No files in the pkg? (This could happen
# if a pkg contains only directories.)
# Do nothing (keep the already-registered pkg).
+ :
fi
else
bomb
diff -r 28df5d706c9c -r 15f461666584 distrib/sets/sets.subr
--- a/distrib/sets/sets.subr Wed Dec 02 15:51:12 2009 +0000
+++ b/distrib/sets/sets.subr Wed Dec 02 15:52:14 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: sets.subr,v 1.98 2009/12/02 15:18:06 uebayasi Exp $
+# $NetBSD: sets.subr,v 1.99 2009/12/02 15:52:14 apb Exp $
#
#
@@ -48,7 +48,7 @@
: ${FIND:=find}
: ${GREP:=grep}
: ${GZIP_CMD:=gzip} # ${GZIP} is special to gzip(1)
-: ${HOSTNAME:=hostname}
+: ${HOSTNAME_CMD:=hostname} # ${HOSTNAME} is special to bash(1)
: ${HOST_SH:=sh}
: ${IDENT:=ident}
: ${JOIN:=join}
@@ -207,7 +207,7 @@
# In each file, a record consists of a path and a System Package name,
# separated by whitespace. E.g.,
#
-# # $NetBSD: sets.subr,v 1.98 2009/12/02 15:18:06 uebayasi Exp $
+# # $NetBSD: sets.subr,v 1.99 2009/12/02 15:52:14 apb Exp $
# . base-sys-root [keyword[,...]]
# ./altroot base-sys-root
# ./bin base-sys-root
Home |
Main Index |
Thread Index |
Old Index