pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/install Modify the DIRS line format to match the FI...
details: https://anonhg.NetBSD.org/pkgsrc/rev/6d8cd08ff8e5
branches: trunk
changeset: 511906:6d8cd08ff8e5
user: jlam <jlam%pkgsrc.org@localhost>
date: Tue Apr 25 22:32:44 2006 +0000
description:
Modify the DIRS line format to match the FILES one, where the mode
precedes the user and group.
diffstat:
mk/install/bsd.pkginstall.mk | 8 ++--
mk/install/dirs | 63 ++++++++++++++++++++++++++-----------------
2 files changed, 42 insertions(+), 29 deletions(-)
diffs (176 lines):
diff -r eda645ba96cf -r 6d8cd08ff8e5 mk/install/bsd.pkginstall.mk
--- a/mk/install/bsd.pkginstall.mk Tue Apr 25 22:03:32 2006 +0000
+++ b/mk/install/bsd.pkginstall.mk Tue Apr 25 22:32:44 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkginstall.mk,v 1.48 2006/04/25 19:54:39 jlam Exp $
+# $NetBSD: bsd.pkginstall.mk,v 1.49 2006/04/25 22:32:44 jlam Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and implements the
# common INSTALL/DEINSTALL scripts framework. To use the pkginstall
@@ -532,7 +532,7 @@
dir="$$1"; owner="$$2"; group="$$3"; mode="$$4"; \
shift; shift; shift; shift; \
dir=`strip_prefix "$$dir"`; \
- ${ECHO} "# DIR: $$dir m $$owner $$group $$mode"; \
+ ${ECHO} "# DIR: $$dir m $$mode $$owner $$group"; \
done
${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \
set -- dummy ${REQD_DIRS_PERMS}; shift; \
@@ -541,7 +541,7 @@
dir="$$1"; owner="$$2"; group="$$3"; mode="$$4"; \
shift; shift; shift; shift; \
dir=`strip_prefix "$$dir"`; \
- ${ECHO} "# DIR: $$dir fm $$owner $$group $$mode"; \
+ ${ECHO} "# DIR: $$dir fm $$mode $$owner $$group"; \
done
${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \
set -- dummy ${OWN_DIRS_PERMS}; shift; \
@@ -550,7 +550,7 @@
dir="$$1"; owner="$$2"; group="$$3"; mode="$$4"; \
shift; shift; shift; shift; \
dir=`strip_prefix "$$dir"`; \
- ${ECHO} "# DIR: $$dir mo $$owner $$group $$mode"; \
+ ${ECHO} "# DIR: $$dir mo $$mode $$owner $$group"; \
done
${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET}
diff -r eda645ba96cf -r 6d8cd08ff8e5 mk/install/dirs
--- a/mk/install/dirs Tue Apr 25 22:03:32 2006 +0000
+++ b/mk/install/dirs Tue Apr 25 22:32:44 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: dirs,v 1.12 2006/04/25 20:12:35 jlam Exp $
+# $NetBSD: dirs,v 1.13 2006/04/25 22:32:44 jlam Exp $
#
# Generate a +DIRS script that reference counts directories that are
# required for the proper functioning of the package.
@@ -34,7 +34,7 @@
# correctly, e.g.
#
# # DIR: /etc/foo m
-# # DIR: /var/log/foo/tmp mo foo-user foo-group 0700
+# # DIR: /var/log/foo/tmp mo 0700 foo-user foo-group
# # DIR: share/foo-plugins fm
#
# For each DIR entry, if the directory path is relative, then it is taken
@@ -96,7 +96,7 @@
case $ACTION in
ADD)
${SED} -n "/^\# DIR: /{s/^\# DIR: //;p;}" ${SELF} | ${SORT} -u |
- while read dir d_flags d_user d_group d_mode; do
+ while read dir d_flags d_mode d_user d_group; do
case $dir in
"") continue ;;
[!/]*) dir="${PKG_PREFIX}/$dir" ;;
@@ -120,20 +120,24 @@
else
${ECHO} "${PKG_METADATA_DIR}" >> $token
fi
- case $d_user:$d_group:$d_mode in
- [!:]*:[!:]*:[!:]*)
- ${ECHO} "$d_user $d_group $d_mode" > $perms
- ;;
+ case $d_mode$d_user$d_group in
+ "") ;;
+ *) ${ECHO} "$d_user $d_group $d_mode" > $perms ;;
esac
case $d_flags:$_PKG_CONFIG in
*f*:*|*:yes)
${MKDIR} $dir
- case $d_user:$d_group:$d_mode in
- [!:]*:[!:]*:[!:]*)
- ${CHOWN} $d_user $dir
- ${CHGRP} $d_group $dir
- ${CHMOD} $d_mode $dir
- ;;
+ case $d_user in
+ "") ;;
+ *) ${CHOWN} $d_user $dir ;;
+ esac
+ case $d_group in
+ "") ;;
+ *) ${CHGRP} $d_group $dir ;;
+ esac
+ case $d_mode in
+ "") ;;
+ *) ${CHMOD} $d_mode $dir ;;
esac
;;
esac
@@ -142,7 +146,7 @@
REMOVE)
${SED} -n "/^\# DIR: /{s/^\# DIR: //;p;}" ${SELF} | ${SORT} -ru |
- while read dir d_flags d_user d_group d_mode; do
+ while read dir d_flags d_mode d_user d_group; do
case $dir in
"") continue ;;
[!/]*) dir="${PKG_PREFIX}/$dir" ;;
@@ -180,24 +184,33 @@
PERMS)
${SED} -n "/^\# DIR: /{s/^\# DIR: //;p;}" ${SELF} | ${SORT} -u |
- while read dir d_flags d_user d_group d_mode; do
+ while read dir d_flags d_mode d_user d_group; do
+ case $_PKG_CONFIG:$_PKG_CONFIG_PERMS in
+ yes:yes) ;;
+ *) continue ;;
+ esac
case $dir in
"") continue ;;
[!/]*) dir="${PKG_PREFIX}/$dir" ;;
esac
- case $d_user:$d_group:$d_mode:$_PKG_CONFIG:$_PKG_CONFIG_PERMS in
- [!:]*:[!:]*:[!:]*:yes:yes)
- ${CHOWN} $d_user $dir
- ${CHGRP} $d_group $dir
- ${CHMOD} $d_mode $dir
- ;;
+ case $d_user in
+ "") ;;
+ *) ${CHOWN} $d_user $dir ;;
+ esac
+ case $d_group in
+ "") ;;
+ *) ${CHGRP} $d_group $dir ;;
+ esac
+ case $d_mode in
+ "") ;;
+ *) ${CHMOD} $d_mode $dir ;;
esac
done
;;
CHECK-ADD)
${SED} -n "/^\# DIR: /{s/^\# DIR: //;p;}" ${SELF} | ${SORT} -u |
- { while read dir d_flags d_user d_group d_mode; do
+ { while read dir d_flags d_mode d_user d_group; do
case $dir in
"") continue ;;
[!/]*) dir="${PKG_PREFIX}/$dir" ;;
@@ -217,7 +230,7 @@
esac
case $d_user:$d_group:$d_mode in
[!:]*:[!:]*:[!:]*)
- ${ECHO} " $dir (o=$d_user, g=$d_group, m=$d_mode)"
+ ${ECHO} " $dir (m=$d_mode, o=$d_user, g=$d_group)"
;;
*)
${ECHO} " $dir"
@@ -235,7 +248,7 @@
CHECK-REMOVE)
${SED} -n "/^\# DIR: /{s/^\# DIR: //;p;}" ${SELF} | ${SORT} -ru |
- { while read dir d_flags d_user d_group d_mode; do
+ { while read dir d_flags d_mode d_user d_group; do
case $dir in
"") continue ;;
[!/]*) dir="${PKG_PREFIX}/$dir" ;;
@@ -272,7 +285,7 @@
${MKDIR} -p $tmpdir 2>/dev/null || exit 1
${CHMOD} 700 $tmpdir
${SED} -n "/^\# DIR: /{s/^\# DIR: //;p;}" ${SELF} | ${SORT} -ru |
- { while read dir d_flags d_user d_group d_mode; do
+ { while read dir d_flags d_mode d_user d_group; do
case $dir in
"") continue ;;
[!/]*) dir="${PKG_PREFIX}/$dir" ;;
Home |
Main Index |
Thread Index |
Old Index