Skip to content

Commit

Permalink
Merge branch 'ruester/fixes'
Browse files Browse the repository at this point in the history
* ruester/fixes:
  beesh: only append BEE_SOURCESUBDIR if set
  beesh: fix check_rebuild
  beesh: fix typo
  hooks: do not update manual index cache if directory does not exist anymore
  templates: minor fix
  bee-query: fix get_files
  Fix beesep calls
  bee-check: fix reading the CONTENT file
  • Loading branch information
mariux committed Jun 1, 2015
2 parents 896da4f + 757a7da commit 046bbee
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion conf/templates/fallback
Original file line number Diff line number Diff line change
Expand Up @@ -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.
##
Expand Down
4 changes: 4 additions & 0 deletions hooks/mandb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 6 additions & 7 deletions src/bee-check.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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#*//}
Expand All @@ -220,8 +220,7 @@ function do_check_deps() {
fi

do_check_deps_of_file "${file}"

done
done < "${filesfile}"
}

###############################################################################
Expand Down
2 changes: 1 addition & 1 deletion src/bee-query.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 10 additions & 5 deletions src/beesh.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion src/compat-filesfile2contentfile.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 046bbee

Please sign in to comment.