From: Saul Wold <sgw@linux.intel.com>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 2/2] quilt: fix test for target build
Date: Wed, 13 Apr 2011 09:48:17 -0700 [thread overview]
Message-ID: <4DA5D3D1.2050405@linux.intel.com> (raw)
In-Reply-To: <BANLkTikg2Bb8bCrnjJU3JyP0mHTYHFoRgg@mail.gmail.com>
On 04/13/2011 08:36 AM, Khem Raj wrote:
> On Wed, Apr 13, 2011 at 2:26 AM, Qing He<qing.he@intel.com> wrote:
>> From: Qing He<qing.he@intel.com>
>>
>> fixes [YOCTO #969]
>>
>> Signed-off-by: Qing He<qing.he@intel.com>
>> ---
>> .../quilt/quilt/gnu_patch_test_fix_target.patch | 66 ++++++++++++++++++++
>> meta/recipes-devtools/quilt/quilt_0.48.bb | 6 +-
>> 2 files changed, 70 insertions(+), 2 deletions(-)
>> create mode 100644 meta/recipes-devtools/quilt/quilt/gnu_patch_test_fix_target.patch
>>
>> diff --git a/meta/recipes-devtools/quilt/quilt/gnu_patch_test_fix_target.patch b/meta/recipes-devtools/quilt/quilt/gnu_patch_test_fix_target.patch
>> new file mode 100644
>> index 0000000..784fe76
>> --- /dev/null
>> +++ b/meta/recipes-devtools/quilt/quilt/gnu_patch_test_fix_target.patch
>> @@ -0,0 +1,66 @@
>> +The test of patch and diff should not be run for cross build,
>> +rather, assume them as gnu version is rather safe. This is a
>> +workaround to remove it altogether.
>> +
>
> why is this patch needed. I assume all linux distributions use GNU
> diff and patch
> and that what is being checked so why remove the checks ? these messages
> are atleast useful for folks who are trying other build hosts e.g. darwin
>
I understand the host vs target issue, but I think a safer way would be
to add a check for the version of the target patch (via a variable),
this may be more upstreamable.
Also, why did you know do a recipe update which would bring in some of
the upstream fixes also?
Sau!
>> +Signed-off-by: Qing He<qing.he@intel.com>
>> +
>> +diff --git a/configure.ac b/configure.ac
>> +index 026a36c..7b45ca4 100644
>> +--- a/configure.ac
>> ++++ b/configure.ac
>> +@@ -245,55 +245,6 @@ fi
>> + QUILT_COMPAT_PROG_PATH(DIFF, diff)
>> + QUILT_COMPAT_PROG_PATH(PATCH, patch)
>> +
>> +-# Sun diff and others will not work because GNU patch options are used.
>> +-AC_MSG_CHECKING([the version of $DIFF])
>> +-if $DIFF --version 2>/dev/null | grep GNU>/dev/null; then
>> +- set -- `$DIFF --version 2>/dev/null | $AWK '{ print $NF; exit }'`
>> +- diff_version=$1
>> +- AC_MSG_RESULT($diff_version)
>> +- saved_IFS=$IFS; IFS='.'
>> +- set -- $diff_version
>> +- IFS=$saved_IFS
>> +- set -- `echo $1 | $TR -cd 0-9` `echo $2 | $TR -cd 0-9`
>> +- if test 0$1 -lt 2 || test 0$1 -eq 2 -a 0$2 -lt 7 ; then
>> +- diff_version=
>> +- fi
>> +-else
>> +- AC_MSG_RESULT(no GNU diff)
>> +-fi
>> +-if test -z "$diff_version" ; then
>> +- AC_MSG_ERROR([
>> +-$PACKAGE_NAME requires at least version 2.7 of GNU diffutils. You can
>> +-download a current version of patch from ftp.gnu.org, or if you already
>> +-have GNU diff then you can supply its path with the '--with-diff=' option.
>> +-])
>> +-fi
>> +-
>> +-
>> +-# Sun's patch, and others, do not work because GNU patch options are used.
>> +-AC_MSG_CHECKING([the version of $PATCH])
>> +-if $PATCH --version 2> /dev/null | grep GNU>/dev/null; then
>> +- set -- `$PATCH --version 2> /dev/null`
>> +- patch_version=$2
>> +- AC_MSG_RESULT($patch_version)
>> +- saved_IFS=$IFS; IFS='.'
>> +- set -- $patch_version
>> +- IFS=$saved_IFS
>> +- set -- `echo $1 | $TR -cd 0-9` `echo $2 | $TR -cd 0-9`
>> +- if test 0$1 -lt 2 || test 0$1 -eq 2 -a 0$2 -lt 4 ; then
>> +- patch_version=
>> +- fi
>> +-else
>> +- AC_MSG_RESULT(no GNU patch)
>> +-fi
>> +-if test -z "$patch_version" ; then
>> +- AC_MSG_ERROR([
>> +-$PACKAGE_NAME requires at least version 2.4 of GNU patch. You can download a
>> +-current version of patch from ftp.gnu.org, or if you already have GNU patch
>> +-then you can supply its path with the '--with-patch=' option.
>> +-])
>> +-fi
>> +-
>> + QUILT_COMPAT_PROG_PATH(FIND, find)
>> +
>> + AC_MSG_CHECKING([whether $FIND -path works])
>> diff --git a/meta/recipes-devtools/quilt/quilt_0.48.bb b/meta/recipes-devtools/quilt/quilt_0.48.bb
>> index 20a708d..124e2cd 100644
>> --- a/meta/recipes-devtools/quilt/quilt_0.48.bb
>> +++ b/meta/recipes-devtools/quilt/quilt_0.48.bb
>> @@ -2,8 +2,10 @@ require quilt.inc
>> LICENSE="GPLv2"
>> LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
>> RDEPENDS_${PN} += "patch diffstat bzip2 util-linux"
>> -PR = "r0"
>> -SRC_URI += "file://aclocal.patch"
>> +PR = "r1"
>> +SRC_URI += "file://aclocal.patch \
>> + file://gnu_patch_test_fix_target.patch \
>> + "
>>
>> SRC_URI[md5sum] = "f77adda60039ffa753f3c584a286f12b"
>> SRC_URI[sha256sum] = "73fd760d3b5cbf06417576591dc37d67380d189392db9000c21b7cbebee49ffc"
>> --
>> 1.7.0
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
next prev parent reply other threads:[~2011-04-13 16:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-13 9:26 [PATCH 0/2] bug fix for quilt and sat-solver Qing He
2011-04-13 9:26 ` [PATCH 2/2] quilt: fix test for target build Qing He
2011-04-13 15:36 ` Khem Raj
2011-04-13 16:48 ` Saul Wold [this message]
2011-04-14 2:00 ` Qing He
2011-04-14 15:23 ` Khem Raj
2011-04-15 9:19 ` Qing He
2011-04-15 14:22 ` Khem Raj
2011-04-13 9:26 ` [PATCH 1/2] sat-solver: fix arch=all packages Qing He
2011-04-13 15:38 ` Khem Raj
2011-04-14 3:20 ` Qing He
-- strict thread matches above, loose matches on Subject: below --
2011-04-25 9:49 [PATCH 0/2][RESEND] bug fix for quilt and sat-solver Qing He
2011-04-25 9:49 ` [PATCH 2/2] quilt: fix test for target build Qing He
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DA5D3D1.2050405@linux.intel.com \
--to=sgw@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.