Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 608664 - app-portage/repoman: Warn about ROOT and EROOT in src_* functions (pkgcheck implements EbuildVariableScope and EclassVariableScope)
Summary: app-portage/repoman: Warn about ROOT and EROOT in src_* functions (pkgcheck i...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2017-02-08 21:38 UTC by David Seifert
Modified: 2022-03-05 07:02 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Seifert gentoo-dev 2017-02-08 21:38:40 UTC
Currently, repoman does not warn about using ${ROOT} and ${EROOT} in src_* fucntions, which is a clear violation of PMS.

Reproducible: Always
Comment 1 David Seifert gentoo-dev 2021-03-26 22:51:12 UTC

*** This bug has been marked as a duplicate of bug 775191 ***
Comment 2 Zac Medico gentoo-dev 2021-03-27 22:26:53 UTC
Eclass support added to pkgcheck yesterday:

https://github.com/pkgcore/pkgcheck/commit/e547a066fa08bafe2eeaa3be1b45889e8ee19891
Comment 3 Larry the Git Cow gentoo-dev 2021-03-29 04:56:11 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=15cbe87076b512b318fac1729ec94e6d6674a95a

commit 15cbe87076b512b318fac1729ec94e6d6674a95a
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2021-03-27 23:15:16 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2021-03-29 04:46:41 +0000

    repoman: add variable.phase check like pkgcheck VariableScopeCheck (bug 608664)
    
    The variable.phase check is inspired by pkgcheck's VariableScopeCheck,
    and uses essentially the same PMS data to drive the check.
    
    References:
    - https://projects.gentoo.org/pms/7/pms.html#x1-10900011.1
    - https://pkgcore.github.io/pkgcheck/_modules/pkgcheck/checks/codingstyle.html#VariableScopeCheck
    - https://bugs.gentoo.org/775191
    
    Bug: https://bugs.gentoo.org/608664
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 repoman/cnf/qa_data/qa_data.yaml                   |   1 +
 repoman/cnf/repository/qa_data.yaml                |   1 +
 repoman/cnf/repository/repository.yaml             |   1 +
 .../repoman/modules/linechecks/phases/__init__.py  |   6 +
 .../lib/repoman/modules/linechecks/phases/phase.py | 132 +++++++++++++++++++--
 repoman/lib/repoman/tests/simple/test_simple.py    |  28 ++++-
 repoman/man/repoman.1                              |   5 +-
 7 files changed, 162 insertions(+), 12 deletions(-)
Comment 4 Larry the Git Cow gentoo-dev 2021-03-29 07:59:52 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b061f1f7641c028c57f57bbd91997c6cf646b9a

commit 6b061f1f7641c028c57f57bbd91997c6cf646b9a
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2021-03-29 07:55:56 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2021-03-29 07:59:47 +0000

    app-portage/repoman: Bump to version 3.0.3
    
     #608664 variable.phase check like pkgcheck VariableScopeChec
     #692486 Change message for preserve_old_lib
    
    Bug: https://bugs.gentoo.org/608664
    Bug: https://bugs.gentoo.org/692486
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 app-portage/repoman/Manifest             |  1 +
 app-portage/repoman/repoman-3.0.3.ebuild | 64 ++++++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+)