From: Javier BĂ©rtoli Date: Wed, 20 Sep 2017 22:51:54 +0000 (-0300) Subject: Add parameter for FPM so it removes old directories on upgrade X-Git-Tag: 1.1.0~34^2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/ce0a97360ac919f6a6a1a8d155bcb705069d9dbb Add parameter for FPM so it removes old directories on upgrade refs #12271 --- diff --git a/build/run-library.sh b/build/run-library.sh index cf7755b68d..5fc494cdf5 100755 --- a/build/run-library.sh +++ b/build/run-library.sh @@ -365,6 +365,15 @@ fpm_build () { COMMAND_ARR+=(--deb-ignore-iteration-in-dependencies) fi + # 12271 - As FPM-generated packages don't include scripts by default, the + # packages cleanup on upgrade depends on files being listed on the %files + # section in the generated SPEC files. To remove DIRECTORIES, they need to + # be listed in that sectiontoo, so we need to add this parameter to properly + # remove lingering dirs. + if [[ rpm = "$FORMAT" ]]; then + COMMAND_ARR+=('--rpm-auto-add-directories') + fi + if [[ "${DEBUG:-0}" != "0" ]]; then COMMAND_ARR+=('--verbose' '--log' 'info') fi