From 228280d8334f2bcac346e5f0d3ea802af7f22862 Mon Sep 17 00:00:00 2001 From: Domen Vrankar Date: Sat, 5 Nov 2016 11:26:48 +0100 Subject: CPack/RPM prevent special tags from being removed Some tags are not listed by rpmbuild querytags even though they are supported. Ignore those tags during the removal of unsupported tags. --- Modules/CPackRPM.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 20005ed..39697f0 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -1868,7 +1868,11 @@ function(cpack_rpm_generate_package) if(DEFINED CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}) cmake_policy(PUSH) cmake_policy(SET CMP0057 NEW) - if(NOT _RPM_SPEC_HEADER IN_LIST RPMBUILD_TAG_LIST) + # Prefix can be replaced by Prefixes but the old version stil works so we'll ignore it for now + # Requires* is a special case because it gets transformed to Requires(pre/post/preun/postun) + # Auto* is a special case because the tags can not be queried by querytags rpmbuild flag + set(special_case_tags_ PREFIX REQUIRES_PRE REQUIRES_POST REQUIRES_PREUN REQUIRES_POSTUN AUTOPROV AUTOREQ AUTOREQPROV) + if(NOT _RPM_SPEC_HEADER IN_LIST RPMBUILD_TAG_LIST AND NOT _RPM_SPEC_HEADER IN_LIST special_case_tags_) cmake_policy(POP) message(AUTHOR_WARNING "CPackRPM:Warning: ${_RPM_SPEC_HEADER} not " "supported in provided rpmbuild. Tag will not be used.") -- cgit v0.12