--- /dev/null
+--- rpm-5.4.10/rpmio/macro.c~ 2012-09-17 14:07:24.201198493 +0200
++++ rpm-5.4.10/rpmio/macro.c 2012-09-17 18:10:28.221354435 +0200
+@@ -3054,6 +3054,17 @@
+ #endif
+
+ *compressed = COMPRESSED_NOT;
++#if defined(RPM_VENDOR_PLD)
++ /*
++ * Workaround for misleading message:
++ * error: File %PATCH666: No such file or directory
++ * It happens when there is no "PatchXXX: " definition
++ * and spec contains commented out %patchXXX macro
++ * http://git.pld-linux.org/gitweb.cgi/packages/kernel.git/commitdiff/5d3a3ea257d7f88e59d0ad93c20cc8448fb42f3d
++ */
++ if (strlen(file) > 6 && strncasecmp(file, "%PATCH", 6))
++ return 0;
++#endif
+
+ #if defined(RPM_VENDOR_OPENPKG) || defined(RPM_VENDOR_FEDORA) || defined(RPM_VENDOR_MANDRIVA) /* extension-based-compression-detection */
+ file_len = strlen(file);
Patch45: %{name}-pattern_Release.patch
Patch46: %{name}-fix-___build_pre-macro.patch
Patch47: %{name}-missing-patch-file-fails-build.patch
+Patch48: %{name}-remove-misleading-missing-patch-message.patch
# Patches imported from Mandriva
%patch45 -p1
%patch46 -p1
%patch47 -p1
+%patch48 -p1
%patch1000 -p1
%patch1001 -p1