Skip to contentSkip to conversation

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

PATCH New Fabrice Fontaine 3 participants 3 messages May 20, 2020 – Oct 28, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---
 support/scripts/apply-patches.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
support/scripts/apply-patches.sh +2 -2
index 66fef262ee..80e2264497 100755
@@ -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
Signature · 1 line
2.26.2
#1 lore raw

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

Quoted 7 lines · On Wed, 20 May 2020 21:30:45 +0200 Fabrice Fontaine…

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."

Quoted 7 lines

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

---
 support/scripts/apply-patches.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

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

Quoted 15 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Quoted 10 lines · On Wed, 20 May 2020 21:30:45 +0200 Fabrice Fontaine…

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

Quoted 6 lines
Quoted 4 lines

---
support/scripts/apply-patches.sh | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks.

Committed to 2020.02.x and 2020.08.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard