Blame rpm-4.13.0-autopatch-fix.patch
|
Lubos Kardos |
c235b1 |
From 73ea59e0d53503bb45d5eac9d9792127a6d04c23 Mon Sep 17 00:00:00 2001
|
|
Lubos Kardos |
c235b1 |
From: Thierry Vignaud <thierry.vignaud@gmail.com>
|
|
Lubos Kardos |
c235b1 |
Date: Thu, 17 Sep 2015 04:36:47 -0400
|
|
Lubos Kardos |
c235b1 |
Subject: [PATCH] fix %autopatch when patch do not exist
|
|
Lubos Kardos |
c235b1 |
|
|
Lubos Kardos |
c235b1 |
unlike Mageia's %apply_patches which inspired it, %autopatch continues
|
|
Lubos Kardos |
c235b1 |
when it fails to apply a patch because it doesn't exists. Eg:
|
|
Lubos Kardos |
c235b1 |
|
|
Lubos Kardos |
c235b1 |
+ /usr/bin/cat /home/tv/rpmbuild/SOURCES/test.patch2
|
|
Lubos Kardos |
c235b1 |
+ /usr/bin/patch -p1 -s
|
|
Lubos Kardos |
c235b1 |
/usr/bin/cat: /home/tv/rpmbuild/SOURCES/test.patch2: No such file or directory
|
|
Lubos Kardos |
c235b1 |
+ /usr/bin/cat /home/tv/rpmbuild/SOURCES/test.patch
|
|
Lubos Kardos |
c235b1 |
+ /usr/bin/patch -p1 -s
|
|
Lubos Kardos |
c235b1 |
|
|
Lubos Kardos |
c235b1 |
Let's catch that error
|
|
Lubos Kardos |
c235b1 |
|
|
Lubos Kardos |
c235b1 |
Signed-off-by: Lubos Kardos <lkardos@redhat.com>
|
|
Lubos Kardos |
c235b1 |
---
|
|
Lubos Kardos |
c235b1 |
macros.in | 1 +
|
|
Lubos Kardos |
c235b1 |
1 file changed, 1 insertion(+)
|
|
Lubos Kardos |
c235b1 |
|
|
Lubos Kardos |
c235b1 |
diff --git a/macros.in b/macros.in
|
|
Lubos Kardos |
c235b1 |
index 5dddede..5e0d17b 100644
|
|
Lubos Kardos |
c235b1 |
--- a/macros.in
|
|
Lubos Kardos |
c235b1 |
+++ b/macros.in
|
|
Lubos Kardos |
c235b1 |
@@ -1118,6 +1118,7 @@ done \
|
|
Lubos Kardos |
c235b1 |
|
|
Lubos Kardos |
c235b1 |
# Single patch application
|
|
Lubos Kardos |
c235b1 |
%apply_patch(qp:m:)\
|
|
Lubos Kardos |
c235b1 |
+test -f %{1} || exit 1 ; \
|
|
Lubos Kardos |
c235b1 |
%{uncompress:%{1}} | %{expand:%__scm_apply_%{__scm} %{-q} %{-p:-p%{-p*}} %{-m:-m%{-m*}}}
|
|
Lubos Kardos |
c235b1 |
|
|
Lubos Kardos |
c235b1 |
# Automatically apply all patches
|
|
Lubos Kardos |
c235b1 |
--
|
|
Lubos Kardos |
c235b1 |
1.9.3
|
|
Lubos Kardos |
c235b1 |
|