bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another new 4.0 feature? functions can't return '1', (()) can't eval


From: Linda Walsh
Subject: Re: Another new 4.0 feature? functions can't return '1', (()) can't eval to 0?
Date: Wed, 10 Aug 2011 00:27:14 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666

This may be some 'cockpit error', but this is what I'm seeing right
now and AFAICT, bash is broken.

I have this statement:

next line is line #300
have_dep -v base_mp_diff base_vg osnap_lv osnap_vg && {
        nextents="$(get_nextents_for_space_on_vg_w_minfree  \
                                                        "$base_mp_diff" "$base_vg" 
10 )"


------

'have_dep' is an alias to 'is-provided'


Trace shows...
./create_snap_rdiff#300> is_provided -v base_mp_diff base_vg osnap_lv osnap_vg
./snaplib.sh#764(is_provided)> local save_ops=ehmuxBET
./snaplib.sh#764(is_provided)> DebugPush_helper Define_Provides
./snaplib.sh#33(DebugPush_helper)> debug Define_Provides
./snaplib.sh#41(debug)> local dbgsave_ops=ehmuxBET
./snaplib.sh#42(debug)> set +x
./snaplib.sh#53(debug)> (( i_res ))
./snaplib.sh#33(DebugPush_helper)> set +x
./snaplib.sh#767(is_provided)> return 1
Ishtar:law/bin/lvm>

So one of the prereqs was not provided and no more statements were executed.

There are 410 lines in the file, all enclosed by 8 more have_dep statements...

But I don't see any of those being hit ... you can see from the trace, it goes into 'is_provided (has_dep)....calldbg, and shuts off trace in those low level routines.

Last statement, 'i_res' is the integer result of a calculate that came out to 0.

It's not a simple command -- it is followed by a '&&, and from the trace, it should
fall through, but that shouldn't abort the script...

Depending on what step we are at, the dependency checks are being arranged to pick up where I left off, if things get interrupted, but the new error checking in 4.x maybe
just 4.1.1, seems to be causing normal paradigms to break.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]