DPDK patches and discussions
 help / color / mirror / Atom feed
From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
To: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Cc: Thomas Monjalon <thomas.monjalon@6wind.com>, dev <dev@dpdk.org>,
	 Ferruh Yigit <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] [PATCH] mk: fix FreeBSD build
Date: Mon, 18 Jul 2016 15:54:29 +0200	[thread overview]
Message-ID: <CAATJJ0+uHwDCG0uC_EKoxKaMyYo1g3oir7TEpj=OOJrpkxstzA@mail.gmail.com> (raw)
In-Reply-To: <abce78ff-b0c7-e62c-b182-190396dc45db@intel.com>

Hi Sergio,
you might have seen that I had a similar version with awk in v2 IIRC. I
also had the secondary tmp file just like you now.
So, since it is so close to my old submission I wont object :-)

Back then the discussion went for reduced build time dependencies and
avoiding a second temp file, which was ok for me - so sed was chosen.

I see that breaking on BSD causes us to rework it again, sorry that I was
unable to test there.

If you could come up with a Solution "sed + no-temp2 + noGNUspecifics" that
would be great and solve everybodies needs.
If not, it is a call up to the participants of the old discussion if not
working on BSD outweighs their old feedback (I guess so).

Most active in the discussion back then was Ferruh IIRC - setting to CC.



Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd

On Mon, Jul 18, 2016 at 3:39 PM, Sergio Gonzalez Monroy <
sergio.gonzalez.monroy@intel.com> wrote:

> On 18/07/2016 14:25, Thomas Monjalon wrote:
>
>> 2016-07-18 14:11, Sergio Gonzalez Monroy:
>>
>>> The sed syntax of '0,/regexp/' is GNU specific and fails with
>>> non GNU sed in FreeBSD.
>>>
>>> To solve the issue we can use awk instead to remove duplicates.
>>>
>> Christian, an opinion please?
>>
>
> Sorry, forgot to CC him.
>
> Fixes: b2063f104db7 ("mk: filter duplicate configuration entries")
>>>
>>> Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
>>>
>> [...]
>>
>>> -               for config in $$(grep -v "^#" $(RTE_OUTPUT)/.config_tmp
>>> | cut -d"=" -f1 | sort | uniq -d); do \
>>> -                       while [ $$(grep "^$${config}="
>>> $(RTE_OUTPUT)/.config_tmp -c ) -gt 1 ]; do \
>>> -                               sed -i "0,/^$${config}=/{//d}"
>>> $(RTE_OUTPUT)/.config_tmp; \
>>> -                       done; \
>>> -               done; \
>>> +               grep -v "^#" $(RTE_OUTPUT)/.config_tmp | awk -F'='
>>> '{a[$$1]=$$0} END {for (i in a) print a[i]}' > $(RTE_OUTPUT)/.config_tmp2 ;
>>> \
>>> +               mv $(RTE_OUTPUT)/.config_tmp2 $(RTE_OUTPUT)/.config_tmp
>>> ; \
>>> +               rm -f $(RTE_OUTPUT)/.config_tmp2 ; \
>>>
>> You can avoid creating/deleting the file .config_tmp2 by using a variable:
>>         config=$(grep -v '^#' $(RTE_OUTPUT)/.config_tmp)
>>         echo "$config" | awk ... > $(RTE_OUTPUT)/.config_tmp
>>
>
> Sure.
>
> Sergio
>

  reply	other threads:[~2016-07-18 13:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18 13:11 Sergio Gonzalez Monroy
2016-07-18 13:25 ` Thomas Monjalon
2016-07-18 13:39   ` Sergio Gonzalez Monroy
2016-07-18 13:54     ` Christian Ehrhardt [this message]
2016-07-18 14:06       ` Sergio Gonzalez Monroy
2016-07-18 14:07       ` Thomas Monjalon
2016-07-18 14:51         ` Sergio Gonzalez Monroy
2016-07-18 16:06 ` [dpdk-dev] [PATCH v2] " Sergio Gonzalez Monroy
2016-07-19 10:32   ` Ferruh Yigit
2016-07-19 11:01     ` Christian Ehrhardt
2016-07-19 11:40       ` Sergio Gonzalez Monroy
2016-07-19 13:40   ` [dpdk-dev] [PATCH v3] " Sergio Gonzalez Monroy
2016-07-19 14:30     ` Christian Ehrhardt
2016-07-19 15:04       ` Ferruh Yigit
2016-07-21  8:27       ` Thomas Monjalon

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='CAATJJ0+uHwDCG0uC_EKoxKaMyYo1g3oir7TEpj=OOJrpkxstzA@mail.gmail.com' \
    --to=christian.ehrhardt@canonical.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=sergio.gonzalez.monroy@intel.com \
    --cc=thomas.monjalon@6wind.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).