• Jérome Perrin's avatar
    stack/erp5: fix error detection and error message with repozo on py3 · 7cafd1c8
    Jérome Perrin authored
    The syntax to compare strings is
    
          STRING1 = STRING2
                         True if the strings are equal.
          STRING1 != STRING2
                         True if the strings are not equal.
    
    STRING1=STRING2 is not a valid syntax for strings comparisons.
    
    This is same fix as 6cf1769d (ERP5: fix handling of repozo restoration
    failure, 2024-10-24) and also a fix to a wrong error message, because
    this is not restoration script, it's backup script.
    diff --git a/stack/erp5/buildout.hash.cfg b/stack/erp5/buildout.hash.cfg
    index e0a5ca902..edaf7a9e7 100644
    --- a/stack/erp5/buildout.hash.cfg
    +++ b/stack/erp5/buildout.hash.cfg
    @@ -78,7 +78,7 @@ md5sum = 1333d2fc21f64da4010a4eafea59d141
    
     [template-zeo]
     filename = instance-zeo.cfg.in
    -md5sum = 6513f1ecd9a2daaf36ca720f15932ae3
    +md5sum = 025f11aef75bf00d61e90c6734ce13d8
    
     [template-zeo-conf]
     filename = zeo.conf.in
    diff --git a/stack/erp5/instance-zeo.cfg.in b/stack/erp5/instance-zeo.cfg.in
    index 96d5b1af1..7a0be8902 100644
    --- a/stack/erp5/instance-zeo.cfg.in
    +++ b/stack/erp5/instance-zeo.cfg.in
    @@ -108,9 +108,9 @@ inline =
         --file="$zodb_directory/$zodb_path"
    
       CURRENT_EXIT_CODE=$?
    -  if [ ! "$CURRENT_EXIT_CODE"="0" ]; then
    +  if [ $CURRENT_EXIT_CODE != 0 ]; then
         EXIT_CODE="$CURRENT_EXIT_CODE"
    -    echo "$storage_name Backup restoration failed."
    +    echo "$storage_name Backup failed."
       fi
       {%   endfor -%}
       {% endfor -%}
    7cafd1c8
buildout.hash.cfg 3.01 KB