diff options
author | jlam <jlam@pkgsrc.org> | 2007-07-12 19:41:46 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2007-07-12 19:41:46 +0000 |
commit | 83f1c3afae00e60c6926f11c9910249aae0b6858 (patch) | |
tree | 65d9ea88d837da23ad3b2a98c4094192d75dc2c4 /mk/pkginstall/perms | |
parent | 8d79843561050fcb36e472ddb7fb6e125929fe41 (diff) | |
download | pkgsrc-83f1c3afae00e60c6926f11c9910249aae0b6858.tar.gz |
* Add a user-settable variable to tune the default verbosity of the
+INSTALL and +DEINSTALL scripts:
PKGINSTALL_VERBOSE
A list of scriptlets that will be verbose and output a message
noting the actions taken.
* "all" is a special value that implies all of the other items
* "fonts" for +FONTS
* "info-files" for +INFO_FILES
Default value: "all" for PKG_DEVELOPERs, empty otherwise.
* Be "one-liner brief" when doing the default actions. For example,
the info files output now looks like:
gmake-3.81: registering info file /usr/pkg/info/make.info
We retain the current verbosity for the CHECK-* actions.
Diffstat (limited to 'mk/pkginstall/perms')
-rw-r--r-- | mk/pkginstall/perms | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/mk/pkginstall/perms b/mk/pkginstall/perms index c6c895b8a6b..af84b202969 100644 --- a/mk/pkginstall/perms +++ b/mk/pkginstall/perms @@ -1,4 +1,4 @@ -# $NetBSD: perms,v 1.2 2006/07/19 22:26:26 jlam Exp $ +# $NetBSD: perms,v 1.3 2007/07/12 19:41:46 jlam Exp $ # # Generate a +PERMS script that sets the special permissions on files # and directories used by the package. @@ -42,35 +42,28 @@ PKG_METADATA_DIR="${1-${CURDIR}}" : ${PKG_PREFIX=@PREFIX@} ${SED} -n "/^\# PERMS: /{s/^\# PERMS: //;p;}" ${SELF} | ${SORT} -u | -{ while read file f_mode f_user f_group; do +while read file f_mode f_user f_group; do case $file in "") continue ;; [!/]*) file="${PKG_PREFIX}/$file" ;; esac ${TEST} -f "$file" || continue - case "$printed_header" in - yes) ;; - *) printed_header=yes - ${ECHO} "===========================================================================" - ${ECHO} "The following files and directories needed by ${PKGNAME}" - ${ECHO} "have special permissions:" - ${ECHO} "" - ;; - esac + filemsg= case $f_mode/$f_user/$f_group in //) - ${ECHO} " $file" + filemsg="$file" ;; [!/]*//) - ${ECHO} " $file (m=$f_mode)" + filemsg="$file (m=$f_mode)" ;; [!/]*/[!/]*/) - ${ECHO} " $file (o=$f_user, m=$f_mode)" + filemsg="$file (o=$f_user, m=$f_mode)" ;; [!/]*/[!/]*/[!/]*) - ${ECHO} " $file (o=$f_user, g=$f_group, m=$f_mode)" + filemsg="$file (o=$f_user, g=$f_group, m=$f_mode)" ;; esac + ${ECHO} "${PKGNAME}: setting permissions on $filemsg" case $f_user in "") ;; *) ${CHOWN} $f_user $file ;; @@ -84,11 +77,6 @@ ${SED} -n "/^\# PERMS: /{s/^\# PERMS: //;p;}" ${SELF} | ${SORT} -u | *) ${CHMOD} $f_mode $file ;; esac done -case "$printed_header" in -yes) ${ECHO} "" - ${ECHO} "===========================================================================" - ;; -esac; } EOF ${SED} -n "/^\# PERMS: /p" ${SELF} >> ./+PERMS |