[aur-dev] [PATCH] Fix: FS#13122 - simpler commented line removal

Gergely Imreh imrehg at gmail.com
Mon Feb 16 09:45:33 EST 2009


2009/2/16 Gergely Imreh <imrehg at gmail.com>:
> 2009/2/16 Loui Chang <louipc.ist at gmail.com>:
>> On Mon, Feb 16, 2009 at 07:25:59AM +0800, Gergely Imreh wrote:
>>> 2009/2/16 Loui Chang <louipc.ist at gmail.com>:
>>> >> 2009/2/14 Gergely Imreh <imrehg at gmail.com>:
>>> >> >  This patch should fix the way commented lines are removed. Should
>>> >> > generally work with all lines (variables) AUR cares about. Removed
>>> >> > previous (incomplete) method.
>>> >
>>> > Hmm this fixes it for comments outside of braces, but it breaks the
>>> > parsing for parameter substitution. Oy.
>>> > _kernelname=${pkgname#kernel26}
>>> >
>>>
>>> Ok, let me check it, I haven't seen such replacement that you mention,
>>> yet, so didn't expect it... Let bash be blessed. :)
>>
>> Oh there was no replacement, but the parser was able to handle it
>> gracefully (?) before.
>>
>> Now it's showing an error:
>> Invalid name: only lowercase letters are allowed.
>>
>> I was using the PKGBUILD submitted in this
>> http://bugs.archlinux.org/task/13173 for testing.
>>
>
> Okay, I checked the PKGBUILD attached to the bug report you mention.
> Yeah, that # wasn't replaced, because the current code only handles #s
> within brackets...
> I know how to get this patch right, just let me check it in the evening. ;)
> And now that I know what I should look for, probably will give a go to
> implement more of bash's variable replacement, I have some ideas...
>  Cheers,
>    Greg
>

How about this new version? Handles FS#13122 and FS#13173 well - by
which I mean that it does not remove anything that is not comment. The
# characters intended for bash parameter replacement are kept (so not
breaking the upload), though not handled yet within the replacement
section. That is for another day.

   Greg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-simpler-commented-line-removal.patch
Type: application/octet-stream
Size: 1715 bytes
Desc: not available
URL: <http://www.archlinux.org/pipermail/aur-dev/attachments/20090216/805e3154/attachment.obj>


More information about the aur-dev mailing list