rpms/kernel/devel kernel.spec,1.1512,1.1513
Chuck Ebbert
cebbert at fedoraproject.org
Fri Apr 10 21:32:20 UTC 2009
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2603
Modified Files:
kernel.spec
Log Message:
check for missing Patch files in make prep
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1512
retrieving revision 1.1513
diff -u -r1.1512 -r1.1513
--- kernel.spec 9 Apr 2009 21:28:21 -0000 1.1512
+++ kernel.spec 10 Apr 2009 21:31:49 -0000 1.1513
@@ -873,17 +873,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 scm-commits
mailing list