diff options
author | Guido Günther <agx@sigxcpu.org> | 2017-01-11 13:04:37 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2017-01-11 14:17:18 +0100 |
commit | 67d8b9f44b089eb04ae4ce54c03a0e06d751de30 (patch) | |
tree | 6a7bee400923de75b586481cdf647c75452f8489 /debian/git-buildpackage.preinst | |
parent | 5fb074984bad0500245bd491e0a1eea9c69b0f8f (diff) |
Move default gbp.conf back to the right location
0.8.9 placed gbp.conf at /etc/git-buildpackage/gbp.conf/gbp.conf. Move
the file back to the correct location.
Closes: #850937
Thanks: Luca Boccassi
Diffstat (limited to 'debian/git-buildpackage.preinst')
-rw-r--r-- | debian/git-buildpackage.preinst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/debian/git-buildpackage.preinst b/debian/git-buildpackage.preinst index a3f6b2b2..e7988c2f 100644 --- a/debian/git-buildpackage.preinst +++ b/debian/git-buildpackage.preinst @@ -13,11 +13,26 @@ set -e # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package +cleanup_misplaced() +{ + ver=$1 + misplaced=/etc/git-buildpackage/gbp.conf/gbp.conf + gbp_conf=/etc/git-buildpackage/gbp.conf + if [ -f "${misplaced}" ] && [ "$ver" = "0.8.9" ]; then + mv -f "${misplaced}" "${gbp_conf}.dpkg-bak" + if ! rmdir "${gbp_conf}"; then + echo "Cannot remove bad dir ${gbp_conf}, trying rename" 1>&2 + mv -f "${gbp_conf}" "${gbp_conf}".dpkg-dir-bak + fi + mv -f ${gbp_conf}.dpkg-bak ${gbp_conf} + fi +} case "$1" in install|upgrade) dpkg-maintscript-helper rm_conffile \ /etc/bash_completion.d/git-buildpackage 0.6.34~ git-buildpackage -- "$@" + cleanup_misplaced $2 ;; abort-upgrade) |