[PATCH] Skip the 'copyright-check' on -maint branches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The maint branches will often have out of date copyright headers
so we must skip the 'sc_copyright_check' rule there.

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 cfg.mk | 11 +++++++++++
 1 file changed, 11 insertions(+)

Perhaps there's a better way to detect -maint branches than the
logic I tried.

diff --git a/cfg.mk b/cfg.mk
index 207dfeb..47c7798 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -88,6 +88,17 @@ else
 distdir: sc_vulnerable_makefile_CVE-2012-3386.z
 endif
 
+GIT_BRANCH := $(shell if test -d $(srcdir)/.git; then \
+		cd $(srcdir) && \
+		(git status -s -b | grep '\#\#' | \
+		sed -e 's/.*-maint/-maint/'); fi)
+
+# We fully expect -maint branches to have out of date
+# copyright dates, so we must skip that check
+ifeq ($(GIT_BRANCH),-maint)
+    local-checks-to-skip += sc_copyright_check
+endif
+
 # Files that should never cause syntax check failures.
 VC_LIST_ALWAYS_EXCLUDE_REGEX = \
   (^(HACKING|docs/(news\.html\.in|.*\.patch))|\.po)$$
-- 
1.8.5.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]