DPDK patches and discussions
 help / color / mirror / Atom feed
From: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
To: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Cc: dev <dev@dpdk.org>, Thomas Monjalon <thomas.monjalon@6wind.com>,
	Ferruh Yigit <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2] mk: fix FreeBSD build
Date: Tue, 19 Jul 2016 12:40:42 +0100	[thread overview]
Message-ID: <84a3e942-a374-2a4a-81b3-7c5564010e51@intel.com> (raw)
In-Reply-To: <CAATJJ0+yV2zF3GAZccrWs7yXFUyxwDoYA8tCEzeLGtHWThNmFw@mail.gmail.com>

Sorry Christian, I did miss your previous patches.

On 19/07/2016 12:01, Christian Ehrhardt wrote:
> Hi,
> I haven't tested the new suggested way, just went into explaining what 
> formerly were the reasons.
> But I'd strongly vote against reordering and dropping comments.
>
Fair enough.
We would  still have some not-order options if they are duplicated as we 
would just keep the last one but nevertheless most of them would be 
properly grouped and ordered.

I'll rework something based on your v3 patch.

Sergio

> Sergio - v3 had still awk for some parts.
> It doesn't have the "0,..." you mentioned.
> Could you check if that is already using GNU-sed only syntax - 
> http://dpdk.org/dev/patchwork/patch/14592/ ?
>
> If this would be ok - AND - if it creates the same .config as the 
> current code I'd think that is the way to go.
>
>
> Christian Ehrhardt
> Software Engineer, Ubuntu Server
> Canonical Ltd
>
> On Tue, Jul 19, 2016 at 12:32 PM, Ferruh Yigit <ferruh.yigit@intel.com 
> <mailto:ferruh.yigit@intel.com>> wrote:
>
>     On 7/18/2016 5:06 PM, Sergio Gonzalez Monroy wrote:
>     > 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.
>     >
>     > Fixes: b2063f104db7 ("mk: filter duplicate configuration entries")
>     >
>     > Signed-off-by: Sergio Gonzalez Monroy
>     <sergio.gonzalez.monroy@intel.com
>     <mailto:sergio.gonzalez.monroy@intel.com>>
>     > ---
>     >
>     > v2:
>     > - Use temp var instead of temp file
>     >
>     >  mk/rte.sdkconfig.mk <http://rte.sdkconfig.mk> | 7 ++-----
>     >  1 file changed, 2 insertions(+), 5 deletions(-)
>     >
>     > diff --git a/mk/rte.sdkconfig.mk <http://rte.sdkconfig.mk>
>     b/mk/rte.sdkconfig.mk <http://rte.sdkconfig.mk>
>     > index e93237f..c2b6e13 100644
>     > --- a/mk/rte.sdkconfig.mk <http://rte.sdkconfig.mk>
>     > +++ b/mk/rte.sdkconfig.mk <http://rte.sdkconfig.mk>
>     > @@ -88,11 +88,8 @@ $(RTE_OUTPUT)/.config: $(RTE_CONFIG_TEMPLATE)
>     FORCE | $(RTE_OUTPUT)
>     >               $(CPP) -undef -P -x assembler-with-cpp \
>     >               -ffreestanding \
>     >               -o $(RTE_OUTPUT)/.config_tmp
>     $(RTE_CONFIG_TEMPLATE) ; \
>     > -             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; \
>     > +             config=$$(grep -v "^#" $(RTE_OUTPUT)/.config_tmp) ; \
>     > +             echo "$$config" | awk -F'=' '{a[$$1]=$$0} END {for
>     (i in a) print a[i]}' > $(RTE_OUTPUT)/.config_tmp ; \
>     This is another nice awk command.
>
>     A few comments about new command:
>     - Removes all comments from final config
>     - Spreads config option all over the file, logical grouping of options
>     removed.
>
>     When both happens at the same time, I have a concern that this may
>     lead
>     missing some config options when somebody wants to update local config
>     file, but I am OK if everybody is OK.
>
>
>     >               if ! cmp -s $(RTE_OUTPUT)/.config_tmp
>     $(RTE_OUTPUT)/.config; then \
>     >                       cp $(RTE_OUTPUT)/.config_tmp
>     $(RTE_OUTPUT)/.config ; \
>     >                       cp $(RTE_OUTPUT)/.config_tmp
>     $(RTE_OUTPUT)/.config.orig ; \
>     >
>
>

  reply	other threads:[~2016-07-19 11:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18 13:11 [dpdk-dev] [PATCH] " 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
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 [this message]
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=84a3e942-a374-2a4a-81b3-7c5564010e51@intel.com \
    --to=sergio.gonzalez.monroy@intel.com \
    --cc=christian.ehrhardt@canonical.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@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).