X-Git-Url: http://andersk.mit.edu/gitweb/config-package-dev.git/blobdiff_plain/9350e9766b5a36e42b58140f18add1f6bab6b49c..02209392cbd41802e17bb4c6ded921594bb5d609:/divert.mk diff --git a/divert.mk b/divert.mk index 577021d..9ad61ca 100644 --- a/divert.mk +++ b/divert.mk @@ -21,7 +21,9 @@ # config-package.mk. # divert.mk handles the low-level diversion logic. It includes -# divert.sh.in in the postinst and prerm scripts, and adds +# divert.sh.in in the postinst and prerm scripts, and adds calls to the +# functions in divert.sh.in to add and remove diversions and symlinks at +# the appropriate points. ifndef _cdbs_rules_divert _cdbs_rules_divert = 1 @@ -53,7 +55,7 @@ endif # foo.divert.divert-orig divert_files_replace_name = $(shell echo $(1) | perl -pe 's/(.*)\Q$(DEB_DIVERT_EXTENSION)\E/$$1$(2)/') -# Transform a full path into the path it should be diverted to if it's +# Encode a full path into the path it should be diverted to if it's # removed remove_files_name = /usr/share/$(cdbs_curpkg)/$(shell $(DEB_DIVERT_ENCODER) $(1)) @@ -99,7 +101,7 @@ $(patsubst %,debian-divert/%,$(DEB_DIVERT_PACKAGES)) :: debian-divert/%: fi;) \ sed 's/#PACKAGE#/$(cdbs_curpkg)/g; s/#DEB_DIVERT_EXTENSION#/$(DEB_DIVERT_EXTENSION)/g' $(DEB_DIVERT_SCRIPT); \ $(if $(divert_files_thispkg), \ - echo 'if [ "$$1" = "remove" ]; then'; \ + echo 'if [ "$$1" = "remove" ] || [ "$$1" = "deconfigure" ]; then'; \ $(foreach file,$(call reverse_dh_compat_6,$(divert_files)), \ echo " undivert_unlink $(call divert_files_replace_name,$(file), )";) \ $(foreach file,$(call reverse_dh_compat_6,$(divert_remove_files)), \ @@ -117,8 +119,8 @@ $(patsubst %,debian-divert/%,$(DEB_DIVERT_PACKAGES)) :: debian-divert/%: # and Conflicts: lists. This prevents two packages diverting the same # file from being installed simultaneously (it cannot work, and this # produces a much less ugly error). Requires in debian/control: -# Provides: $(diverted-files) -# Conflicts: $(diverted-files) +# Provides: ${diverted-files} +# Conflicts: ${diverted-files} set -e; \ { \ echo -n "diverted-files="; \