rpms/kernel/F-11 kernel.spec,1.1528,1.1529
Chuck Ebbert
cebbert at fedoraproject.org
Fri Apr 10 20:26:56 UTC 2009
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17989
Modified Files:
kernel.spec
Log Message:
more sanity checking: missing source files
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/kernel.spec,v
retrieving revision 1.1528
retrieving revision 1.1529
diff -u -r1.1528 -r1.1529
--- kernel.spec 9 Apr 2009 21:03:27 -0000 1.1528
+++ kernel.spec 10 Apr 2009 20:26:25 -0000 1.1529
@@ -913,17 +913,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
- [ "${patch:0:10}" != "patch-2.6." ] && echo "Patch $patch not listed in specfile" && exit 1;
- fi
+ 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