Author: thl
Update of /cvs/free/rpms/kmodtool/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv15455
Modified Files:
kmodtool-kmodtool kmodtool.spec
Log Message:
* Thu Feb 26 2009 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 1-17
- add support for obsoletes to kmodtool
Index: kmodtool-kmodtool
===================================================================
RCS file: /cvs/free/rpms/kmodtool/devel/kmodtool-kmodtool,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- kmodtool-kmodtool 1 Feb 2009 12:59:44 -0000 1.4
+++ kmodtool-kmodtool 26 Feb 2009 13:51:15 -0000 1.5
@@ -26,7 +26,7 @@
shopt -s extglob
myprog="kmodtool-${repo}"
-myver="0.11.4"
+myver="0.11.5"
kmodname=
build_kernels="current"
@@ -76,6 +76,14 @@
# same requires and provides as a kmods package would have
Requires: ${kmodname}-kmod-common >= %{?epoch:%{epoch}:}%{version}
Provides: ${kmodname}-kmod = %{?epoch:%{epoch}:}%{version}-%{release}
+EOF
+
+ if [[ ${obsolete_name} ]]; then
+ echo "Provides: akmod-${obsolete_name} = ${obsolete_version}"
+ echo "Obsoletes: akmod-${obsolete_name} < ${obsolete_version}"
+ fi
+
+ cat <<EOF
%description -n akmod-${kmodname}
This package provides the akmod package for the ${kmodname} kernel modules.
@@ -102,6 +110,13 @@
Provides: kmod-${kmodname}-smp = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: kmod-${kmodname}-PAE = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: akmod-${kmodname} = %{?epoch:%{epoch}:}%{version}-%{release}
+EOF
+
+ if [[ ${obsolete_name} ]]; then
+ echo "Provides: kmod-${obsolete_name} = ${obsolete_version}"
+ echo "Obsoletes: kmod-${obsolete_name} < ${obsolete_version}"
+ fi
+cat <<EOF
%description -n kmod-${kmodname}${dashvariant}
This is a meta-package without payload which sole purpose is to require the
@@ -137,10 +152,12 @@
Requires: ${kmodname}-kmod-common >= %{?epoch:%{epoch}:}%{version}
Requires(post): /sbin/depmod
Requires(postun): /sbin/depmod
-
EOF
-
+ if [[ ${obsolete_name} ]]; then
+ echo "Provides: kmod-${obsolete_name}-${kernel_uname_r} =
${obsolete_version}"
+ echo "Obsoletes: kmod-${obsolete_name}-${kernel_uname_r} <
${obsolete_version}"
+ fi
# second part
if [[ ! "${customkernel}" ]]; then
@@ -188,6 +205,14 @@
Provides: ${kmodname}-kmod = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: kmod-${kmodname}-${kernel_uname_r} >=
%{?epoch:%{epoch}:}%{version}-%{release}
+EOF
+
+ if [[ ${obsolete_name} ]]; then
+ echo "Provides: kmod-${obsolete_name}${kernel_variant} =
${obsolete_version}"
+ echo "Obsoletes: kmod-${obsolete_name}${kernel_variant} <
${obsolete_version}"
+ fi
+
+ cat <<EOF
%description -n kmod-${kmodname}${kernel_variant}
This is a meta-package without payload which sole purpose is to require the
@@ -307,6 +332,22 @@
shift
noakmod="true"
;;
+ --obsolete-name)
+ shift
+ if [[ ! "${1}" ]] ; then
+ error_out 2 "Please provide the name of the kmod to obsolte together with
--obsolete-name" >&2
+ fi
+ obsolete_name="${1}"
+ shift
+ ;;
+ --obsolete-version)
+ shift
+ if [[ ! "${1}" ]] ; then
+ error_out 2 "Please provide the version of the kmod to obsolte together with
--obsolete-version" >&2
+ fi
+ obsolete_version="${1}"
+ shift
+ ;;
--target)
shift
target="${1}"
@@ -355,6 +396,8 @@
error_out 2 "please pass kmodname with --kmodname"
elif [[ ! "${kernels_known_variants}" ]] ; then
error_out 2 "could not determine known variants"
+elif ( [[ "${obsolete_name}" ]] && [[ ! "${obsolete_version}"
]] ) || ( [[ ! "${obsolete_name}" ]] && [[
"${obsolete_version}" ]] ) ; then
+ error_out 2 "you need to provide both --obsolete-name and
--obsolete-version"
fi
# go
Index: kmodtool.spec
===================================================================
RCS file: /cvs/free/rpms/kmodtool/devel/kmodtool.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- kmodtool.spec 1 Feb 2009 12:59:44 -0000 1.4
+++ kmodtool.spec 26 Feb 2009 13:51:15 -0000 1.5
@@ -1,6 +1,6 @@
Name: kmodtool
Version: 1
-Release: 16%{?dist}
+Release: 17%{?dist}
Summary: Tool for building kmod packages
Group: Development/Tools
@@ -51,6 +51,9 @@
%{_datadir}/%{name}/
%changelog
+* Thu Feb 26 2009 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 1-17
+- add support for obsoletes to kmodtool
+
* Sun Feb 01 2009 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 1-16
- add posttrans hooks to akmod packages, to make akmods build them
after install or update