svn commit: r500363 - in head/sysutils: . etc_os-release

Mathieu Arnold mat at FreeBSD.org
Wed May 1 10:41:02 UTC 2019


Hi,

To be honest, it would probably be less of a mess if it was using a file
in FILESDIR and SUB_FILES.

On Wed, May 01, 2019 at 11:01:42AM +0200, Tobias C. Berner wrote:
> Moin moin
> 
> 
> I don't really see how this escaping-hell is any nicer than using -0 :) .
> Generating it via shell-script on the other-hand would also have the
> benefit of freebsd-version
> not being called when running "make index" and such...
> 
> Let's wait and see if we need more of the possible variables, and then
> rework it in the next iteration.
> 
> mfg Tobias
> 
> On Mon, 29 Apr 2019 at 08:56, Alexey Dokuchaev <danfe at freebsd.org> wrote:
> 
> > On Sun, Apr 28, 2019 at 07:22:21PM +0000, Tobias C. Berner wrote:
> > > New Revision: 500363
> > > URL: https://svnweb.freebsd.org/changeset/ports/500363
> > >
> > > Log:
> > >   New port: sysutils/etc_os-release
> >
> > Perhaps `misc' would've been a better category, since it's not strictly
> > an utility.  Missed this in the review, sorry.
> >
> > > +CONTENTS=    'NAME=FreeBSD\0'$\
> > > +             'VERSION=${VERSION}\0'$\
> > > +             'ID=${VERSION_ID}\0'$\
> > > +             'VERSION_ID=freebsd\0'$\
> > > +             'ANSI_COLIR="0;31"\0'$\
> > > +             'PRETTY_NAME="FreeBSD ${VERSION}"\0'$\
> > > +             'CPE_NAME=cpe:/o:freebsd:freebsd:${VERSION_ID}\0'$\
> > > +             'HOME_URL=https://freebsd.org/\0'$\
> > > +             'BUG_REPORT_URL=https://bugs.freebsd.org'
> >
> > Oh, this is so ugly.  Please consider something like this:
> >
> > CONTENTS=       "NAME=FreeBSD" \
> >                 "VERSION=${VERSION}" \
> >                 "VERSION_ID=${VERSION_ID}" \
> >                 "ID=${OPSYS:tl}" \
> >                 "ANSI_COLOR=\\\"0;31\\\"" \
> >                 "PRETTY_NAME=\\\"${OPSYS}\ ${VERSION}\\\"" \
> >                 "CPE_NAME=cpe:/o:freebsd:freebsd:${VERSION_ID}" \
> >                 "HOME_URL=https://freebsd.org/" \
> >                 "BUG_REPORT_URL=https://bugs.freebsd.org"
> >
> > Then you don't need -0 for xargs(1) and there's no extra newline at EOF.
> >
> > ./danfe
> >

-- 
Mathieu Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-ports-all/attachments/20190501/77a88c71/attachment.sig>


More information about the svn-ports-all mailing list