Subject: pkg/22947: cleanups for the messages printed by the script generated by pkg.install.mk
To: None <gnats-bugs@gnats.netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 09/25/2003 14:24:01
>Number: 22947
>Category: pkg
>Synopsis: cleanups for the messages printed by the script generated by pkg.install.mk
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Sep 25 18:25:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Greg A. Woods
>Release: 2003/09/16
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
System: NetBSD
>Description:
The current output from the script used by pkg.install.mk is
very confusing and sometimes misleading.
>How-To-Repeat:
desire cleaner and more meaningful output from the install script
>Fix:
Index: mk/install/install
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/mk/install/install,v
retrieving revision 1.25
diff -c -r1.25 install
*** mk/install/install 17 Sep 2003 02:38:30 -0000 1.25
--- mk/install/install 18 Sep 2003 23:38:32 -0000
***************
*** 1,3 ****
--- 1,4 ----
+ # -*- sh -*-
# start of install
#
# $NetBSD: install,v 1.25 2003/09/17 02:38:30 jlam Exp $
***************
*** 67,72 ****
--- 68,74 ----
for userset; do
save_IFS="${IFS}"; IFS=":"
set -- ${userset}
+ # user:group[:[userid][:[descr][:[home][:shell]]]]
user="$1"; group="$2"; userid="$3"
descr="${4:-${PKGBASE} ${user} user}"
home="${5:-@PKG_USER_HOME@}"
***************
*** 239,245 ****
msgadd "The following files should be created for ${PKGNAME}:"
msgadd ""
fi
! msgadd "#${file} (m=@CONF_FILES_MODE@)"
elif [ -e "${file}" ]; then
if [ ! "${file}" -ef "${samplefile}" ]; then
${ECHO} " ${file} already exists, example file is"
--- 241,251 ----
msgadd "The following files should be created for ${PKGNAME}:"
msgadd ""
fi
! if [ -e "${samplefile}" ]; then
! msgadd "#${file} (m=@CONF_FILES_MODE@) (see ${samplefile})"
! else
! msgadd "#${file} (m=@CONF_FILES_MODE@) (no example available)"
! fi
elif [ -e "${file}" ]; then
if [ ! "${file}" -ef "${samplefile}" ]; then
${ECHO} " ${file} already exists, example file is"
***************
*** 265,271 ****
msgadd "The following files should be created for ${PKGNAME}:"
msgadd ""
fi
! msgadd "#${file} (m=@SUPPORT_FILES_MODE@)"
elif [ -e "${file}" ]; then
if [ ! "${file}" -ef "${samplefile}" ]; then
${ECHO} " ${file} already exists, example file is"
--- 271,281 ----
msgadd "The following files should be created for ${PKGNAME}:"
msgadd ""
fi
! if [ -e "${samplefile}" ]; then
! msgadd "#${file} (m=@SUPPORT_FILES_MODE@) (see ${samplefile})"
! else
! msgadd "#${file} (m=@SUPPORT_FILES_MODE@) (no example available)"
! fi
elif [ -e "${file}" ]; then
if [ ! "${file}" -ef "${samplefile}" ]; then
${ECHO} " ${file} already exists, example file is"
***************
*** 289,302 ****
if [ ${_print_file_header} -gt 0 ]; then
_print_file_header=0
msgadd ""
! msgadd "The following files should be created for ${PKGNAME}:"
msgadd ""
fi
! msgadd "#${file} (o=${owner}, g=${group}, m=${mode})"
elif [ -e ${file} ]; then
if [ ! "${file}" -ef "${samplefile}" ]; then
! ${ECHO} " ${file} already exists, example file is"
! ${ECHO} " ${samplefile}"
fi
else
if [ -e "${samplefile}" ]; then
--- 299,316 ----
if [ ${_print_file_header} -gt 0 ]; then
_print_file_header=0
msgadd ""
! msgadd "The following configuration files should be created for ${PKGNAME}:"
msgadd ""
fi
! if [ -e "${samplefile}" ]; then
! msgadd "#${file} (owner=${owner}, group=${group}, mode=${mode}) (see ${samplefile})"
! else
! msgadd "#${file} (owner=${owner}, group=${group}, mode=${mode}) (no example available)"
! fi
elif [ -e ${file} ]; then
if [ ! "${file}" -ef "${samplefile}" ]; then
! ${ECHO} " ${file} already exists"
! ${ECHO} " The original example configuration file is: ${samplefile}"
fi
else
if [ -e "${samplefile}" ]; then
***************
*** 318,331 ****
if [ ${_print_file_header} -gt 0 ]; then
_print_file_header=0
msgadd ""
! msgadd "The following files should be created for ${PKGNAME}:"
msgadd ""
fi
! msgadd "#${file} (m=@RCD_SCRIPTS_MODE@)"
elif [ -e "${file}" ]; then
if [ ! "${file}" -ef "${samplefile}" ]; then
! ${ECHO} " ${file} already exists, example file is"
! ${ECHO} " ${samplefile}"
fi
else
if [ -e "${samplefile}" ]; then
--- 332,349 ----
if [ ${_print_file_header} -gt 0 ]; then
_print_file_header=0
msgadd ""
! msgadd "The following rc.d scripts should be created for ${PKGNAME}:"
msgadd ""
fi
! if [ -e "${samplefile}" ]; then
! msgadd "#${file} (mode=@RCD_SCRIPTS_MODE@) (see ${samplefile})"
! else
! msgadd "#${file} (mode=@RCD_SCRIPTS_MODE@) (no example script available)"
! fi
elif [ -e "${file}" ]; then
if [ ! "${file}" -ef "${samplefile}" ]; then
! ${ECHO} " ${file} already exists."
! ${ECHO} " The example rc.d script is: ${samplefile}"
fi
else
if [ -e "${samplefile}" ]; then
***************
*** 347,353 ****
msgadd "The following files and directories have special permissions:"
msgadd ""
fi
! msgadd "#${file} (o=${owner}, g=${group}, m=${mode})"
${CHOWN} "${owner}" "${file}"
${CHGRP} "${group}" "${file}"
${CHMOD} ${mode} "${file}"
--- 365,375 ----
msgadd "The following files and directories have special permissions:"
msgadd ""
fi
! if [ -e "${samplefile}" ]; then
! msgadd "#${file} (o=${owner}, g=${group}, m=${mode}) (see ${samplefile})"
! else
! msgadd "#${file} (o=${owner}, g=${group}, m=${mode}) (no example available)"
! fi
${CHOWN} "${owner}" "${file}"
${CHGRP} "${group}" "${file}"
${CHMOD} ${mode} "${file}"
>Release-Note:
>Audit-Trail:
>Unformatted: