Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New Check]: Detect duplicate phase definitions #624

Closed
1 task done
thesamesam opened this issue Sep 15, 2023 · 1 comment · Fixed by #623
Closed
1 task done

[New Check]: Detect duplicate phase definitions #624

thesamesam opened this issue Sep 15, 2023 · 1 comment · Fixed by #623
Assignees
Labels
bash requires bash-parsing support check

Comments

@thesamesam
Copy link
Member

Is there an existing such new check request for this?

  • I have searched the existing issues

Explain

It is invalid for the same phase to be repeatedly defined within an ebuild. It's not even clear to me which definition should win, let alone it being an obvious error.

Please note this is different to #377, so maybe we shouldn't say 'shadowed' for this new bug, and just say 'duplicate'.

Examples

See the https://bugs.gentoo.org/610764 tracker on Bugzilla.

runit-2.1.2-r1 has two copies of pkg_preinst (https://bugs.gentoo.org/862615), see https://github.com/gentoo/gentoo/blob/4cbefaa399931045a800c6973faf37955a15fdbc/sys-process/runit/runit-2.1.2-r1.ebuild#L76.

Output message

DuplicatePhaseDefinition

Documentation

Multiple definitions of an ebuild phase were found.

Result level

error

@thesamesam
Copy link
Member Author

Ah, we have a bug for this already but on Bugzilla: https://bugs.gentoo.org/365691.

@arthurzam arthurzam self-assigned this Sep 19, 2023
arthurzam added a commit to arthurzam/pkgcheck that referenced this issue Sep 19, 2023
Closes: https://bugs.gentoo.org/365691
Resolves: pkgcore#624
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
@arthurzam arthurzam added the bash requires bash-parsing support label Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bash requires bash-parsing support check
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants