On Friday 21 April 2017 05:11 PM, Niels Thykier wrote: > Apparently "[ -d ${foo} ]" returns 0 even if foo is unset. Fortunately, > there are no "standard" directories in the list of dirs being removed, > but I would prefer if the next upload had an explicit check for > "${gitlab_data_dir}" being non-empty. Just to be future-proof. Added it in git repo. Will upload once current version migrates. diff --git a/debian/postrm b/debian/postrm index 87340ef6..b563faed 100644 --- a/debian/postrm +++ b/debian/postrm @@ -58,9 +58,11 @@ case "$1" in # Check if we should remove data? db_get gitlab/purge_data if [ "${RET}" = "true" ]; then - if [ -d ${gitlab_data_dir} ]; then + if [ -n "${gitlab_data_dir}" ] && [ -d ${gitlab_data_dir} ]; then for i in shared public db repositories secrets.yml Gemfile.lock; do - if [ -e ${gitlab_data_dir}/$i ]; then rm -rf ${gitlab_data_dir}/$i; fi + if [ -e ${gitlab_data_dir}/$i ]; then + echo "Removing: ${gitlab_data_dir}/$i" + rm -rf ${gitlab_data_dir}/$i; fi done fi for i in ${gitlab_log_dir} ${gitlab_cache_path} ${gitlab_pid_path} \ > I will unblock with an ageing of 5 days to give other people a chance to > review it and provide comments before it migrates. Again, this is not > my strongest suit. But tracker.debian.org is showing 10 days still.
Attachment:
signature.asc
Description: OpenPGP digital signature