From ac163ccbcaa11ba6dd8ea7d075dfac362779cd6a Mon Sep 17 00:00:00 2001 From: Mamoru Sakaue / MwGhennndo Date: Sun, 9 Dec 2012 16:25:43 +0900 Subject: [PATCH] Help documents are revised. The detection mechanism of pkgng is modified. Syntax errors are fixed. modified: portsreinstall modified: portsreinstall.8 modified: portsreinstall.8~ modified: portsreinstall~ --- portsreinstall | 27 ++++++++++++++++++++------- portsreinstall.8 | 8 +++++--- portsreinstall.8~ | 8 +++++--- portsreinstall~ | 27 ++++++++++++++++++++------- 4 files changed, 50 insertions(+), 20 deletions(-) diff --git a/portsreinstall b/portsreinstall index fee2dd4..044954d 100755 --- a/portsreinstall +++ b/portsreinstall @@ -10,7 +10,7 @@ # ================================================ APPNAME=`basename "$0"` -MYVERSION=2.0.0+toward_2.0.1_20121208064055 +MYVERSION=2.0.0+toward_2.0.1_20121209162229 PREFIX=${PREFIX:-/usr/local} CONFFILE=${PREFIX}/etc/${APPNAME}.conf @@ -394,13 +394,18 @@ then echo "restart this utility." echo " If the problem will be resolved by deleting a concerned package, do it by" echo "'pkg_delete -f {package}' (conventional package), 'pkg delete -f {package}'" - echo "(new generation package) or execute 'make deinstall' at the corresponding" + echo "(new generation package, pkgng) or execute 'make deinstall' at the corresponding" echo "port directory, then execute '${APPNAME} ok add \$glob' where '\$glob' is the" echo "ports glob of the concerned port, and then restart this utility." echo " If the problem will be resolved by manual reinstallation using pkg_add(1)" - echo "(conventional package), pkg add (pkg-add(8), new generation package) or so on," - echo "do it and execute '${APPNAME} ok add \$glob' where '\$glob' is the ports" - echo "glob of the concerned port, and then restart this utility by 'redo' command." + echo "(conventional package), pkg add (pkg-add(8), pkgng) or so on, do it and glob of" + echo "execute '${APPNAME} ok add \$glob' where '\$glob' is the ports the concerned" + echo "port, and then restart this utility by 'redo' command." + echo + echo " The current package system is automatically detected; the new generation" + echo "package (pkgng) is used if it is installed and 'WITH_PKGNG=yes' is set and" + echo "'WITHOUT_PKGNG=yes' is not set /etc/make.conf, and otherwise the conventional" + echo "package is used." echo echo " If you are familiar to the mechanism of Ports Collections system, in order to" echo "minimize package conflictions, it may be a good idea to delete packages which " @@ -431,8 +436,15 @@ PORTSDIR=${PORTSDIR:-/usr/ports} PORTS_MOVED_DB=${PORTSDIR}/MOVED PORTS_INDEX_DB=${PORTSDIR}/INDEX-`uname -r | cut -d . -f 1` -WITH_PKGNG=`make -f /etc/make.conf -V WITH_PKGNG | tr '[:upper:]' '[:lower:]'` -WITHOUT_PKGNG=`make -f /etc/make.conf -V WITHOUT_PKGNG | tr '[:upper:]' '[:lower:]'` +if which -s pkg +then + WITH_PKGNG=`make -f /etc/make.conf -V WITH_PKGNG | tr '[:upper:]' '[:lower:]'` + WITHOUT_PKGNG=`make -f /etc/make.conf -V WITHOUT_PKGNG | tr '[:upper:]' '[:lower:]'` +else + unset WITH_PKGNG + WITHOUT_PKGNG=yes +fi + if [ "x$WITH_PKGNG" = xyes -a "x$WITHOUT_PKGNG" = xyes ] then echo "ERROR: /etc/make.conf defines contradictory settings for WITH_PKGNG and WITHOUT_PKGNG" >&2 @@ -498,6 +510,7 @@ then env ASSUME_ALWAYS_YES=YES pkg add "$@" } elif [ "x$WITHOUT_PKGNG" = xyes ] +then unset WITH_PKGNG command_pkg_info='pkg_info' command_pkg_create='pkg_create' diff --git a/portsreinstall.8 b/portsreinstall.8 index c7053a2..8ad997a 100644 --- a/portsreinstall.8 +++ b/portsreinstall.8 @@ -237,19 +237,21 @@ If the problem will be resolved by deleting a concerned package, do it by (conventional package), .B pkg delete \-f .I package -(new generation package) or execute +(new generation package, pkgng) or execute .B make deinstall at the corresponding port directory, execute .B portsreinstall ok add .I glob where \fIglob\fR is the ports glob of the concerned port, and then restart this utility. -If the problem will be resolved by manual reinstallation using pkg_add(1) (conventional package), pkg add (pkg\-add(8), new generation package) or so on, do it and execute +If the problem will be resolved by manual reinstallation using pkg_add(1) (conventional package), pkg add (pkg\-add(8), pkgng) or so on, do it and execute .B portsreinstall ok add .I glob where \fIglob\fR is the ports glob of the concerned port, and then restart this utility by .B portsreinstall redo command. .PP +The current package system is automatically detected; the new generation package (pkgng) is used if it is installed and 'WITH_PKGNG=yes' is set and "WITHOUT_PKGNG=yes" is not set /etc/make.conf, and otherwise the conventional package is used. +.PP If you are familiar to the mechanism of Ports Collections system, in order to minimize package conflictions, it may be a good idea to delete packages which you don't think necessary before starting to use this utility. Don't be afraid to delete necessary dependencies because all required ports are automatically installed. .PP @@ -281,7 +283,7 @@ Configuration file of portupgrade(1). .SH HISTORY \fBportsreinstall\fR has been developed as below. .TP -2.0.1 (08 December 2012) +2.0.1 (09 December 2012) [NEW] New generation package (pkgng) is supported. [IMPROVED] A countermeasure for a build failure in a restarted build from a terminated build is implemented. diff --git a/portsreinstall.8~ b/portsreinstall.8~ index 5ede50a..83de41f 100644 --- a/portsreinstall.8~ +++ b/portsreinstall.8~ @@ -237,19 +237,21 @@ If the problem will be resolved by deleting a concerned package, do it by (conventional package), .B pkg delete \-f .I package -(new generation package) or execute +(new generation package, pkgng) or execute .B make deinstall at the corresponding port directory, execute .B portsreinstall ok add .I glob where \fIglob\fR is the ports glob of the concerned port, and then restart this utility. -If the problem will be resolved by manual reinstallation using pkg_add(1) (conventional package), pkg add (pkg\-add(8), new generation package) or so on, do it and execute +If the problem will be resolved by manual reinstallation using pkg_add(1) (conventional package), pkg add (pkg\-add(8), pkgng) or so on, do it and execute .B portsreinstall ok add .I glob where \fIglob\fR is the ports glob of the concerned port, and then restart this utility by .B portsreinstall redo command. .PP +The current package system is automatically detected; the new generation package (pkgng) is used if it is installed and 'WITH_PKGNG=yes' is set and "WITHOUT_PKGNG=yes" is not set /etc/make.conf, and otherwise the conventional package is used. +.PP If you are familiar to the mechanism of Ports Collections system, in order to minimize package conflictions, it may be a good idea to delete packages which you don't think necessary before starting to use this utility. Don't be afraid to delete necessary dependencies because all required ports are automatically installed. .PP @@ -281,7 +283,7 @@ Configuration file of portupgrade(1). .SH HISTORY \fBportsreinstall\fR has been developed as below. .TP -2.0.1 (18 November 2012) +2.0.1 (08 December 2012) [NEW] New generation package (pkgng) is supported. [IMPROVED] A countermeasure for a build failure in a restarted build from a terminated build is implemented. diff --git a/portsreinstall~ b/portsreinstall~ index 08cd412..de8fd4f 100755 --- a/portsreinstall~ +++ b/portsreinstall~ @@ -10,7 +10,7 @@ # ================================================ APPNAME=`basename "$0"` -MYVERSION=2.0.0+toward_2.0.1_20121118160208 +MYVERSION=2.0.0+toward_2.0.1_20121208064055 PREFIX=${PREFIX:-/usr/local} CONFFILE=${PREFIX}/etc/${APPNAME}.conf @@ -394,13 +394,18 @@ then echo "restart this utility." echo " If the problem will be resolved by deleting a concerned package, do it by" echo "'pkg_delete -f {package}' (conventional package), 'pkg delete -f {package}'" - echo "(new generation package) or execute 'make deinstall' at the corresponding" + echo "(new generation package, pkgng) or execute 'make deinstall' at the corresponding" echo "port directory, then execute '${APPNAME} ok add \$glob' where '\$glob' is the" echo "ports glob of the concerned port, and then restart this utility." echo " If the problem will be resolved by manual reinstallation using pkg_add(1)" - echo "(conventional package), pkg add (pkg-add(8), new generation package) or so on," - echo "do it and execute '${APPNAME} ok add \$glob' where '\$glob' is the ports" - echo "glob of the concerned port, and then restart this utility by 'redo' command." + echo "(conventional package), pkg add (pkg-add(8), pkgng) or so on, do it and glob of" + echo "execute '${APPNAME} ok add \$glob' where '\$glob' is the ports the concerned" + echo "port, and then restart this utility by 'redo' command." + echo + echo " The current package system is automatically detected; the new generation" + echo "package (pkgng) is used if it is installed and 'WITH_PKGNG=yes' is set and" + echo "'WITHOUT_PKGNG=yes' is not set /etc/make.conf, and otherwise the conventional" + echo "package is used." echo echo " If you are familiar to the mechanism of Ports Collections system, in order to" echo "minimize package conflictions, it may be a good idea to delete packages which " @@ -431,8 +436,15 @@ PORTSDIR=${PORTSDIR:-/usr/ports} PORTS_MOVED_DB=${PORTSDIR}/MOVED PORTS_INDEX_DB=${PORTSDIR}/INDEX-`uname -r | cut -d . -f 1` -WITH_PKGNG=`make -f /etc/make.conf -V WITH_PKGNG | tr '[:upper:]' '[:lower:]'` -WITHOUT_PKGNG=`make -f /etc/make.conf -V WITHOUT_PKGNG | tr '[:upper:]' '[:lower:]'` +if which -s pkg +then + WITH_PKGNG=`make -f /etc/make.conf -V WITH_PKGNG | tr '[:upper:]' '[:lower:]'` + WITHOUT_PKGNG=`make -f /etc/make.conf -V WITHOUT_PKGNG | tr '[:upper:]' '[:lower:]'` +else + unset WITH_PKGNG + WITHOUT_PKGNG=yes +fi + if [ "x$WITH_PKGNG" = xyes -a "x$WITHOUT_PKGNG" = xyes ] then echo "ERROR: /etc/make.conf defines contradictory settings for WITH_PKGNG and WITHOUT_PKGNG" >&2 @@ -498,6 +510,7 @@ then env ASSUME_ALWAYS_YES=YES pkg add "$@" } elif [ "x$WITHOUT_PKGNG" = xyes ] +then unset WITH_PKGNG command_pkg_info='pkg_info' command_pkg_create='pkg_create' -- 2.11.0