[BUG FIX] Silently failed to launch when the ports tree is missing or broken.
modified: README
modified: bin/portsreinstall
modified: lib/libconf.sh
modified: lib/libpkgsys.sh
modified: man/portsreinstall.8
================================================================================
portsreinstall - ports upgrading utility for massive forced reinstallation
- Version 3.0.6, May 27, 2014
+ Version 3.0.6, May 30, 2014
Copyright (C) 2010-2014 Mamoru Sakaue, MwGhennndo, All Rights Reserved.
================================================================================
# MYVERSION=3.0.6
# COMPATIBLE_VERSIONS='^(3\.0\.[0-9]+)$'
# Template for development versions
-MYVERSION=3.0.5+toward_3.0.6_20140527113705
+MYVERSION=3.0.5+toward_3.0.6_20140530040947
COMPATIBLE_VERSIONS='^(3\.0\.[0-9]+\+toward_3\.0\.[0-9]+_[0-9]+|3\.0\.[0-9]+)$'
MYPREFIX=`dirname "\`dirname \"$0\"\`" | sed 's|/bin$||'`
MYPREFIX=${MYPREFIX:-/usr/local}
mkdir "$tmp_work"
PORTSDIR=${PORTSDIR:-`[ -e /etc/make.conf ] && make -C "$tmp_work" -f /etc/make.conf -V PORTSDIR 2> /dev/null`} || :
PORTSDIR=${PORTSDIR:-/usr/ports}
+ pkgsys_chk_sys
for var in LOCALBASE PORT_DBDIR LINUXBASE DISTDIR PACKAGES PKGREPOSITORYSUBDIR PKGREPOSITORY
do
val=`pkgsys_sysvar $var`
PKGSYS_AVR_REFETCH_TIMES_PER_SITE=1 # Average number (integer) of retrials for retrieving package or distfiles per mirror site
PKGSYS_AVR_REFETCH_TIMES_FOR_CHKSUMERR=2 # Number (integer) of retrials for check sum error in retrieving a package
+# ============= Check implementation of the ports tree =============
+pkgsys_chk_sys ()
+{
+ local var tmp_work
+ if [ ! -d "${PORTSDIR}" ]
+ then
+ message_echo "ERROR: Ports directory ${PORTSDIR} is not found." >&2
+ exit 1
+ fi
+ if [ ! -e "${PORTSDIR}/Makefile" -o ! -e "${PORTSDIR}/Mk/bsd.port.mk" ]
+ then
+ message_echo "ERROR: Ports tree ${PORTSDIR} is missing, broken or incompatible." >&2
+ exit 1
+ fi
+}
+
# ============= System defined value for the ports/packages =============
pkgsys_sysvar ()
{
.\" ports reinstall installation guide
.\" Copyright (C) 2010-2014 Mamoru Sakaue, MwGhennndo, All Rights Reserved.
.\" ==================================================================================
-.TH PORTSREINSTALL 8 "27 May 2014" "FreeBSD" "FreeBSD System Manager's Manual"
+.TH PORTSREINSTALL 8 "30 May 2014" "FreeBSD" "FreeBSD System Manager's Manual"
.SH NAME
portsreinstall \- ports upgrading utility for massive forced reinstallation
.SH SYNOPSIS
.SH HISTORY
\fBportsreinstall\fR has been developed as below.
.TP
-3.0.6 (27 May 2014)
+3.0.6 (30 May 2014)
.RS
-[BUG FIX] Command \fBprepare\fR may have resulted in aborting at ports any of whose requirements or dependents is obsolete.
+[BUG FIX] Command \fBprepare\fR was possibly aborted at a port any of whose requirements or dependents is obsolete.
+.PP
+[BUG FIX] Silently failed to launch when the ports tree is missing or broken.
.TP
3.0.5 (14 December 2013)
.RS