--- 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) == 0)) + return 0; +#endif #if defined(RPM_VENDOR_OPENPKG) || defined(RPM_VENDOR_FEDORA) || defined(RPM_VENDOR_MANDRIVA) /* extension-based-compression-detection */ file_len = strlen(file);