/etc/cron.daily/beagle-crawl-system fails to work because of "set -e"

Bug #78006 reported by Richard Laager
This bug report is a duplicate of:  Bug #67778: Search don't work with beagle. Edit Remove
4
Affects Status Importance Assigned to Milestone
beagle (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: beagle

The beagle package creates /etc/cron.daily/beagle-crawl-system, a script
to crawl system directories. The second line of this file is "set -e",
which causes the script to terminate if any command returns failure. I
don't see any reason for this, given that the script has appropriate
error checking.

In fact, stopping on errors causes this script to fail to work at all.
For example, take these two lines of code:

OPTIONS="`test -n "$CRAWL_DISABLE_FILTERING" -a "$CRAWL_DISABLE_FILTERING" = "yes" && \
                     echo --disable-filtering`"

If CRAWL_DISABLE_FILTERING is "no", which seems to be the default, then
the test evaluates to FALSE, as desired. This prevents the echo from
adding --disable-filtering to the OPTIONS. However, this means that the
entire line has returned a non-zero exit code. When combined with the
"set -e" at the top of the script, the execution stops, without running
a beagle crawl.

Unless there's some reason the "set -e" is necessary, which I can't
find, then the solution is to remove that line. I've tested that and the
script works again.

Richard Laager (rlaager)
description: updated
Revision history for this message
Vincenzo Ciancia (vincenzo-ml) wrote :

This is a duplicate of bug #67778, and has been fixed in feisty. A backport will be available in a week I think in edgy-backports, in response to request in bug #73512.

Changed in beagle:
status: Unconfirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.