All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perlcross: not break build if already patched
@ 2021-07-28  5:39 Yu, Mingli
  0 siblings, 0 replies; only message in thread
From: Yu, Mingli @ 2021-07-28  5:39 UTC (permalink / raw)
  To: openembedded-core

From: Mingli Yu <mingli.yu@windriver.com>

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

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 .../files/0001-Makefile-check-the-file-if-patched-or-not.patch  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/perl-cross/files/0001-Makefile-check-the-file-if-patched-or-not.patch b/meta/recipes-devtools/perl-cross/files/0001-Makefile-check-the-file-if-patched-or-not.patch
index fb7b287599..8c8f3b717c 100644
--- a/meta/recipes-devtools/perl-cross/files/0001-Makefile-check-the-file-if-patched-or-not.patch
+++ b/meta/recipes-devtools/perl-cross/files/0001-Makefile-check-the-file-if-patched-or-not.patch
@@ -22,7 +22,7 @@ index f4a26f5..7bc748e 100644
  # 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 $@)
++	test ! -f $@ && (patch -p1 -i $< && touch $@) || echo "$@ exist"
  
  # ---[ common ]-----------------------------------------------------------------
  
-- 
2.17.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-28  5:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28  5:39 [PATCH] perlcross: not break build if already patched Yu, Mingli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.