瀏覽代碼

support/scripts/apply-patches.sh: manage uncompression

Extract from bug report:

"Code line 120 to line 128 is to check whether the patch containing
"rename from" and "rename to". But it directly use grep to find,
ignoring the patch may be a tar file or else. It can only work on patch
of textfile form."

Fixes:
 - https://bugs.buildroot.org/show_bug.cgi?id=11931

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Fabrice Fontaine 4 年之前
父節點
當前提交
35c3a1e693
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      support/scripts/apply-patches.sh

+ 2 - 2
support/scripts/apply-patches.sh

@@ -113,8 +113,8 @@ function apply_patch {
         echo "  to be applied  : ${path}/${patch}"
         exit 1
     fi
-    if grep -q "^rename from" ${path}/${patch} && \
-       grep -q "^rename to" ${path}/${patch} ; then
+    if ${uncomp} "${path}/$patch" | grep -q "^rename from" && \
+       ${uncomp} "${path}/$patch" | grep -q "^rename to" ; then
         echo "Error: patch contains some renames, not supported by old patch versions"
         exit 1
     fi