#3340 Issue open
: Error out on removed deprecated features¶
Labels: enhancement
schlomo opened issue at 2024-11-05 17:11:¶
Thinking forward, after we remove a feature that was deprecated in a given version, we need to add the deprecated config variables to a (forever growing) list of obsolete configuration variables that trigger a hard error with an explanation, that this feature was removed in a previous version of ReaR
Siilly idea for implementation:
# check all used config variables against blacklist of removed configs
for var in ${!*} ; do
if InArray $var $blacklist ; then
Error "$var is a deprecated feature that has been removed from ReaR, you'll have to downgrade ReaR to use it"
fi
done
Maybe the blacklist is a text file with the variable name in the first column followed by an explanation and hint about the last usable version
jsmeix commented at 2024-11-06 07:43:¶
The generic issue is what to do when config variables changed,
i.e. when config variables name or syntax or semantics changed.
Examples:
- Meaningless or misleading name changed to a meaningful name.
- Syntax changed from "string of words" to an array.
- Semantics change of one or more config variables together.
Should I create one or more separated issues for such cases
or could we handle all config variables changes
at a single place via this one same issue here?
(But then likely with several pull requests to solve it.)
jsmeix commented at 2024-11-20 12:12:¶
@pcahyna
regarding the ReaR 2.8 release
where in current GitHub master code
ReaR errors out for deprecated things
(in a current git clone https://github.com/rear/rear.git
):
# find usr/sbin/rear usr/share/rear/ -type f \
| xargs grep 'ErrorIfDeprecated' | grep -v ': *#'
usr/share/rear/layout/save/default/950_verify_disklayout_file.sh:
ErrorIfDeprecated gpt_sync_mbr "The 'gpt_sync_mbr' partitioning is no longer supported by SUSE since 2016
usr/share/rear/layout/save/NSR/default/650_check_iso_recoverable.sh:
ErrorIfDeprecated nsr_check_iso_recoverable "Check for Networker Backups conflicts with 'rear checklayout', see https://github.com/rear/rear/issues/3069"
usr/share/rear/prep/GALAXY10/default/001_galaxy10_deprecation.sh:
ErrorIfDeprecated galaxy10 "CommVault Simpana 10 is EOL since 2018 according to https://ma.commvault.com/Support/ProductEOLMessages"
usr/share/rear/prep/GALAXY/default/001_galaxy_deprecation.sh:
ErrorIfDeprecated galaxy "CommVault Galaxy 5 is EOL since 2006 according to https://ma.commvault.com/Support/ProductEOLMessages"
usr/share/rear/prep/GALAXY7/default/001_galaxy7_deprecation.sh:
ErrorIfDeprecated galaxy7 "CommVault Simpana 7 is EOL since 2014 according to https://ma.commvault.com/Support/ProductEOLMessages"
@pcahyna
if you think it is needed in the above listed cases,
I could change the ErrorIfDeprecated function for ReaR 2.8
to show only a LogPrintError message that also tells
that in ReaR 3.0 it will error out for deprecated features.
[Export of Github issue for rear/rear.]