From 5e94bbd15a2ac5edcbb6fa19740b6dd2f4825bd8 Mon Sep 17 00:00:00 2001 From: Alfredo Tupone Date: Sat, 24 May 2008 20:46:28 +0000 Subject: Removing unused files. Removed warning when product does not use lib/python Package-Manager: portage-2.1.4.4 --- app-admin/zprod-manager/ChangeLog | 9 +- app-admin/zprod-manager/Manifest | 14 +- app-admin/zprod-manager/files/0.1/zprod-manager | 319 -------------------- app-admin/zprod-manager/files/0.2/zprod-manager | 328 --------------------- app-admin/zprod-manager/files/0.3.2/zprod-manager | 65 ++-- .../zprod-manager/zprod-manager-0.3.2-r1.ebuild | 20 ++ app-admin/zprod-manager/zprod-manager-0.3.2.ebuild | 20 -- 7 files changed, 65 insertions(+), 710 deletions(-) delete mode 100644 app-admin/zprod-manager/files/0.1/zprod-manager delete mode 100644 app-admin/zprod-manager/files/0.2/zprod-manager create mode 100644 app-admin/zprod-manager/zprod-manager-0.3.2-r1.ebuild delete mode 100644 app-admin/zprod-manager/zprod-manager-0.3.2.ebuild (limited to 'app-admin') diff --git a/app-admin/zprod-manager/ChangeLog b/app-admin/zprod-manager/ChangeLog index ae021e7cfc87..ae0778c1f704 100644 --- a/app-admin/zprod-manager/ChangeLog +++ b/app-admin/zprod-manager/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-admin/zprod-manager # Copyright 2003-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/zprod-manager/ChangeLog,v 1.21 2008/05/06 21:53:35 tupone Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/zprod-manager/ChangeLog,v 1.22 2008/05/24 20:46:26 tupone Exp $ + +*zprod-manager-0.3.2-r1 (24 May 2008) + + 24 May 2008; Tupone Alfredo -files/0.1/zprod-manager, + files/0.3.2/zprod-manager, -files/0.2/zprod-manager, + -zprod-manager-0.3.2.ebuild, +zprod-manager-0.3.2-r1.ebuild: + Removing unused files. Removed warning when product does not use lib/python *zprod-manager-0.3.2 (06 May 2008) diff --git a/app-admin/zprod-manager/Manifest b/app-admin/zprod-manager/Manifest index 7cd7912a24d7..cbd67f24aed3 100644 --- a/app-admin/zprod-manager/Manifest +++ b/app-admin/zprod-manager/Manifest @@ -1,20 +1,18 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -AUX 0.1/zprod-manager 7156 RMD160 741d53aa3d415f1180ff77ba1e57a2f8ab986be7 SHA1 0f395532015715bf29f939fd6e3e295be4fbdc68 SHA256 8038fb769486238e15d6a369ede8478c99442408026091988131f42f99a0608c -AUX 0.2/zprod-manager 7507 RMD160 e69f8c44ef193323e43696d4c1a43d0b7822e08e SHA1 1846808610d70528dfd3f216aeb50ab049c43d97 SHA256 aac2b270a524a4ef173a99cf7ab53450418690812d6df28fd52db781cb9ddd7b AUX 0.3.1/zprod-manager 8424 RMD160 02261aec98cc4fb16254f052560b7622b4a857b2 SHA1 1ab27279f8b2b8abcba2340c986f38017bc36ccf SHA256 dc4f537b2c5e0c9135ae9594572d8b3200c8c468987f9a5e27688705fe3c7d40 -AUX 0.3.2/zprod-manager 9757 RMD160 dc67e08ea37e638b99ae9c79a8a0a545a139240c SHA1 2b97ff998cb9c3ace6aee06e34e52440291a9d50 SHA256 410dc85ee07076dbb4c7936b561a230f4ed6d715be25f307e32f982c3fe0739e +AUX 0.3.2/zprod-manager 9436 RMD160 e26b6a87ce1993dd5e8c2044826e6a6e41dc3a28 SHA1 39892604587ac8a0db949fa97577705e57ff67bd SHA256 094cbb9981c13f6f2e00f061529a2acc32361a52c2588119534cff5a43ab2c0b AUX 0.3/zprod-manager 8339 RMD160 5e890d2dbe362a645acde90b036e0272cf4db3ea SHA1 2a3c9aa7019a714c19edc1e8b2c6896671216e0f SHA256 56a7ecbf588fe3588643bebda857f7c4e43cc6c89914ce55a18601646b46f1e9 EBUILD zprod-manager-0.3.1.ebuild 578 RMD160 e1048b8b60d5a2b363f0bfff78b5446c054f7bf3 SHA1 a488af2d2492ae8c467e12293ce5cacdfddaa537 SHA256 bfa3d3064836430900d35cc7cc2f08004901d7fabced7979e7621a1792b30cd7 -EBUILD zprod-manager-0.3.2.ebuild 533 RMD160 31006619e131dc5007fd76e62030e7cee1e34950 SHA1 00be33ed03ff83ffbb98e532720b8ab836a90ac2 SHA256 dad646d726dba028913c0499b439f2a834ca5dcaa7fdd9a95e9d3d9a6d6b0177 +EBUILD zprod-manager-0.3.2-r1.ebuild 536 RMD160 4098f4d810fd31503ebc814c8b99c24f724ea65f SHA1 af558ce307e409be30fb553a1730929ef2ea6b97 SHA256 caadc7c27197d5029423f6390f17339b282f1399252471532acc977ad35b94ea EBUILD zprod-manager-0.3.ebuild 550 RMD160 5bbee8e50960074715e66a8616908b922550b21f SHA1 c938a7746179e3de84dfb91431f130ac6b4d84e5 SHA256 f7912203e0417e1bff2cb9e52afbda0dd1974f6c711e80e726e2256db4b4cf2b -MISC ChangeLog 3199 RMD160 f2cdd47da7105dd65c7dcd7c2f7456558185d286 SHA1 aeb8e4428d6b2c16a14bb0d86278c9f79d2ffdbd SHA256 8b8a926bbf4316878feb1556d0087eebcd9a4f29ab8be9cde81ca1948862c010 +MISC ChangeLog 3511 RMD160 677597a189da1dda11092f6d6e78450c8cd2b182 SHA1 be4b539ccb93d87c8670b3dbb3b98a367d6c9af3 SHA256 faa10b59bd1caea4542223f005caa5f2e985e1aa047e0f8c696887963dac48f1 MISC metadata.xml 236 RMD160 2426a5550a3a3bd590e34d0a94b7c70172e2da62 SHA1 029a41327079b38d4be4c4d9f48605c45e586d33 SHA256 1042e4d1be90d4fda4021f1d84b5a8e986c4e42d7b0e0aae82f488ef17bb0331 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) -iEYEARECAAYFAkghTq8ACgkQVrx5UrvSjsf1YQCeOG5ie/EGNqJVWKtkfD7IkmSB -ozcAnA1qRkdYRqv+qzjNtZHmjGJQbcby -=LtAT +iEYEARECAAYFAkg4fqoACgkQVrx5UrvSjsfTuwCgnIWnBrDaUlH4b7pOurhOZ9Jd +/K0AnAkV+EDjtzdD4Akg9SQVmXqK94oG +=Dz/q -----END PGP SIGNATURE----- diff --git a/app-admin/zprod-manager/files/0.1/zprod-manager b/app-admin/zprod-manager/files/0.1/zprod-manager deleted file mode 100644 index 36b21ea81477..000000000000 --- a/app-admin/zprod-manager/files/0.1/zprod-manager +++ /dev/null @@ -1,319 +0,0 @@ -#!/bin/bash -# Gentoo Zope Product selection tool. -# Copyright 2003 Jason Shoemaker -# Distributed under GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/zprod-manager/files/0.1/zprod-manager,v 1.3 2004/09/18 16:04:19 batlogg Exp $ - -VERSION="0.1" -COMMAND_LIST="add del" -ZS_DIR="/usr/share/zope/" -ZI_DIR="/var/lib/zope/" -ZPROD_DIR="/usr/share/zproduct/" - -ZINST_DEFAULT=".default" -ZPROD_FLIST_FNAME=".zfolder.lst" -ZPROD_PLIST_FNAME=".zproduct.lst" -ZPROD_FLIST_FPATH=${ZPROD_DIR}/${ZPROD_FLIST_FNAME} - -# Assume the standard dialog return codes -#DIALOG_CANCEL=1 -#DIALOG_ERROR=-1 -#DIALOG_ESC=-255 -#DIALOG_OK=0 -#DIALOG_ERROR may equal #DIALOG_ESC - -# Return codes used in this program: -E_SUCCESS=0 -E_FAILURE=1 - -E_ZPLIST=20 -E_ZILIST=22 -E_COMMAND=24 - -## copied from zope-config - -zinst_dir_get() -{ - local RESULT=${E_FAILURE} - local LIST=$(ls ${ZI_DIR}) - local LIST_CNT=$(echo ${LIST} | wc -w) - local DLIST= - - if [ ${LIST_CNT} -eq 1 ] ; then - ZINST_DIR=${LIST} - RESULT=${E_SUCCESS} - elif [ ${LIST_CNT} -ne 0 ] ; then - for N in ${LIST} ; do - DLIST="${DLIST} $N -" - done - ZINST_DIR=$(dialog --stdout \ - --title "Zope Instance List" \ - --menu "Select desired zinstance:" 0 0 ${LIST_CNT} ${DLIST}) - RESULT=$? - else - RESULT=${E_ZILIST} # There are no zinstances - fi - ZINST_DIR="${ZI_DIR}${ZINST_DIR}" - return ${RESULT} -} - -# params: none -# TODO: Maybe try to break this function down some more. -# TODO: verify items in ZP_PLIST and ZI_PLIST - -mode_interactive() -{ - local RESULT= - ZP_PLIST=$(ls ${ZPROD_DIR}) - if [ "${ZP_PLIST}" ] ; then - zinst_dir_get - RESULT=$? - if [ ${RESULT} -eq 0 ] ; then - ZI_PLIST=$(cat ${ZINST_DIR}/${ZPROD_PLIST_FNAME}) - # Create CLIST for --menu - if [ "${ZI_PLIST}" ] ; then - for N in ${ZP_PLIST} ; do - echo ${ZI_PLIST} |grep ${N} >/dev/null - if [ $? -eq 0 ] ; then - STATUS=ON - else - STATUS=OFF - fi - CLIST="${CLIST} ${N} - ${STATUS}" - done - CTAGS=$(dialog --stdout \ - --backtitle "Select the zproducts you want installed for zinstance(${ZINST_DIR})." \ - --checklist "Select:" 0 0 0 ${CLIST}) - RESULT=$? - CTAGS=$(echo ${CTAGS} | sed -e "s:\"::g") - # Prepare to add and delete zproducts installed in zinstance - if [[ ${RESULT} -eq 0 && "${CTAGS}" ]] ; then - for N in ${ZINST_DIR}/${ZPROD_PLIST_FNAME} ; do - echo "$CTAGS" |grep ${N} - if [ $? -ne 0 ] ; then - prod_del ${ZPROD_DIR}/${N} ${ZINST_DIR} - fi - done - for N in ${CTAGS} ; do - echo ${ZINST_DIR}/${ZPROD_PLIST_FNAME} |grep ${N} >/dev/null - if [ $? -ne 0 ] ; then - prod_add ${ZPROD_DIR}/${N} ${ZINST_DIR} - fi - done - RESULT=$? - elif [ ${RESULT} -eq 0 ] ; then # $CTAGS is empty - for N in ${ZI_PLIST} ; do - prod_del ${ZPROD_DIR}/${N} ${ZINST_DIR} - done - RESULT=$? - fi - else # ZI_PLIST is empty - for N in ${ZP_PLIST} ; do - CLIST="${CLIST} ${N} - 0" - done - CTAGS=$(dialog --stdout \ - --backtitle "Select the zproducts you want installed for zinstance(${ZINST_DIR})." \ - --checklist "Select:" 0 0 0 ${CLIST}) - RESULT=$? - CTAGS=$(echo "${CTAGS}" | sed -e "s:\"::g") - if [[ ${RESULT} -eq 0 && "${CTAGS}" ]] ; then - for N in ${CTAGS} ; do - prod_add ${ZPROD_DIR}/${N} ${ZINST_DIR} - done - fi - fi - fi - else # ZP_PLIST is empty - RESULT=${E_ZPLIST} - fi - return ${RESULT} -} - - -# Parameters: -# $1 = command list -# $2 = command received -# Returns: -# true or false - -is_command() -{ - local RESULT=${E_COMMAND} - local N= - - echo ${1} |grep ${2} >/dev/null - if [ $? -eq 0 ] ; then - RESULT=0 - fi - - return ${RESULT} -} - -# Parameters: -# $1 = /path/to/zinstance -# Returns: -# true or false - -is_zinstanceDir() -{ - local RESULT=${E_ZILIST} - # If can't find these, probably not a zinstance. - if [[ -d "${1}/Products" && -d "${1}/var" && -d "${1}/import" && -d "${1}/Extensions" ]] ; then - RESULT=0 - fi - return ${RESULT} -} - -# Parameters: -# $1 = /path/to/zproduct -# Returns: -# true or false - -is_zproductDir() -{ - local RESULT=${E_ZPLIST} - # look for something in .zproduct.lst in $1, if we can't find that... - if [ -s "${1}/${ZPROD_FLIST_FNAME}" ] ; then - RESULT=0 - fi - return ${RESULT} -} - -# Parameters: -# $1 = /path/to/zinst_dir -# Returns: -# stdout = name of defautl zinstance, if any. - -zinst_default_get() -{ - if [ -s ${1}/${ZINST_DEFAULT} ] ; then - cat ${1}/${ZINST_DEFAULT} - fi -} - -# Parameters: -# $1 = /path/to/zproduct -# $2 = /path/to/zinstance - -prod_add() -{ - local RESULT= - local N= - - for N in $(cat "${1}/${ZPROD_FLIST_FNAME}") ; do -# ln -fs ${1}/${N} ${2}/Products - cp -Ra ${1}/${N} ${2}/Products - done - RESULT=$? - if [ ${RESULT} -eq 0 ] ; then - # basically adding ${PF} to .zproduct.lst - echo $(basename $1) >> ${2}/${ZPROD_PLIST_FNAME} - sort -u ${2}/${ZPROD_PLIST_FNAME} > ${2}/.tmp - mv -f ${2}/.tmp ${2}/${ZPROD_PLIST_FNAME} - RESULT=$? - - # 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}/Products - fi - - return ${RESULT} -} - -# Parameters: -# $1 = /path/to/zproduct -# $2 = /path/to/zinstance - -prod_del() -{ - local RESULT= - local N= - local PF=$(basename $1) - - grep "${PF}" "${2}/${ZPROD_PLIST_FNAME}" >/dev/null - RESULT=$? - if [ ${RESULT} -eq 0 ] ; then - for N in $(cat ${1}/${ZPROD_FLIST_FNAME}) ; do - rm -rf ${2}/Products/${N} - done - # remove zproduct from .zproduct.lst - sed -i -e "s/${PF}$//" -e "/^$/d" ${2}/${ZPROD_PLIST_FNAME} - RESULT=$? - fi - return ${RESULT} -} - -# Parameters: -# $1 = (optional) error message - -mode_help() -{ - echo "$(basename $0) version ${VERSION}" - echo "A Gentoo Zope Product selection tool." - echo - echo "Interactive usage:" - echo -e "\t$(basename $0) [add | del]" - echo "Default zinstance usage:" - echo -e "\t$(basename $0) [add |del] /path/of/zproduct" - echo "Non-interactive usage:" - echo -e "\t$(basename $0) [add | del] /path/of/zproduct /path/of/zinstance/" -} - -# Parameters: -# $1 = command -# $2 = /path/to/zproductDir - -mode_defaultZinst() -{ - local DEFAULT_ZINST=$(zinst_default_get ${ZI_DIR}) - local RESULT=$? - if [ -n "${DEFAULT_ZINST}" ] ; then - mode_explicit ${1} ${2} ${ZI_DIR}/${DEFAULT_ZINST} - RESULT=${?} - fi - return ${RESULT} -} - -# Parameters: -# $1 = command -# $2 = /path/to/zproduct -# $3 = /path/to/zinstance - -mode_explicit() -{ - local RESULT= - if [[ $(is_command "${COMMAND_LIST}" ${1})${?} -eq 0 && \ - $(is_zproductDir ${2})${?} -eq 0 && \ - $(is_zinstanceDir ${3})${?} -eq 0 ]] ; then - if [ ${1} = "add" ] ; then - prod_add ${2} ${3} - RESULT=$? - elif [ ${1} = "del" ] ; then - prod_del ${2} ${3} - RESULT=$? - else - RESULT=${E_COMMAND} - fi - fi - return ${RESULT} -} - -### MAIN - -case "${#}" in - 0) mode_help ;; - 1) mode_interactive ${1} ;; - 2) mode_defaultZinst ${1} ${2} ;; - 3) mode_explicit ${1} ${2} ${3} ;; - *) mode_help "Error: Too many parameters" ;; -esac - -RESULT=$? - -if [ ${RESULT} -ne 0 ] ; then - echo "ERROR ${?}" -fi - - - diff --git a/app-admin/zprod-manager/files/0.2/zprod-manager b/app-admin/zprod-manager/files/0.2/zprod-manager deleted file mode 100644 index 00abd537c17a..000000000000 --- a/app-admin/zprod-manager/files/0.2/zprod-manager +++ /dev/null @@ -1,328 +0,0 @@ -#!/bin/bash -# Gentoo Zope Product selection tool. -# Copyright 2003 Jason Shoemaker -# Distributed under GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/zprod-manager/files/0.2/zprod-manager,v 1.2 2006/11/06 05:28:09 aross Exp $ - -VERSION="0.2" -COMMAND_LIST="add del" -ZS_DIR="/usr/share/zope/" -ZI_DIR="/var/lib/zope/" -ZPROD_DIR="/usr/share/zproduct/" - -ZINST_DEFAULT=".default" -ZPROD_FLIST_FNAME=".zfolder.lst" -ZPROD_PLIST_FNAME=".zproduct.lst" - -# Assume the standard dialog return codes -#DIALOG_CANCEL=1 -#DIALOG_ERROR=-1 -#DIALOG_ESC=-255 -#DIALOG_OK=0 -#DIALOG_ERROR may equal #DIALOG_ESC - -# Return codes used in this program: -E_SUCCESS=0 -E_FAILURE=1 - -E_ZPLIST=20 -E_ZILIST=22 -E_COMMAND=24 - -## copied from zope-config - -zinst_dir_get() -{ - local RESULT=${E_FAILURE} - local LIST=$(ls ${ZI_DIR}) - local LIST_CNT=$(echo ${LIST} | wc -w) - local DLIST= - - if [ ${LIST_CNT} -eq 1 ] ; then - ZINST_DIR=${LIST} - RESULT=${E_SUCCESS} - elif [ ${LIST_CNT} -ne 0 ] ; then - for N in ${LIST} ; do - DLIST="${DLIST} $N -" - done - ZINST_DIR=$(dialog --stdout \ - --title "Zope Instance List" \ - --menu "Select desired zinstance:" 0 0 ${LIST_CNT} ${DLIST}) - RESULT=$? - else - RESULT=${E_ZILIST} # There are no zinstances - fi - ZINST_DIR="${ZI_DIR}${ZINST_DIR}" - return ${RESULT} -} - -# params: none -# TODO: Maybe try to break this function down some more. -# TODO: verify items in ZP_PLIST and ZI_PLIST - -mode_interactive() -{ - local RESULT= - if [ $(is_command "${COMMAND_LIST}" ${1})${?} -ne 0 ] ; then - RESULT=${?} - return ${RESULT} - fi - ZP_PLIST=$(ls ${ZPROD_DIR}) - if [ "${ZP_PLIST}" ] ; then - zinst_dir_get - RESULT=$? - if [ ${RESULT} -eq 0 ] ; then - ZI_PLIST=$(cat ${ZINST_DIR}/${ZPROD_PLIST_FNAME}) - # Create CLIST for --menu - if [ "${ZI_PLIST}" ] ; then - for N in ${ZP_PLIST} ; do - echo ${ZI_PLIST} |grep ${N} >/dev/null - if [ $? -eq 0 ] ; then - STATUS=ON - else - STATUS=OFF - fi - CLIST="${CLIST} ${N} - ${STATUS}" - done - CTAGS=$(dialog --stdout \ - --backtitle "Select the zproducts you want installed for zinstance(${ZINST_DIR})." \ - --checklist "Select:" 0 0 0 ${CLIST}) - RESULT=$? - CTAGS=$(echo ${CTAGS} | sed -e "s:\"::g") - # Prepare to add and delete zproducts installed in zinstance - if [[ ${RESULT} -eq 0 && "${CTAGS}" ]] ; then - for N in ${ZI_PLIST} ; do - echo "$CTAGS" |grep ${N} >/dev/null - if [ $? -ne 0 ] ; then - prod_del ${ZPROD_DIR}/${N} ${ZINST_DIR} - fi - done - for N in ${CTAGS} ; do - echo ${ZI_PLIST} |grep ${N} >/dev/null - if [ $? -ne 0 ] ; then - prod_add ${ZPROD_DIR}/${N} ${ZINST_DIR} - fi - done - RESULT=$? - elif [ ${RESULT} -eq 0 ] ; then # $CTAGS is empty - for N in ${ZI_PLIST} ; do - prod_del ${ZPROD_DIR}/${N} ${ZINST_DIR} - done - RESULT=$? - fi - else # ZI_PLIST is empty - for N in ${ZP_PLIST} ; do - CLIST="${CLIST} ${N} - 0" - done - CTAGS=$(dialog --stdout \ - --backtitle "Select the zproducts you want installed for zinstance(${ZINST_DIR})." \ - --checklist "Select:" 0 0 0 ${CLIST}) - RESULT=$? - CTAGS=$(echo "${CTAGS}" | sed -e "s:\"::g") - if [[ ${RESULT} -eq 0 && "${CTAGS}" ]] ; then - for N in ${CTAGS} ; do - prod_add ${ZPROD_DIR}/${N} ${ZINST_DIR} - done - fi - fi - fi - else # ZP_PLIST is empty - RESULT=${E_ZPLIST} - fi - return ${RESULT} -} - - -# Parameters: -# $1 = command list -# $2 = command received -# Returns: -# true or false - -is_command() -{ - local RESULT=${E_COMMAND} - local N= - - echo ${1} |grep ${2} >/dev/null - if [ $? -eq 0 ] ; then - RESULT=0 - fi - - return ${RESULT} -} - -# Parameters: -# $1 = /path/to/zinstance -# Returns: -# true or false - -is_zinstanceDir() -{ - local RESULT=${E_ZILIST} - # If can't find these, probably not a zinstance. - if [[ -d "${1}/Products" && -d "${1}/var" && -d "${1}/import" && -d "${1}/Extensions" ]] ; then - RESULT=0 - fi - return ${RESULT} -} - -# Parameters: -# $1 = /path/to/zproduct -# Returns: -# true or false - -is_zproductDir() -{ - local RESULT=${E_ZPLIST} - # look for something in .zproduct.lst in $1, if we can't find that... - if [ -s "${1}/${ZPROD_FLIST_FNAME}" ] ; then - RESULT=0 - fi - return ${RESULT} -} - -# Parameters: -# $1 = /path/to/zinst_dir -# Returns: -# stdout = name of defautl zinstance, if any. - -zinst_default_get() -{ - if [ -s ${1}/${ZINST_DEFAULT} ] ; then - cat ${1}/${ZINST_DEFAULT} - fi -} - -# Parameters: -# $1 = /path/to/zproduct -# $2 = /path/to/zinstance - -prod_add() -{ - local RESULT= - local N= - - for N in $(cat "${1}/${ZPROD_FLIST_FNAME}") ; do -# ln -fs ${1}/${N} ${2}/Products - cp -Ra ${1}/${N} ${2}/Products - done - RESULT=$? - if [ ${RESULT} -eq 0 ] ; then - # basically adding ${PF} to .zproduct.lst - echo $(basename $1) >> ${2}/${ZPROD_PLIST_FNAME} - sort -u ${2}/${ZPROD_PLIST_FNAME} > ${2}/.tmp - mv -f ${2}/.tmp ${2}/${ZPROD_PLIST_FNAME} - RESULT=$? - - for N in $(cat "${1}/${ZPROD_FLIST_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}/Products/${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}/Products/${N} - done - fi - - return ${RESULT} -} - -# Parameters: -# $1 = /path/to/zproduct -# $2 = /path/to/zinstance - -prod_del() -{ - local RESULT= - local N= - local PF=$(basename $1) - - grep "${PF}" "${2}/${ZPROD_PLIST_FNAME}" >/dev/null - RESULT=$? - if [ ${RESULT} -eq 0 ] ; then - for N in $(cat ${1}/${ZPROD_FLIST_FNAME}) ; do - rm -rf ${2}/Products/${N} - done - # remove zproduct from .zproduct.lst - sed -i -e "s/${PF}$//" -e "/^$/d" ${2}/${ZPROD_PLIST_FNAME} - RESULT=$? - fi - return ${RESULT} -} - -# Parameters: -# $1 = (optional) error message - -mode_help() -{ - echo "$(basename $0) version ${VERSION}" - echo "A Gentoo Zope Product selection tool." - echo - echo "Interactive usage:" - echo -e "\t$(basename $0) [add | del]" - echo "Default zinstance usage:" - echo -e "\t$(basename $0) [add |del] /path/of/zproduct" - echo "Non-interactive usage:" - echo -e "\t$(basename $0) [add | del] /path/of/zproduct /path/of/zinstance/" -} - -# Parameters: -# $1 = command -# $2 = /path/to/zproductDir - -mode_defaultZinst() -{ - local DEFAULT_ZINST=$(zinst_default_get ${ZI_DIR}) - local RESULT=$? - if [ -n "${DEFAULT_ZINST}" ] ; then - mode_explicit ${1} ${2} ${ZI_DIR}/${DEFAULT_ZINST} - RESULT=${?} - fi - return ${RESULT} -} - -# Parameters: -# $1 = command -# $2 = /path/to/zproduct -# $3 = /path/to/zinstance - -mode_explicit() -{ - local RESULT= - if [[ $(is_command "${COMMAND_LIST}" ${1})${?} -eq 0 && \ - $(is_zproductDir ${2})${?} -eq 0 && \ - $(is_zinstanceDir ${3})${?} -eq 0 ]] ; then - if [ ${1} = "add" ] ; then - prod_add ${2} ${3} - RESULT=$? - elif [ ${1} = "del" ] ; then - prod_del ${2} ${3} - RESULT=$? - else - RESULT=${E_COMMAND} - fi - fi - return ${RESULT} -} - -### MAIN - -case "${#}" in - 0) mode_help ;; - 1) mode_interactive ${1} ;; - 2) mode_defaultZinst ${1} ${2} ;; - 3) mode_explicit ${1} ${2} ${3} ;; - *) mode_help "Error: Too many parameters" ;; -esac - -RESULT=$? - -if [ ${RESULT} -ne 0 ] ; then - echo "ERROR ${?}" -fi - - -# vim:ts=8 diff --git a/app-admin/zprod-manager/files/0.3.2/zprod-manager b/app-admin/zprod-manager/files/0.3.2/zprod-manager index 0394fbf29862..b5044d178298 100644 --- a/app-admin/zprod-manager/files/0.3.2/zprod-manager +++ b/app-admin/zprod-manager/files/0.3.2/zprod-manager @@ -2,7 +2,7 @@ # Gentoo Zope Product selection tool. # Copyright 2003 Jason Shoemaker # Distributed under GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/zprod-manager/files/0.3.2/zprod-manager,v 1.1 2008/05/06 21:53:47 tupone Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/zprod-manager/files/0.3.2/zprod-manager,v 1.2 2008/05/24 20:46:27 tupone Exp $ VERSION="0.3.1" COMMAND_LIST="add del" @@ -220,30 +220,31 @@ prod_add() return ${E_OVERWRITE} fi done - for N in $(cat "${1}/${ZPROD_LLIST_FNAME}") - do - if [ -d ${2}/lib/python/${N} ] - then - echo "ZPROD-MANAGER WARNING: Overwrite possiblity detected at ${N}" - return ${E_OVERWRITE} - fi - done + if [ -f "${1}/${ZPROD_LLIST_FNAME}" ]; then + for N in $(cat "${1}/${ZPROD_LLIST_FNAME}"); do + if [ -d ${2}/lib/python/${N} ]; then + echo "ZPROD-MANAGER WARNING: Overwrite detected at ${N}" + return ${E_OVERWRITE} + fi + done + fi + # we do copy instead of link, because its much safer, + # and zope-development-way compliant 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}/lib/python/${N} ${2}/lib/python - done + if [ -f "${1}/${ZPROD_LLIST_FNAME}" ]; then + for N in $(cat "${1}/${ZPROD_LLIST_FNAME}") ; do + cp -Ra ${1}/lib/python/${N} ${2}/lib/python + done + fi RESULT=$? if [ ${RESULT} -eq 0 ] ; then # basically adding ${PF} to .zproduct.lst @@ -252,26 +253,20 @@ prod_add() mv -f ${2}/.tmp ${2}/${ZPROD_PLIST_FNAME} RESULT=$? + # setting owner and group as in Products folder, so we can compile + # python scripts with the zope user + # gives group writing perms (very often need in development teams) + # takes all perms from others to comply with 770 instance policy for N in $(cat "${1}/${ZPROD_FLIST_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}/Products/${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}/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 + if [ -f "${1}/${ZPROD_LLIST_FNAME}" ]; then + for N in $(cat "${1}/${ZPROD_LLIST_FNAME}") ; do + chown -R `stat -c %U:%G ${2}/Products` ${2}/lib/python/${N} + chmod -R g+rwX,o-rwx ${2}/lib/python/${N} + done + fi fi return ${RESULT} @@ -293,9 +288,11 @@ prod_del() 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 + if [ -f "${1}/${ZPROD_LLIST_FNAME}" ]; then + for N in $(cat ${1}/${ZPROD_LLIST_FNAME}) ; do + rm -rf ${2}/lib/python/${N} + done + fi # remove zproduct from .zproduct.lst sed -i -e "s/${PF}$//" -e "/^$/d" ${2}/${ZPROD_PLIST_FNAME} RESULT=$? diff --git a/app-admin/zprod-manager/zprod-manager-0.3.2-r1.ebuild b/app-admin/zprod-manager/zprod-manager-0.3.2-r1.ebuild new file mode 100644 index 000000000000..cd899f64e5b8 --- /dev/null +++ b/app-admin/zprod-manager/zprod-manager-0.3.2-r1.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/zprod-manager/zprod-manager-0.3.2-r1.ebuild,v 1.1 2008/05/24 20:46:26 tupone Exp $ + +DESCRIPTION="Gentoo Zope Product selection tool" +SRC_URI="" +HOMEPAGE="http://www.gentoo.org/" + +SLOT="0" +LICENSE="GPL-2" +IUSE="" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" + +DEPEND="" +RDEPEND="dev-util/dialog + net-zope/zope" + +src_install() { + dosbin "${FILESDIR}/${PV}"/zprod-manager || die "install failed" +} diff --git a/app-admin/zprod-manager/zprod-manager-0.3.2.ebuild b/app-admin/zprod-manager/zprod-manager-0.3.2.ebuild deleted file mode 100644 index 0537fcc2e589..000000000000 --- a/app-admin/zprod-manager/zprod-manager-0.3.2.ebuild +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/zprod-manager/zprod-manager-0.3.2.ebuild,v 1.1 2008/05/06 21:53:35 tupone Exp $ - -DESCRIPTION="Gentoo Zope Product selection tool" -SRC_URI="" -HOMEPAGE="http://www.gentoo.org/" - -SLOT="0" -LICENSE="GPL-2" -IUSE="" -KEYWORDS="~amd64 ~ppc ~sparc ~x86" - -DEPEND="" -RDEPEND="dev-util/dialog - net-zope/zope" - -src_install() { - dosbin "${FILESDIR}/${PV}"/zprod-manager || die "install failed" -} -- cgit v1.2.3-65-gdbad