OSDN Git Service

Version 3.0.5+toward_3.0.6_20140530040947
authorMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Thu, 29 May 2014 19:10:11 +0000 (04:10 +0900)
committerMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Thu, 29 May 2014 19:10:11 +0000 (04:10 +0900)
[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

README
bin/portsreinstall
lib/libconf.sh
lib/libpkgsys.sh
man/portsreinstall.8

diff --git a/README b/README
index f0f5d46..30276a8 100644 (file)
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 ================================================================================
  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.
 ================================================================================
 
index d4ed120..94d7a69 100755 (executable)
@@ -15,7 +15,7 @@ APPNAME=`basename "$0"`
 # 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}
index 5c47327..119bf91 100644 (file)
@@ -31,6 +31,7 @@ conf_setup_envs ()
        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`
index 7e022d6..24927cc 100644 (file)
@@ -15,6 +15,22 @@ PKGSYS_CMD_PKG_ADD='pkg add' # Corresponding command for pkg_add
 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 ()
 {
index 8efcfb3..be316bf 100644 (file)
@@ -2,7 +2,7 @@
 .\" 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
@@ -912,9 +912,11 @@ Configuration file of \fBportupgrade\fR(1).
 .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