#110 Issue closed: Get rid of OS_VERSION and OS_VENDOR where possible

Labels: cleanup, discuss / RFC

dagwieers opened issue at 2012-06-14 21:57:

Something discussed before that I am adding so we don't forget about it.

Currently some scripts are written for a specific distribution, or even a specific distribution release and that's something that's hard to maintain in general. No single distribution (version) should be handled uniquely, but rather implementations should be based on capabilities.

Why ? Because it's hard to maintain very specific exceptions, especially since we don't know (in advance, or in retrospect) whether other distribution (versions) suffer from the very same problem. That's why adding a specific path to a list of paths in general is a better solution than to create a list of paths per distribution (version), even if the majority of the paths are not specific to one single distribution. (Of course we should document each and every item in a listing like that )

Currently OS_VERSION is mostly unused, and we should get rid of the very few exceptions in the code.

OS_VENDOR however is used widespread and getting rid of these is probably a long-term work.

gdha commented at 2014-01-08 11:54:

List of occurrences:

$ grep -r OS_VERSION . | cut -d: -f1 | sort -u

./doc/user-guide/02-getting-started.txt
./packaging/rpm/rear.spec
./usr/share/rear/build/default/99_update_os_conf.sh
./usr/share/rear/conf/default.conf
./usr/share/rear/finalize/Linux-i386/23_run_efibootmgr.sh
./usr/share/rear/lib/config-functions.sh
./usr/share/rear/lib/dump-workflow.sh

and

$ grep -r OS_VENDOR . | cut -d: -f1 | sort -u
./build/default/99_update_os_conf.sh
./conf/default.conf
./finalize/default/89_finish_checks.sh
./finalize/Linux-i386/23_run_efibootmgr.sh
./lib/config-functions.sh
./lib/dump-workflow.sh
./lib/framework-functions.sh
./lib/validate-workflow.sh
./rescue/default/01_merge_skeletons.sh

IMO we have no issue (anymore)

gdha commented at 2014-04-14 09:09:

no feedback received - assuming we all agree then - ok to close


[Export of Github issue for rear/rear.]