Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 607852 - sys-apps/portage: deprecate /etc/portage/package.keywords, in favor of package.accept_keywords
Summary: sys-apps/portage: deprecate /etc/portage/package.keywords, in favor of packag...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on: 740748 706212 706298
Blocks: 491166 706142
  Show dependency tree
 
Reported: 2017-01-31 20:48 UTC by Zac Medico
Modified: 2020-09-06 21:31 UTC (History)
2 users (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 Zac Medico gentoo-dev 2017-01-31 20:48:45 UTC
Since /etc/portage/package.keywords behaves differently that package.keywords in profiles, it should trigger a deprecation warning which advises the user to migrate to package.accept_keywords.
Comment 2 Larry the Git Cow gentoo-dev 2020-01-23 06:04:47 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=7e50a057958624dd728e858a3c07517240f85d02

commit 7e50a057958624dd728e858a3c07517240f85d02
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2020-01-18 06:06:27 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2020-01-23 06:01:14 +0000

    UserWarning if /etc/portage/package.keywords exists
    
    The /etc/portage/package.keywords file has been long deprecated
    in favor of /etc/portage/package.accept_keywords. The file would
    be useful if we could make it behave like package.keywords in
    profiles (see bug 491166), but it's safest if we trigger a
    UserWarning for some time before we change the meaning in a
    future version of portage. The message looks like this:
    
    UserWarning: /etc/portage/package.keywords is deprecated, use /etc/portage/package.accept_keywords instead
    
    Bug: https://bugs.gentoo.org/491166
    Bug: https://bugs.gentoo.org/607852
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/package/ebuild/_config/KeywordsManager.py | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
Comment 3 Larry the Git Cow gentoo-dev 2020-01-26 00:20:31 UTC
The bug has been referenced in the following commit(s):

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

commit e2a2adf4b2ff7291fd12dce43c1d4c542c399a9f
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2020-01-26 00:18:48 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2020-01-26 00:19:44 +0000

    MultirepoTestCase: package.keywords -> package.accept_keywords
    
    Bug: https://bugs.gentoo.org/607852
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/tests/resolver/test_multirepo.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Comment 4 Zac Medico gentoo-dev 2020-05-08 00:47:06 UTC
This warning might not be strong enough, since people can still suppress it with this environment setting:

PYTHONWARNINGS="i::UserWarning:portage.package.ebuild._config.KeywordsManager:70"

So, I think we should make the message impossible to suppress, otherwise people may never migrate.
Comment 5 Zac Medico gentoo-dev 2020-05-08 01:29:17 UTC
Even though package.accept_keywords has been around for a long time, puppet-portage only gained support in December 2016:

https://github.com/gentoo/puppet-portage/commit/bedb3113e135a6f2e93f9c2250eb5fa8a3162dc0