[dpdk-dev] [PATCH] devtools: avoid config backup during test build setup

Bruce Richardson bruce.richardson at intel.com
Mon Dec 16 17:59:10 CET 2019


On Mon, Dec 16, 2019 at 05:47:03PM +0100, Thomas Monjalon wrote:
> 16/12/2019 17:40, Bruce Richardson:
> > On Mon, Dec 16, 2019 at 05:22:42PM +0100, Thomas Monjalon wrote:
> > > The config options are updated with sed and the short inline option.
> > > In FreeBSD, the suffix argument of the inline option is mandatory.
> > > In order to avoid creating a backup file when using sed inline,
> > > the argument is set as an empty suffix.
> > > 
> > > The short option '-i' does not expect '=' before the suffix argument,
> > > so it understands '=' as the file suffix.
> > > As a consequence, a backup file named '.config=' was created
> > > in the build directory.
> > > 
> > > Removing the '=' sign while keeping an empty suffix
> > > avoids creating a backup file.
> > > 
> > > Fixes: 4a4a20c4775b ("devtools: support FreeBSD")
> > > Cc: olivier.matz at 6wind.com
> > > Cc: stable at dpdk.org
> > > 
> > > Reported-by: Ali Alnubani <alialnu at mellanox.com>
> > > Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
> > > ---
> > > 
> > > This patch does not work on FreeBSD.
> > > Does it mean the equal sign is required on FreeBSD?
> > > This is not what I see on the documentation:
> > > https://www.freebsd.org/cgi/man.cgi?query=sed&sektion=&n=1
> > > 
> > > ---
> > 
> > It appears it is needed, which is why the "=" was added in the first place.
> > See commit: 4a4a20c4775b ("devtools: support FreeBSD"), by Olivier
> > 
> > Is having the backup file a big issue?
> 
> No it's not a big issue.
> But I really would like to know how to have a common behaviour on BSD an Linux
> for a thing as simple as "sed -i" !
> And why the mandatory "=" is not documented on FreeBSD?
> 
> It cannot be so much broken. We probably miss something...
> 
I think FreeBSD just requires a space between the -i and the ''. Testing
that seems to work for me on BSD. I assume it also should work on Linux.

/Bruce


More information about the dev mailing list