Update to 2.6:

- Fix the default configuration file to populate CVSTAG correctly when
  using a CVS/Tag file.
- Ensure that errors from CVS stop execution.

Problem reported by Nathan Arthur in private mail.  Change OKed by pmc.
This commit is contained in:
jmmv 2013-06-18 13:24:55 +00:00
parent 16ac40b357
commit d085b94480
3 changed files with 35 additions and 5 deletions

View file

@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.24 2013/03/08 17:47:25 jmmv Exp $
# $NetBSD: Makefile,v 1.25 2013/06/18 13:24:55 jmmv Exp $
DISTNAME= sysbuild-2.5
DISTNAME= sysbuild-2.6
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty
@ -90,6 +90,6 @@ do-install:
.endfor
${INSTALL_SCRIPT} ${WRKSRC}/env.sh ${DESTDIR}${PREFIX}/share/sysbuild
BUILDLINK_API_DEPENDS.shtk+= shtk>=1.1
BUILDLINK_API_DEPENDS.shtk+= shtk>=1.2
.include "../../devel/shtk/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -1,4 +1,4 @@
# $NetBSD: default.conf,v 1.6 2012/07/25 12:18:23 jmmv Exp $
# $NetBSD: default.conf,v 1.7 2013/06/18 13:24:55 jmmv Exp $
# System-wide configuration file for sysbuild(1).
#
@ -33,7 +33,7 @@ else
CVSROOT=":ext:anoncvs@anoncvs.NetBSD.org:/cvsroot"
fi
if [ -f "${SRCDIR}/CVS/Tag" ]; then
CVSTAG="$(cat ${SRCDIR}/CVS/Tag)"
CVSTAG="$(sed -e 's,^T,,' ${SRCDIR}/CVS/Tag)"
else
if ! head -n 1 /etc/release | grep 99 >/dev/null; then
CVSTAG="$(head -n 1 /etc/release | cut -d . -f 1 \

View file

@ -619,6 +619,35 @@ EOF
}
atf_test_case build__cvs_fails
build__cvs_fails_body() {
create_mock_cvsroot "${MOCK_CVSROOT}"
mkdir sysbuild
cd sysbuild
atf_check -o ignore -e ignore cvs -d"${MOCK_CVSROOT}" checkout -P src
cd -
create_mock_binary cvs yes
PATH="$(pwd):${PATH}"
atf_check -s exit:1 -o save:stdout -e save:stderr sysbuild \
-c /dev/null -o CVSROOT="${MOCK_CVSROOT}" -o CVSTAG=invalid build
cat >expout <<EOF
Command: cvs
Directory: ${HOME}/sysbuild/src
Arg: -d${MOCK_CVSROOT}
Arg: -q
Arg: update
Arg: -d
Arg: -P
Arg: -rinvalid
EOF
atf_check -o file:expout cat commands.log
}
atf_test_case config__builtins
config__builtins_body() {
cat >expout <<EOF
@ -1114,6 +1143,7 @@ atf_init_test_cases() {
atf_add_test_case build__hooks__ok
atf_add_test_case build__hooks__pre_fail
atf_add_test_case build__hooks__post_fail
atf_add_test_case build__cvs_fails
atf_add_test_case config__builtins
atf_add_test_case config__path__components