rpms/kernel/F-10 kernel.spec,1.1318,1.1319
Chuck Ebbert
cebbert at fedoraproject.org
Fri Apr 10 21:26:28 UTC 2009
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1337
Modified Files:
kernel.spec
Log Message:
copy sanity checks from F-11
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-10/kernel.spec,v
retrieving revision 1.1318
retrieving revision 1.1319
diff -u -r1.1318 -r1.1319
--- kernel.spec 9 Apr 2009 20:43:30 -0000 1.1318
+++ kernel.spec 10 Apr 2009 21:25:58 -0000 1.1319
@@ -888,14 +888,28 @@
%endif
%endif
+# more sanity checking; do it quietly
+for patch in %{patches} ; do
+ if [ ! -f $patch ] ; then
+ echo "ERROR: Patch ${patch##/*/} listed in specfile but is missing"
+ exit 1
+ fi
+done 2>/dev/null
+
patch_command='patch -p1 -F1 -s'
ApplyPatch()
{
local patch=$1
shift
if [ ! -f $RPM_SOURCE_DIR/$patch ]; then
- exit 1;
+ exit 1
fi
+ if ! egrep "^Patch[0-9]+: $patch\$" %{_specdir}/%{name}.spec ; then
+ if [ "${patch:0:10}" != "patch-2.6." ] ; then
+ echo "ERROR: Patch $patch not listed as a source patch in specfile"
+ exit 1
+ fi
+ fi 2>/dev/null
case "$patch" in
*.bz2) bunzip2 < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
*.gz) gunzip < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
More information about the fedora-extras-commits
mailing list