[GRASS-dev] r.mapcalc and g.remove --v/q issues

Hamish hamish_nospam at yahoo.com
Mon Oct 23 02:45:25 EDT 2006


(sorry, I don't want this thread to go on forever, and didn't follow
all that was discussed, but the following assertion requires some
supporting arguments)

Maciej Sieczka wrote:
> It is very good that g.remove vect doesn't return 1 exit status
> anymore if the file doesn't exist.

why? you told the module to do something specific and it didn't/couldn't
do that for some reason. This sounds like an error to me. If the "-f"
force flag is used then it probably should not be an error however.

The choice is then for the user to decide to ignore that error as
harmless or not. But it is still an error.

at least GNU & co. call it an error, if we can take some guidance from
them:

$ rm no_file
rm: cannot lstat `no_file': No such file or directory
$ echo $?
1

$ rm -f no_file
$ echo $?
0

> For this reason I think the patch should be applied ASAP as is, so
> this important fix makes to GRASS 6.2, if nobody minds.

I mind:

Please be very careful with what is applied to the 6.2 branch.
Especially at this late date we should try for critical fixes only.

This is especially especially true for "policy" changes such as this
one. (none of the recent --quiet improvements should be backported to
6.2)


Will a change unintentionally break any scripts which expect the old
behaviour/return value? That takes a lot of testing (time) to find out.


thanks,
Hamish




More information about the grass-dev mailing list