Ticket #549: allow-undiversion-without-version-check.diff
File allow-undiversion-without-version-check.diff, 2.1 KB (added by broder, 15 years ago) |
---|
-
divert.mk
72 72 $(foreach file,$(divert_undivert_files), \ 73 73 $(if $(DEB_UNDIVERT_VERSION_$(file)),,\ 74 74 echo "ERROR! Missing undivert version for $(file)!">&2; exit 1;) \ 75 $(if $(DEB_UNDIVERT_VERSION_$(file)),all,\ 76 echo -n " always_undivert_unlink $(call divert_files_replace_name,$(file), )") \ 75 77 echo -n " if [ -n \"\$$2\" ] && dpkg --compare-versions \"\$$2\" '<<' "; \ 76 78 echo "'$(DEB_UNDIVERT_VERSION_$(file))'; then"; \ 77 79 echo " undivert_unlink $(call divert_files_replace_name,$(file), )"; \ … … 79 81 $(foreach file,$(divert_unremove_files), \ 80 82 $(if $(DEB_UNREMOVE_VERSION_$(file)),,\ 81 83 echo "ERROR! Missing unremove version for $(file)!">&2; exit 1;) \ 84 $(if $(DEB_UNREMOVE_VERSION_$(file)),all,\ 85 echo -n " always_undivert_unremove $(file) /usr/share/$(cdbs_curpkg)/`$(DEB_DIVERT_ENCODER) $(file)`") \ 82 86 echo -n " if [ -n \"\$$2\" ] && dpkg --compare-versions \"\$$2\" '<<' "; \ 83 87 echo "'$(DEB_UNREMOVE_VERSION_$(file))'; then"; \ 84 88 echo " undivert_unremove $(file)"; \ -
divert.sh.in
107 107 undivert_unlink_divert "$file" 108 108 } 109 109 110 always_undivert_unlink() 111 { 112 file="$1" 113 if dpkg-divert --list "${file}" | grep -Fxq "diversion of ${file} to ${file}${theirs} by ${package}"; then 114 undivert_unlink "$file" 115 fi 116 } 117 118 always_undivert_unremove() 119 { 120 file="$1" 121 removedfile="$2" 122 if dpkg-divert --list "${file}" | grep -Fxq "diversion of ${file} to ${removedfile} by ${package}"; then 123 undivert_unremove "$file" 124 fi 125 } 126