Re: sh script problem with capturing return code

2013-01-14 Thread Fbsd8
Lowell Gilbert wrote: Adam Vande More amvandem...@gmail.com writes: On Wed, Jan 9, 2013 at 7:23 PM, Lowell Gilbert freebsd-questions-lo...@be-well.ilk.org wrote: Lowell Gilbert freebsd-questions-lo...@be-well.ilk.org writes: I think it's a real bug, and the test cases don't cover extra

Re: sh script problem with capturing return code

2013-01-14 Thread Fbsd8
Lowell Gilbert wrote: Fbsd8 fb...@a1poweruser.com writes: Lowell Gilbert wrote: Lowell Gilbert freebsd-questions-lo...@be-well.ilk.org writes: I think it's a real bug, and the test cases don't cover extra elements at all. Now I just have to figure out the right fix. I'm pretty sure that

Re: sh script problem with capturing return code

2013-01-14 Thread Lowell Gilbert
Fbsd8 fb...@a1poweruser.com writes: Let me be sure I understand you correctly. Your saying you tested the NetBSD version of mtree that was committed into 10.0 head and it also has the bug we found? No. The port is not complete. All I did was a code inspection.

Re: sh script problem with capturing return code

2013-01-14 Thread Lowell Gilbert
Fbsd8 fb...@a1poweruser.com writes: Lowell Gilbert wrote: This fixes the problem that was bothering you, but the interactions of different features are complicated, and many of them are documented in fairly loose language. Is that the diplomatic way of saying the manpage for mtree sucks,

Re: sh script problem with capturing return code

2013-01-14 Thread Fbsd8
Lowell Gilbert wrote: Fbsd8 fb...@a1poweruser.com writes: Lowell Gilbert wrote: This fixes the problem that was bothering you, but the interactions of different features are complicated, and many of them are documented in fairly loose language. Is that the diplomatic way of saying the

Re: sh script problem with capturing return code

2013-01-13 Thread Lowell Gilbert
Fbsd8 fb...@a1poweruser.com writes: Lowell Gilbert wrote: Lowell Gilbert freebsd-questions-lo...@be-well.ilk.org writes: I think it's a real bug, and the test cases don't cover extra elements at all. Now I just have to figure out the right fix. I'm pretty sure that the fix is just to set

Re: sh script problem with capturing return code

2013-01-13 Thread Lowell Gilbert
Adam Vande More amvandem...@gmail.com writes: On Wed, Jan 9, 2013 at 7:23 PM, Lowell Gilbert freebsd-questions-lo...@be-well.ilk.org wrote: Lowell Gilbert freebsd-questions-lo...@be-well.ilk.org writes: I think it's a real bug, and the test cases don't cover extra elements at all. Now I

Re: sh script problem with capturing return code

2013-01-09 Thread Fbsd8
Lowell Gilbert wrote: Fbsd8 fb...@a1poweruser.com writes: Polytropon wrote: On Tue, 08 Jan 2013 16:30:49 -0500, Fbsd8 wrote: I can not get the return code from mtree to control the displaying of a error message. The mtree at the end of the script does function correctly because I can tell

Re: sh script problem with capturing return code

2013-01-09 Thread Lowell Gilbert
Fbsd8 fb...@a1poweruser.com writes: So the question remains, why is mtree giving a return of zero when it finds directories on the target that are not in the spec file? Okay, I had a hard time figuring out your examples, but I think I've got an independent repeatable test case for the problem.

Re: sh script problem with capturing return code

2013-01-09 Thread Lowell Gilbert
Lowell Gilbert freebsd-questions-lo...@be-well.ilk.org writes: and I think the problem you're having is that the second echo $? should be 2, although the others are correct at 0. Is that correct? It's not; ignore my example. The extra directory was under the ignored directory, so it's testing

Re: sh script problem with capturing return code

2013-01-09 Thread Lowell Gilbert
Lowell Gilbert freebsd-questions-lo...@be-well.ilk.org writes: It's not; ignore my example. The extra directory was under the ignored directory, so it's testing the right properties. I think if I create the new subdirectory under the other main directory, it would be right. Confirmed. The

Re: sh script problem with capturing return code

2013-01-09 Thread Lowell Gilbert
Lowell Gilbert freebsd-questions-lo...@be-well.ilk.org writes: I think it's a real bug, and the test cases don't cover extra elements at all. Now I just have to figure out the right fix. I'm pretty sure that the fix is just to set rval on jumping to the extra tag in vwalk() in

Re: sh script problem with capturing return code

2013-01-09 Thread Fbsd8
Lowell Gilbert wrote: Lowell Gilbert freebsd-questions-lo...@be-well.ilk.org writes: I think it's a real bug, and the test cases don't cover extra elements at all. Now I just have to figure out the right fix. I'm pretty sure that the fix is just to set rval on jumping to the extra tag in

Re: sh script problem with capturing return code

2013-01-09 Thread Adam Vande More
On Wed, Jan 9, 2013 at 7:23 PM, Lowell Gilbert freebsd-questions-lo...@be-well.ilk.org wrote: Lowell Gilbert freebsd-questions-lo...@be-well.ilk.org writes: I think it's a real bug, and the test cases don't cover extra elements at all. Now I just have to figure out the right fix. I'm

Re: sh script problem with capturing return code

2013-01-08 Thread Polytropon
On Tue, 08 Jan 2013 16:30:49 -0500, Fbsd8 wrote: I can not get the return code from mtree to control the displaying of a error message. The mtree at the end of the script does function correctly because I can tell from the printed output. When mtree prints comments saying extra that

Re: sh script problem with capturing return code

2013-01-08 Thread Fbsd8
Polytropon wrote: On Tue, 08 Jan 2013 16:30:49 -0500, Fbsd8 wrote: I can not get the return code from mtree to control the displaying of a error message. The mtree at the end of the script does function correctly because I can tell from the printed output. When mtree prints comments saying

Re: sh script problem with capturing return code

2013-01-08 Thread Lowell Gilbert
Fbsd8 fb...@a1poweruser.com writes: Polytropon wrote: On Tue, 08 Jan 2013 16:30:49 -0500, Fbsd8 wrote: I can not get the return code from mtree to control the displaying of a error message. The mtree at the end of the script does function correctly because I can tell from the printed