diff options
author | Chuck Ebbert <cebbert@redhat.com> | 2011-11-07 08:46:25 -0500 |
---|---|---|
committer | Chuck Ebbert <cebbert@redhat.com> | 2011-11-07 08:46:25 -0500 |
commit | 05e763b50e0db1ef9c00a211e3c6a92f5032190a (patch) | |
tree | 753e9c4ba663a161544a212046a7b80b22136037 /kernel.spec | |
parent | 7cfa6899ffd5580ad97e1f840edee9cf5ca51eab (diff) | |
download | kernel-05e763b50e0db1ef9c00a211e3c6a92f5032190a.tar.gz kernel-05e763b50e0db1ef9c00a211e3c6a92f5032190a.tar.xz kernel-05e763b50e0db1ef9c00a211e3c6a92f5032190a.zip |
Add sanity check for baserelease
Diffstat (limited to 'kernel.spec')
-rw-r--r-- | kernel.spec | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/kernel.spec b/kernel.spec index e5a4fc6db..6c240e481 100644 --- a/kernel.spec +++ b/kernel.spec @@ -48,10 +48,13 @@ 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) # -%global baserelease 0 +# 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} # base_sublevel is the kernel version we're starting with and patching @@ -968,6 +971,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 |