linux-perf: Fix build-time check for unversioned files

The current check has never worked because the find -path predicate
matches against the whole path, including the given root.  In this
case that is $DESTDIR which always includes the version string.
Change to use cd before find.

Also, check all non-directories rather than all entries with "perf" in
the name.
This commit is contained in:
Ben Hutchings 2018-12-18 17:01:34 +00:00
parent 9fdbef722e
commit aaa2152dc5
2 changed files with 5 additions and 1 deletions

4
debian/changelog vendored
View File

@ -1,7 +1,11 @@
linux (4.19.9-2) UNRELEASED; urgency=medium
[ Uwe Kleine-König ]
* [arm] Fix probing of 3rd gpio device on Armada 370.
[ Ben Hutchings ]
* linux-perf: Fix build-time check for unversioned files
-- Uwe Kleine-König <ukleinek@debian.org> Mon, 17 Dec 2018 11:27:32 +0100
linux (4.19.9-1) unstable; urgency=medium

View File

@ -76,6 +76,6 @@ endif
$(DESTDIR)/usr/share/bash-completion/completions
rmdir --ignore-fail-on-non-empty $(DESTDIR)/etc
# Check for unversioned files that are likely to result in file conflicts
! find $(DESTDIR) -name '*perf*' \! -path '*[_-]$(VERSION)*' | grep .
cd $(DESTDIR) && ! find \! -type d \! -path '*[_-]$(VERSION)*' | grep .
endif # !nopython