From ce0a97360ac919f6a6a1a8d155bcb705069d9dbb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Javier=20B=C3=A9rtoli?= Date: Wed, 20 Sep 2017 19:51:54 -0300 Subject: [PATCH] Add parameter for FPM so it removes old directories on upgrade refs #12271 --- build/run-library.sh | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- 2.30.2