Alon Bar-Lev has posted comments on this change. Change subject: core: preserve custom db users permissions on... ......................................................................
Patch Set 5: (2 comments) http://gerrit.ovirt.org/#/c/25552/5/packaging/dbscripts/dbfunc-common.sh File packaging/dbscripts/dbfunc-common.sh: Line 69: Line 70: _dbfunc_common_schema_upgrade Line 71: Line 72: echo "Applying custom users permissions on database objects..." Line 73: dbfunc_psql_die --command="${permissions}" this version is simpler as no need to keep state in global variable or file. worse case permissions will be applied... not sure code complexity is required in this case. Line 74: } Line 75: Line 76: dbfunc_common_schema_refresh() { Line 77: local permissions Line 82: _dbfunc_common_schema_refresh_drop Line 83: _dbfunc_common_schema_refresh_create Line 84: Line 85: echo "Applying custom users permissions on database objects..." Line 86: dbfunc_psql_die --command="${permissions}" what I did consider is to merge these both in to one more complex shell programming... but I do not think it is required... but just to show... something like: _xxx() { local permissions permissions="$(_dbfunc_common_get_custom_user_permissions)" || exit $? eval "$@" dbfunc_psql_die --command="${permissions}" } and use _xxx with some private function, but I do not think this complexity is required at this point either. Line 87: } Line 88: Line 89: # gets the configuration value of the given option name and version. Line 90: # usage: <some variable>=get_config_value <name> <version> -- To view, visit http://gerrit.ovirt.org/25552 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If4ac85dc943fcb6a8f656a8ebeb172023e71c1ec Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Alon Bar-Lev <[email protected]> Gerrit-Reviewer: Eli Mesika <[email protected]> Gerrit-Reviewer: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: Yaniv Dary <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
