[aur-general] TU Application - Ike Devolder

Ike Devolder ike.devolder at gmail.com
Sun Mar 4 13:37:49 EST 2012


Op 04-03-12 18:48, Xyne schreef:
> Thomas Dziedzic wrote:
> 
>> On Sun, Mar 4, 2012 at 10:47 AM, Thomas Dziedzic <gostrc at gmail.com> wrote:
>>> On Sun, Mar 4, 2012 at 10:38 AM, Ike Devolder <ike.devolder at gmail.com> wrote:
>>>> Op 03-03-12 16:41, Xyne schreef:
>>>>> Ike Devolder wrote:
> 
>>>> Hi Xyne,
>>>>
>>>> In general i find it a mishap building in folders containing spaces.
>>>>
>>>> but because it will give a failure here i'm currently updating all my
>>>> PKGBUILDs to use the correct quoting, i'm also removing the unneeded ${}
>>>>
>>>> thx for the note. In the end it is better practice
>>>>
>>>> --
>>>> Ike
>>>>
>>>
>>> IMO, this is all just coding style that doesn't really affect any or 1
>>> or 2 people in the whole distro that are insane enough to build with
>>> directory names with spaces in them..
>>>
>>> Since it is coding style, I never judge anyone by it, but ideally
>>> would like it closely resembling mine :P
>>>
>>> I personally hate quoting in pkgbuilds and prefer ${variables} as I
>>> find this more readable although I sometimes deviate from this.
>>
>> Oops, I'm only talking about ${pkgdir}/${srcdir} in here, wasn't specific enough
> 
> There may not be many users who have paths with spaces in them, but they are
> perfectly valid. It is very bad practice to write code that fails in valid
> situations simply because the coder likes the way the code looks, and it is not
> a matter of coding style if it affects the code's behavior.
> 
> As for Bash variables. there seems to be some common misconception that curly
> brackets do something special. They don't. They only provide a way to separate
> variables from surrounding text (e.g. ${foo}bar). Including them as a rule
> doesn't hurt and it provides consistency, but syntactically they are completely
> superfluous in most situations.
> 
> Anyway, this isn't a major issue. I just think the argument "but I don't like
> the way the valid code looks" is a very bad and lazy one.
> 
> Regards,
> Xyne

well with my updates to most of my PKGBUILDs now, i have changed to
${var} on a need only basis, being separating the variable from the full
text (as in the above ${foo}bar) and when needed for some special reason
as a replace (as in ${foo/-/_})

for the rest, i used quotes maybe in even more cases then needed, but it
will for sure guarantee the correct execution of makepkg with the
PKGBUILD even if you use spaces :p

-- 
Ike

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/aur-general/attachments/20120304/6bb0fa91/attachment.asc>


More information about the aur-general mailing list