diff --git a/conf/templates/fallback b/conf/templates/fallback index e1e1f4f..d15023c 100644 --- a/conf/templates/fallback +++ b/conf/templates/fallback @@ -75,7 +75,7 @@ ## The name of this bee-file should follow the following naming convention: ## pkgname-pkgversion-pkgrevision.bee ## -## You may remove all comments as long as SRCURL[0]="" is set. +## You may remove all comments as long as SRCURL[0] is set. ## ## Everything in this file will be executed in a bash environment. ## diff --git a/hooks/mandb.sh b/hooks/mandb.sh index ab09af8..5da562c 100644 --- a/hooks/mandb.sh +++ b/hooks/mandb.sh @@ -47,6 +47,10 @@ for man_dir in $(beeuniq ${man_dirs//:/ }) ; do case "${action}" in "post-remove"|"post-install") if grep -q "file=${man_dir}" ${content} ; then + if [ ! -d ${man_dir} ]; then + continue + fi + nfiles=$(ls ${man_dir}/ | head -2 | grep -c -v index.db) if [ "${nfiles}" -gt 0 ] ; then rm -f ${man_dir}/index.db diff --git a/src/bee-check.sh.in b/src/bee-check.sh.in index 87d84f9..ea1be6b 100644 --- a/src/bee-check.sh.in +++ b/src/bee-check.sh.in @@ -192,13 +192,13 @@ function do_check_deps() { echo " provides = ${PKGNAME}" echo " provides = ${PKGFULLPKG}" - for line in $(cat ${filesfile}) ; do - eval $(${BEESEP} ${line}) + while read line; do + eval $(${BEESEP} "${line}") echo " provides = ${file%%//*}" - done + done < "${filesfile}" - for line in $(cat ${filesfile}) ; do - eval $(${BEESEP} ${line}) + while read line; do + eval $(${BEESEP} "${line}") # save and strip possible symbolic link destination.. symlink=${file#*//} @@ -220,8 +220,7 @@ function do_check_deps() { fi do_check_deps_of_file "${file}" - - done + done < "${filesfile}" } ############################################################################### diff --git a/src/bee-query.sh.in b/src/bee-query.sh.in index 02edcf3..a6e2755 100644 --- a/src/bee-query.sh.in +++ b/src/bee-query.sh.in @@ -70,7 +70,7 @@ function query() { function get_files() { pkg=${1} - for s in "" "${BEE_METADIR}" ; do + for s in "${BEE_METADIR}" ; do ff="${s}/${pkg}/CONTENT" if [ -e "${ff}" ] ; then while read line ; do diff --git a/src/beesh.sh.in b/src/beesh.sh.in index ade8eca..fcc8876 100644 --- a/src/beesh.sh.in +++ b/src/beesh.sh.in @@ -142,16 +142,19 @@ function check_rebuild() { print_warning "please increase revision number" beefile_dir=${beefile%/*} - eval $(${BEEVERSION} ${beefile}}) + eval $(${BEEVERSION} ${beefile}) beefile_pattern="${PKGFULLNAME}-${PKGFULLVERSION}" + beefile_pattern=${beefile_pattern//+/\\+} # replace all + with \+ + beefile_pattern=${beefile_pattern//./\\.} # replace all . with \. + beefile_max=$(for bf in $(ls ${beefile%/*}/${beefile_pattern}*.bee ${BEE_BEEDIR}/${beefile_pattern}*.bee 2>/dev/null |\ grep -E "/${beefile_pattern}-[0-9]+.bee") ; do echo "${bf}" done | ${BEESORT} | tail -1) eval $(${BEEVERSION} ${beefile_max}) - print_warning "cp ${beefile} ${PWD}/${beefile_pattern}-$((PKGREVISION + 1)).bee" + print_warning "cp ${beefile} ${PWD}/${PKGFULLNAME}-${PKGFULLVERSION}-$((PKGREVISION + 1)).bee" exit 1 } @@ -1005,11 +1008,13 @@ if [ ! -d "${S}/${BEE_SOURCESUBDIR}" ] ; then exit 1 fi -if [ "${B}" = "${S}" ] ; then - B="${S}/${BEE_SOURCESUBDIR}" +if [ "${B}" = "${S}" -a -n "${BEE_SOURCESUBDIR}" ] ; then + B="${S}/${BEE_SOURCESUBDIR}" fi -S="${S}/${BEE_SOURCESUBDIR}" +if [ -n "${BEE_SOURCESUBDIR}" ]; then + S="${S}/${BEE_SOURCESUBDIR}" +fi print_info "changing to source directory: ${S}" cd ${S} diff --git a/src/compat-filesfile2contentfile.sh.in b/src/compat-filesfile2contentfile.sh.in index 1a0493b..4c64e78 100644 --- a/src/compat-filesfile2contentfile.sh.in +++ b/src/compat-filesfile2contentfile.sh.in @@ -29,7 +29,7 @@ declare -A hardlink while read line ; do md5="" - data=$(${BEESEP} ${line} 2>/dev/null) + data=$(${BEESEP} "${line}" 2>/dev/null) if [ $? -ne '0' ] ; then echo >&2 "**ERROR** INVALID CONTENT: ${line}"