]> andersk Git - config-package-dev.git/commitdiff
Make check-files aware of multiarch
authorAnders Kaseorg <andersk@mit.edu>
Mon, 22 Aug 2011 02:43:56 +0000 (22:43 -0400)
committerAnders Kaseorg <andersk@mit.edu>
Tue, 25 Oct 2011 23:41:44 +0000 (19:41 -0400)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
check-files.mk
debian/changelog

index 70a58205f157e80c461c9c99a2fee36a5e1a193c..d117c9ab29ed90986d674e08e04a462c72e3702e 100644 (file)
@@ -61,19 +61,21 @@ $(call debian_check_files,%): $(call debian_check_files_tmp,%)
 $(call debian_check_files_tmp,%): target = $(call undebian_check_files_tmp,$@)
 $(call debian_check_files_tmp,%): name = $(call debian_check_files_check,$(target))
 $(call debian_check_files_tmp,%): truename = $(shell /usr/sbin/dpkg-divert --truename $(name))
-$(call debian_check_files_tmp,%): package = $(shell dpkg -S $(name) | grep -v "^diversion by" | cut -f1 -d:)
+$(call debian_check_files_tmp,%): package = $(shell dpkg -S $(name) | sed -n '/^diversion by /! s/: .*$$// p')
 $(call debian_check_files_tmp,%): $(truename)
        [ -n "$(package)" ]
        mkdir -p $(@D)
        cp "$(truename)" $@
        set -e; \
+       md5sums="$$(dpkg-query --control-path $(package) md5sums 2>/dev/null)" || \
+           md5sums=/var/lib/dpkg/info/$(package).md5sums; \
        md5=$$(dpkg-query --showformat='$${Conffiles}\n' --show $(package) | \
            sed -n 's,^ $(name) \([0-9a-f]*\)$$,\1  $@, p'); \
        if [ -n "$$md5" ]; then \
            echo "$$md5" | md5sum -c; \
-       elif [ -e /var/lib/dpkg/info/$(package).md5sums ]; then \
+       elif [ -e "$$md5sums" ]; then \
            md5=$$(sed -n 's,^\([0-9a-f]*\)  $(patsubst /%,%,$(name))$$,\1  $@, p' \
-               /var/lib/dpkg/info/$(package).md5sums); \
+               "$$md5sums"); \
            [ -n "$$md5" ] && echo "$$md5" | md5sum -c; \
        else \
            echo "config-package-dev: warning: $(package) does not include md5sums!"; \
index 8340428644e682b52e9a75f95e23b7db58446fa4..60283e01d2eb38c16dfbda8cbf915c758cc7af31 100644 (file)
@@ -1,3 +1,10 @@
+config-package-dev (4.13) UNRELEASED; urgency=low
+
+  * Fix DEB_CHECK_FILES and DEB_TRANSFORM_FILES with non-conffiles in
+    Multi-Arch: same packages.
+
+ -- Anders Kaseorg <andersk@mit.edu>  Sun, 21 Aug 2011 22:41:41 -0400
+
 config-package-dev (4.12) unstable; urgency=low
 
   [ Tim Abbott ]
This page took 0.048255 seconds and 5 git commands to generate.