Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jul 2011 12:57:33 -0500
From:      Scot Hetzel <swhetzel@gmail.com>
To:        Warren Block <wblock@wonkity.com>
Cc:        "freebsd-ports@FreeBSD.org" <freebsd-ports@freebsd.org>
Subject:   Re: [RFC] A trivial change for DESKTOP_ENTRIES (take 2)
Message-ID:  <CACdU%2Bf-FQudibe_LBYKeW-nb=uUXApoBHh8WrqwmXNtf4Hbs1Q@mail.gmail.com>
In-Reply-To: <alpine.BSF.2.00.1107150646540.52034@wonkity.com>
References:  <201107121826.00020.jkim@FreeBSD.org> <201107131857.36772.jkim@FreeBSD.org> <4E1E9C79.6080105@FreeBSD.org> <4E1F200D.1080002@missouri.edu> <1310666060.23182.1.camel@hood.oook.cz> <CACdU%2Bf9BJg%2BPPA%2Bwv_Pk0UNYkPfbjHeZ8Hibj5eWLFc3ff8WtA@mail.gmail.com> <alpine.BSF.2.00.1107150646540.52034@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2011/7/15 Warren Block <wblock@wonkity.com>:
>> How about something like this:
>>
>> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D158936
>
> Wouldn't the point of using a separate filename argument be to let the us=
er
> specify exactly what the name is? =A0Here you end up with the same
> system-processed filename. =A0Possibly I've misunderstood.
>
The system-processed filename could be simplified for the
DESKTOP_ENTRIESv2 in install-desktop-entries to just

   filename=3D"$$1"

But then we would still need to add a check to check-desktop-entries
for DESKTOP_ENTRIESv2 that would detect illegal characters in the
filename.

> Apart from whether it's necessary, making the filename the last field wou=
ld
> simplify the code. =A0Just .if defined(DESKTOP_ENTRIES) or
> defined(DESKTOP_ENTRIESv2) at the start of parameter processing, and a .i=
f
> defined(DESKTOP_ENTRIESv2) section after it to override the filename. =A0=
It
> could also be made polymorphic, basing what it does on the number of fiel=
ds
> rather than a new DESKTOP_ENTRIESv2 define.

That was my first ideal, but since the entire processing is done in a
@set ${DESKTOP_ENTRIES{,v2}} XXX ; while [$$# -gt {6,7}]; do
filename=3D$${4,1}... ; done loop, I wasn't sure how to change this
part.

Scot



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACdU%2Bf-FQudibe_LBYKeW-nb=uUXApoBHh8WrqwmXNtf4Hbs1Q>