Skip to content

Commit 6fed99a

Browse files
committed
Port recent features to CDBS for parity
Make equivalent changes the CDBS codebase for: - transform: let users pick local files as source - <package>.displace-extension can now contain ".extension" or "extension"
1 parent 61c7bc8 commit 6fed99a

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

check-files.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,14 @@ $(call debian_check_files,%): $(call debian_check_files_tmp,%)
5959
# There is some wrangling here because the formats of these sources differ.
6060
$(call debian_check_files_tmp,%): target = $(call undebian_check_files_tmp,$@)
6161
$(call debian_check_files_tmp,%): name = $(call debian_check_files_source,$(target))
62-
$(call debian_check_files_tmp,%): truename = $(shell dpkg-divert --truename $(name))
63-
$(call debian_check_files_tmp,%): package = $(shell LC_ALL=C dpkg -S $(name) | sed -n '/^diversion by /! s/: .*$$// p')
62+
$(call debian_check_files_tmp,%): truename = $(if $(filter /%,$(name)),$(shell dpkg-divert --truename $(name)),$(name))
63+
$(call debian_check_files_tmp,%): package = $(if $(filter /%,$(name)),$(shell LC_ALL=C dpkg -S $(name) | sed -n '/^diversion by /! s/: .*$$// p'),x)
6464
$(call debian_check_files_tmp,%): $(truename)
6565
[ -n "$(package)" ]
6666
mkdir -p $(@D)
6767
cp "$(truename)" $@
6868
set -e; \
69+
case "$(name)" in /*) ;; *) exit 0;; esac; \
6970
md5sums="$$(dpkg-query --control-path $(package) md5sums 2>/dev/null)" || \
7071
md5sums=/var/lib/dpkg/info/$(package).md5sums; \
7172
md5=$$(dpkg-query --showformat='$${Conffiles}\n' --show $(package) | \

displace.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ DEB_DISPLACE_EXTENSION = $(DEB_DIVERT_EXTENSION)
5858
endif
5959
endif
6060

61+
ifeq ($(filter .%,$(DEB_DISPLACE_EXTENSION)),)
62+
DEB_DISPLACE_EXTENSION := .$(DEB_DISPLACE_EXTENSION)
63+
endif
64+
6165
# Replace only the last instance of DEB_DISPLACE_EXTENSION in the
6266
# filename, to make it possible to displace /path/foo.divert to
6367
# foo.divert.divert-orig

0 commit comments

Comments
 (0)