Whamcloud - gitweb
LU-9850 patchless client should conflict patched kernel
[fs/lustre-release.git] / contrib / lbuild / lbuild-rhel7
index d824b5b..6045984 100644 (file)
@@ -109,7 +109,7 @@ cleanup_rpmmacros() {
        sed -i "/^%kernel_module_package/,/^)}$/d" $RMAC
 }
 
-apply_kmod_requires() {
+apply_kmod_requires_conflicts() {
     # until we have achieved full kABI compatibility we need to
     # restrict the kernel range that can be used to the kernel
     # version from the RHEL minor release
@@ -120,4 +120,9 @@ apply_kmod_requires() {
     local linuxrelease=${kver##*-}
     local kabiminor=${linuxrelease%%.*}
     echo "Requires:       kernel < $linuxversion-$((kabiminor+1)), kernel >= $linuxversion-$((kabiminor))" >> rpm/kmp-lustre.preamble
+    if $PATCHLESS; then
+        # don't allow the patched kernel to be considered as a valid kernel
+        # for the patchless client
+        echo "Conflicts:      kernel-lustre" >> rpm/kmp-lustre.preamble
+    fi
 }