CMDS: bad array subscript
Brought to you by:
edso
I see the notice about v2.0 saying I should change the config lines about SOURCE but there are only parameters about specific backends.
So those are really two bugs - the second one being the hint to the the config lines.
I wrote about this on the mailing list one month ago - but looking at its archive now I guess that was a rather bad idea.
duply lokal status
Start duply v2.0.2, time is 2017-07-10 00:35:56.
Using profile '/etc/duply/lokal'.
Using installed duplicity version 0.7.13, python 2.6.8, gpg 2.0.9 (Home: ~/.gnupg), awk 'GNU Awk 3.1.8', grep 'grep (GNU grep) 2.7', bash '3.2.51(1)-release (i586-suse-linux-gnu)'.
Checking TEMP_DIR '/tmp' is a folder and writable (OK)
Test - En/Decryption skipped. (GPG disabled)
/usr/local/bin/duply: line 2231: CMDS: bad array subscript
--- Start running command STATUS at 00:35:57.118 ---
Another duplicity instance is already running with this archive directory
00:35:57.573 Task 'STATUS' failed with exit code '23'.
--- Finished state FAILED 'code 23' at 00:35:57.573 - Runtime 00:00:00.454 ---
Actually looking at the source code
I propose this fix:
Wolfgang,
weird my bash '4.3.30(1)-release (i686-pc-linux-gnu)', does not complain. btw. you should really update bash because of
https://de.wikipedia.org/wiki/Shellshock_(Sicherheitsl%C3%BCcke)
can you check if
get prev cnd, cnd are skipped pseudocmds
prevno=$(( $CMD_NO - 1 ))
[ "$prevno" -ge 0 ] && is_condition "${CMDS[$prevno]}" && CND_PREV=${CMDS[$prevno]}
works as well for you? seems more elegant to me.. thx ede
On 10.07.2017 00:52, Wolfgang Rohdewald wrote:
Your proposal does not set CMD_VALUE anymore. But it is needed further down.
did you test it? does it work? works for me ;)
wrt. CMD_VALUE
can you show me where it is needed further down? i am sure it is simply used as a temp var to make the code more readable.
..ede/duply.net
On 20.07.2017 09:12, Wolfgang Rohdewald wrote:
You are absolutely right. Your patch works.
must have been one of my good days. will be in the next release.. i'll close the ticket then.. ede
On 20.07.2017 12:14, Wolfgang Rohdewald wrote: