--- /home/tupone/gentoo-x86/app-admin/zprod-manager/files/0.3.1/zprod-manager 2006-11-06 06:28:09.000000000 +0100 +++ ./zprod-manager 2008-05-05 08:18:18.000000000 +0200 @@ -12,6 +12,7 @@ ZINST_DEFAULT=".default" ZPROD_FLIST_FNAME=".zfolder.lst" +ZPROD_LLIST_FNAME=".zlfolder.lst" ZPROD_PLIST_FNAME=".zproduct.lst" # Assume the standard dialog return codes @@ -220,9 +221,20 @@ fi done - for N in $(cat "${1}/${ZPROD_FLIST_FNAME}") ; do + if [ -e ${1}/Products ] ; then + for N in $(cat "${1}/${ZPROD_FLIST_FNAME}") ; do + # we do copy instead of link, because its much safer, and zope-development-way compliant + cp -Ra ${1}/Products/${N} ${2}/Products + done + else + for N in $(cat "${1}/${ZPROD_FLIST_FNAME}") ; do + # we do copy instead of link, because its much safer, and zope-development-way compliant + cp -Ra ${1}/${N} ${2}/Products + done + fi + for N in $(cat "${1}/${ZPROD_LLIST_FNAME}") ; do # we do copy instead of link, because its much safer, and zope-development-way compliant - cp -Ra ${1}/${N} ${2}/Products + cp -Ra ${1}/lib/python/${N} ${2}/lib/python done RESULT=$? if [ ${RESULT} -eq 0 ] ; then @@ -242,6 +254,16 @@ # takes all perms from others to comply with 770 instance policy chmod -R g+rwX,o-rwx ${2}/Products/${N} done + for N in $(cat "${1}/${ZPROD_LLIST_FNAME}") ; do + # setting owner and group as in Products folder, so we can compile + # python scripts with the zope user + + chown -R `stat -c %U:%G ${2}/Products` ${2}/lib/python/${N} + + # gives group writing perms (very often need in development teams) + # takes all perms from others to comply with 770 instance policy + chmod -R g+rwX,o-rwx ${2}/lib/python/${N} + done fi return ${RESULT} @@ -263,6 +285,9 @@ for N in $(cat ${1}/${ZPROD_FLIST_FNAME}) ; do rm -rf ${2}/Products/${N} done + for N in $(cat ${1}/${ZPROD_LLIST_FNAME}) ; do + rm -rf ${2}/lib/python/${N} + done # remove zproduct from .zproduct.lst sed -i -e "s/${PF}$//" -e "/^$/d" ${2}/${ZPROD_PLIST_FNAME} RESULT=$?