[kernel/f16] copy baserelease sanity check from rawhide

Chuck Ebbert cebbert at fedoraproject.org
Sat Nov 12 00:30:50 UTC 2011


commit 955d50cbe0d23995c2fdc351d218dd5adb12c0de
Author: Chuck Ebbert <cebbert at redhat.com>
Date:   Fri Nov 11 19:29:51 2011 -0500

    copy baserelease sanity check from rawhide

 .gitignore  |    1 +
 kernel.spec |   12 ++++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 2a45958..98392fa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,5 @@ linux-*.tar.bz2
 patch-*.bz2
 clog
 *.rpm
+*.orig
 kernel-[23].*/
diff --git a/kernel.spec b/kernel.spec
index 26ecb02..05fd6e6 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -48,8 +48,11 @@ Summary: The Linux kernel
 # reset this by hand to 1 (or to 0 and then use rpmdev-bumpspec).
 # scripts/rebase.sh should be made to do that for you, actually.
 #
-# For non-released -rc kernels, this will be prepended with "0.", so
-# for example a 3 here will become 0.3
+# NOTE: baserelease must be > 0 or bad things will happen if you switch
+#       to a released kernel (released version will be < rc version)
+#
+# For non-released -rc kernels, this will be appended after the rcX and
+# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
 #
 %global baserelease 1
 %global fedora_build %{baserelease}
@@ -1009,6 +1012,11 @@ exit 1
 %endif
 %endif
 
+%if !%{baserelease}
+echo "baserelease must be greater than zero"
+exit 1
+%endif
+
 # more sanity checking; do it quietly
 if [ "%{patches}" != "%%{patches}" ] ; then
   for patch in %{patches} ; do


More information about the scm-commits mailing list