Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 668538 - sys-apps/portage: rename PORT_LOGDIR and PORT_LOGDIR_CLEAN variables to PORTAGE_LOGDIR and PORTAGE_LOGDIR_CLEAN
Summary: sys-apps/portage: rename PORT_LOGDIR and PORT_LOGDIR_CLEAN variables to PORTA...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: All All
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 671498
  Show dependency tree
 
Reported: 2018-10-13 21:32 UTC by Zac Medico
Modified: 2023-10-06 22:14 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 2018-10-13 21:32:05 UTC
The PORT_LOGDIR and PORT_LOGDIR_CLEAN variables are the only variables that start with PORT_. For consistency, we can add support for PORTAGE_LOGDIR and PORTAGE_LOGDIR_CLEAN, and make the previous variables into aliases that we can deprecate.
Comment 1 Michael 'veremitz' Everitt 2018-10-13 21:35:08 UTC
Wondered whether I was going mad, when I had 'PORTAGE_LOGDIR' in my make.confs, and nothing was happening...

Thanks Zac for the troubleshooting, and bug!
Comment 2 Zac Medico gentoo-dev 2018-12-15 00:09:40 UTC
This is a start: git grep -l PORT_LOGDIR | xargs sed -i 's:PORT_LOGDIR:PORTAGE_LOGDIR:g'

In lib/portage/package/ebuild/config.py we can add the fallback in the _getitem method, just before the end: raise KeyError(mykey).

We can have a dictionary, defined near _constant_keys, like:

    _deprecated_keys = {'PORTAGE_LOGDIR': 'PORT_LOGDIR'}

Do something like this:

  deprecated_key = self._deprecated_keys.get(mykey)
  if deprecated_key is not None:
    value = self._getitem(deprecated_key)
    warnings.warn("{} replaced by {}".format(deprecated_key, mykey), UserWarning)
    return value
Comment 3 Michael 'veremitz' Everitt 2018-12-15 02:40:05 UTC
Submitted for review:

https://archives.gentoo.org/gentoo-portage-dev/message/ed654e121c931ebc7ede92b110a06f62
Comment 4 Larry the Git Cow gentoo-dev 2018-12-20 04:29:34 UTC
The bug has been referenced in the following commit(s):

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

commit 45dc31673576cf9faca1ac5304e9c067ace27bb7
Author:     M. J. Everitt <m.j.everitt@iee.org>
AuthorDate: 2018-12-15 02:00:49 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-12-20 04:24:32 +0000

    Add note to NEWS/ChangeLog for PORT_LOGDIR* changes
    
    Suggested-by: Michael Everitt <m.j.everitt@iee.org>
    Bug: https://bugs.gentoo.org/668538
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 NEWS | 6 ++++++
 1 file changed, 6 insertions(+)

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

commit 38262ec5c16907161a5e4720d620f7c36be86941
Author:     M. J. Everitt <m.j.everitt@iee.org>
AuthorDate: 2018-12-15 01:59:00 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-12-20 04:24:32 +0000

    Update documentation for PORT_LOGDIR* changes
    
    Suggested-by: Michael Everitt <m.j.everitt@iee.org>
    Bug: https://bugs.gentoo.org/668538
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 man/make.conf.5 | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

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

commit 22e8951521558a4488a44f4bdd276ced7c24b950
Author:     M. J. Everitt <m.j.everitt@iee.org>
AuthorDate: 2018-12-15 01:52:54 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-12-20 04:24:31 +0000

    Provide compatibility support for old PORT_LOGDIR* variable names
    
    Suggested-by: Zac Medico <zmedico@gentoo.org>
    Acked-by: Michael Everitt <m.j.everitt@iee.org>
    Bug: https://bugs.gentoo.org/668538
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/package/ebuild/config.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

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

commit 4fc481827a27a2f83ccc466ec4b47057a8ec949b
Author:     M. J. Everitt <m.j.everitt@iee.org>
AuthorDate: 2018-12-15 01:50:17 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-12-20 04:24:29 +0000

    Renamed PORT_LOGDIR[_CLEAN] to PORTAGE_LOGDIR[_CLEAN]
    
    To match similar existing PORTAGE_* variables
    
    Suggested-by: Zac Medico <zmedico@gentoo.org>
    Acked-by: Michael Everitt <m.j.everitt@iee.org>
    Bug: https://bugs.gentoo.org/668538
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 NEWS                                               |  2 +-
 cnf/make.conf.example                              | 12 +++++-----
 cnf/make.globals                                   |  2 +-
 lib/_emerge/post_emerge.py                         |  2 +-
 lib/portage/dbapi/vartree.py                       |  2 +-
 lib/portage/elog/mod_echo.py                       |  2 +-
 lib/portage/elog/mod_save.py                       |  4 ++--
 lib/portage/elog/mod_save_summary.py               |  4 ++--
 lib/portage/emaint/modules/logs/__init__.py        |  2 +-
 lib/portage/emaint/modules/logs/logs.py            | 22 +++++++++---------
 .../package/ebuild/_config/special_env_vars.py     |  2 +-
 lib/portage/package/ebuild/prepare_build_dirs.py   | 26 +++++++++++-----------
 lib/portage/tests/emerge/test_simple.py            |  2 +-
 man/ebuild.5                                       |  2 +-
 man/emaint.1                                       |  6 ++---
 man/emerge.1                                       |  2 +-
 man/make.conf.5                                    | 18 +++++++--------
 17 files changed, 56 insertions(+), 56 deletions(-)
Comment 5 Zac Medico gentoo-dev 2019-04-10 04:34:56 UTC
Fixed in portage-2.3.62.
Comment 6 Larry the Git Cow gentoo-dev 2023-10-06 20:47:56 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/elogv.git/commit/?id=e2b9632bb66e64283436ae6670dcca680a0e7363

commit e2b9632bb66e64283436ae6670dcca680a0e7363
Author:     Alfred Wingate <parona@protonmail.com>
AuthorDate: 2023-10-06 19:55:50 +0000
Commit:     Sebastian Pipping <sebastian@pipping.org>
CommitDate: 2023-10-06 20:47:06 +0000

    elogv: accept PORTAGE_LOGDIR
    
    Bug: https://bugs.gentoo.org/668538
    Closes: https://bugs.gentoo.org/901961
    Co-authored-by: josef.95 <josef64@posteo.org>
    Thanks-To: Sam James <sam@gentoo.org>
    Thanks-To: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>
    Thanks-To: Ninpo <ninpo@gap.la>
    Signed-off-by: Alfred Wingate <parona@protonmail.com>
    Signed-off-by: Sebastian Pipping <sping@gentoo.org>

 elogv | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Comment 7 Larry the Git Cow gentoo-dev 2023-10-06 22:14:31 UTC
The bug has been referenced in the following commit(s):

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

commit d3c4713877d6d400668fd1398812fa2641f852ba
Author:     Sebastian Pipping <sping@gentoo.org>
AuthorDate: 2023-10-06 22:10:08 +0000
Commit:     Sebastian Pipping <sping@gentoo.org>
CommitDate: 2023-10-06 22:11:29 +0000

    app-portage/elogv: 0.8.3 (with PORTAGE_LOGDIR support)
    
    Bug: https://bugs.gentoo.org/901961
    Bug: https://bugs.gentoo.org/668538
    Thanks-To: josef.95 <josef64@posteo.org>
    Thanks-To: Alfred Wingate <parona@protonmail.com>
    Thanks-To: Sam James <sam@gentoo.org>
    Signed-off-by: Sebastian Pipping <sping@gentoo.org>

 app-portage/elogv/Manifest           |  1 +
 app-portage/elogv/elogv-0.8.3.ebuild | 56 ++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)