Patchwork [meta-networking] netcat-openbsd: fixup patching

login
register
mail settings
Submitter danismostlikely@gmail.com
Date May 12, 2014, 4:30 p.m.
Message ID <CACS+7ZQ1i2nTKLcD+toOBN2BPA9PE=zzdD05oDLmPkCKco-NUA@mail.gmail.com>
Download mbox | patch
Permalink /patch/72011/
State New, archived
Headers show

Comments

danismostlikely@gmail.com - May 12, 2014, 4:30 p.m.
From: Dan McGregor <dan.mcgregor@usask.ca>

Do the patching in the do_patch phase instead of the compile
phase. That way if the compile phase needs to be rerun
patching isn't attempted a second time.

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
---
 .../recipes-support/netcat/netcat-openbsd_1.105.bb            | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

     pkgrel=4
     oe_runmake CFLAGS="$CFLAGS -DDEBIAN_VERSION=\"\\\"${pkgrel}\\\"\""
 }
Joe MacDonald - June 4, 2014, 1:43 a.m.
Merged, sorry for the excessive delay on this.

-J.

On Mon, May 12, 2014 at 12:30 PM, Dan McGregor
<danismostlikely@gmail.com> wrote:
> From: Dan McGregor <dan.mcgregor@usask.ca>
>
> Do the patching in the do_patch phase instead of the compile
> phase. That way if the compile phase needs to be rerun
> patching isn't attempted a second time.
>
> Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
> ---
>  .../recipes-support/netcat/netcat-openbsd_1.105.bb            | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
> b/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
> index 4474e1d..4489656 100644
> --- a/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
> +++ b/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
> @@ -15,11 +15,20 @@ SRC_URI[netcat-patch.sha256sum] =
> "eee759327ffea293e81d0dde67921b7fcfcad279ffd7a
>
>  S = "${WORKDIR}/${BPN}-${PV}"
>
> +netcat_do_patch() {
> +    cd ${S}
> +    while read line; do patch -p1 < ${WORKDIR}/debian/patches/$line;
> done < ${WORKDIR}/debian/patches/series
> +}
> +
> +python do_patch() {
> +    bb.build.exec_func('netcat_do_patch', d)
> +    bb.build.exec_func('patch_do_patch', d)
> +}
> +
>  do_configure[noexec] = "1"
>
>  do_compile() {
>      cd ${S}
> -    while read line; do patch -p1 < ${WORKDIR}/debian/patches/$line;
> done < ${WORKDIR}/debian/patches/series
>      pkgrel=4
>      oe_runmake CFLAGS="$CFLAGS -DDEBIAN_VERSION=\"\\\"${pkgrel}\\\"\""
>  }
> --
> 1.9.0
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Patch

diff --git a/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
b/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
index 4474e1d..4489656 100644
--- a/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
+++ b/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
@@ -15,11 +15,20 @@  SRC_URI[netcat-patch.sha256sum] =
"eee759327ffea293e81d0dde67921b7fcfcad279ffd7a

 S = "${WORKDIR}/${BPN}-${PV}"

+netcat_do_patch() {
+    cd ${S}
+    while read line; do patch -p1 < ${WORKDIR}/debian/patches/$line;
done < ${WORKDIR}/debian/patches/series
+}
+
+python do_patch() {
+    bb.build.exec_func('netcat_do_patch', d)
+    bb.build.exec_func('patch_do_patch', d)
+}
+
 do_configure[noexec] = "1"

 do_compile() {
     cd ${S}
-    while read line; do patch -p1 < ${WORKDIR}/debian/patches/$line;
done < ${WORKDIR}/debian/patches/series