Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 477302 - sys-apps/portage-2.2.0_alpha177 treats comments inconsistently
Summary: sys-apps/portage-2.2.0_alpha177 treats comments inconsistently
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-18 14:09 UTC by Rafał Mużyło
Modified: 2013-07-18 18:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild showing the problem (alsa-utils-1.0.27.2.ebuild,2.13 KB, text/plain)
2013-07-18 14:09 UTC, Rafał Mużyło
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafał Mużyło 2013-07-18 14:09:09 UTC
Created attachment 353590 [details]
ebuild showing the problem

'ebuild foo manifest' and emerge treat '#' comments differently.

In the attached ebuild, in src_prepare, comment is only on one line - that causes an obvious warning during emerge ('Access denied').

However, if the comment is on both lines, 'ebuild foo manifest' bails out with 'line 30: syntax error at unexpected marker {'.
Comment 1 Zac Medico gentoo-dev 2013-07-18 18:33:16 UTC
(In reply to Rafał Mużyło from comment #0)
> Created attachment 353590 [details]
> ebuild showing the problem
> 
> 'ebuild foo manifest' and emerge treat '#' comments differently.
> 
> In the attached ebuild, in src_prepare, comment is only on one line - that
> causes an obvious warning during emerge ('Access denied').

That behavior is correct, since it thinks the ebuild is trying to execute the package, which is not allowed.

> However, if the comment is on both lines, 'ebuild foo manifest' bails out
> with 'line 30: syntax error at unexpected marker {'.

This behavior is expected, since bash does not allow empty functions.

I don't see anything to change here, because the things that you report are intended behaviors of bash that portage has no control over.
Comment 2 Zac Medico gentoo-dev 2013-07-18 18:34:45 UTC
Rather than comment out the contents of src_prepare, you would really want to comment out the whole function, since bash doesn't allow empty function declarations.
Comment 3 Rafał Mużyło 2013-07-18 18:56:11 UTC
(In reply to Zac Medico from comment #2)
> Rather than comment out the contents of src_prepare, you would really want
> to comment out the whole function, since bash doesn't allow empty function
> declarations.

OK, didn't know about "empty functions part".

On not quite related note: would you mind giving bug 369581 a push ? It's still valid in 0.3.0.7.