mirror of
https://git.yoctoproject.org/poky
synced 2026-09-29 07:36:20 +02:00
Currently the build will break if the patch already applied
as the return value of "test ! -f $@" is not 0, so make sure
to return 0 if the patch already applied.
Fixes:
$ bitbake perl-native
Make a change as below
$ git diff
diff --git a/meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb b/meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb
index b77bbd1fd4..4c5e35ab80 100644
--- a/meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb
+++ b/meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb
@@ -33,6 +33,7 @@ do_compile () {
do_install_class-native() {
mkdir -p ${D}/${datadir}/perl-cross/
cp -rf ${S}/* ${D}/${datadir}/perl-cross/
+ echo "test" > ${D}/${datadir}/perl-cross/testfile
}
$ bitbake perl-native
NOTE: make -j 40
make crosspatch
make[1]: Entering directory '/build/tmp-glibc/work/x86_64-linux/perl-native/5.34.0-r0/perl-5.34.0'
test ! -f cnf/diffs/perl5-5.34.0/posix-makefile.applied && (patch -p1 -i cnf/diffs/perl5-5.34.0/posix-makefile.patch && touch cnf/diffs/perl5-5.34.0/posix-makefile.applied)
test ! -f cnf/diffs/perl5-5.34.0/dynaloader.applied && (patch -p1 -i cnf/diffs/perl5-5.34.0/dynaloader.patch && touch cnf/diffs/perl5-5.34.0/dynaloader.applied)
make[1]: *** [Makefile:64: cnf/diffs/perl5-5.34.0/posix-makefile.applied] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:64: cnf/diffs/perl5-5.34.0/dynaloader.applied] Error 1
make[1]: Leaving directory '/build/tmp-glibc/work/x86_64-linux/perl-native/5.34.0-r0/perl-5.34.0'
make: *** [Makefile:78: all] Error 2
(From OE-Core rev: 354163db5588d87941f53a2763be62b2430cc1fc)
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
32 lines
979 B
Diff
32 lines
979 B
Diff
From 24a3e0c48f9ebe473b5f1078663e275c27d0537f Mon Sep 17 00:00:00 2001
|
|
From: Mingli Yu <mingli.yu@windriver.com>
|
|
Date: Fri, 2 Jul 2021 09:08:21 +0000
|
|
Subject: [PATCH] Makefile: check the file if patched or not
|
|
|
|
Check the file if patched or not to avoid patched more than
|
|
one time.
|
|
|
|
Upstream-Status: Inappropriate (OE-specific)
|
|
|
|
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
|
|
---
|
|
Makefile | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/Makefile b/Makefile
|
|
index f4a26f5..7bc748e 100644
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -61,7 +61,7 @@ miniperlmain$O: $(CROSSPATCHED)
|
|
# Original versions are not saved anymore; patch generally takes care of this,
|
|
# and if that fails, reaching for the source tarball is the safest option.
|
|
$(CROSSPATCHED): %.applied: %.patch
|
|
- patch -p1 -i $< && touch $@
|
|
+ test ! -f $@ && (patch -p1 -i $< && touch $@) || echo "$@ exist"
|
|
|
|
# ---[ common ]-----------------------------------------------------------------
|
|
|
|
--
|
|
2.29.2
|
|
|