Summary: | portageq get_repos, master_repositories, master_repos, and get_repo_path ignore the eroot parameter | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Bruce Schultz <brulzki> |
Component: | Tools | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | InVCS |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=648062 https://bugs.gentoo.org/show_bug.cgi?id=670558 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 671498 | ||
Attachments: |
portageq.patch
portageq-v2.patch |
Description
Bruce Schultz
2018-11-01 13:28:43 UTC
Here's a patch: --- /usr/lib/python-exec/python3.6/portageq 2018-07-26 23:57:43.000000000 +1000 +++ ./portageq 2018-11-01 23:29:43.285242218 +1000 @@ -882,6 +882,7 @@ master_repos.__doc__ = docstrings['master_repos'] +@uses_configroot @uses_eroot def get_repo_path(argv): Created attachment 553810 [details, diff]
portageq.patch
Attached a patch
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=1cc3352b6580af95965e231b35e80627b8391df4 commit 1cc3352b6580af95965e231b35e80627b8391df4 Author: Bruce Schultz <brulzki@gmail.com> AuthorDate: 2018-11-02 19:04:52 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2018-11-02 19:14:13 +0000 portageq get_repo_path: fix <eroot> parameter (bug 670082) Use the @uses_configroot decorator to make portage get_repo_path respect the <eroot> parameter, like portage repos_config since commit 382f4be415394886026ccd5dcd08ca96ecda31fa. Bug: https://bugs.gentoo.org/670082 Signed-off-by: Zac Medico <zmedico@gentoo.org> bin/portageq | 1 + 1 file changed, 1 insertion(+) Thanks! The same problem exists for the commands get_repos, master_repos and master_repositories. Here's a simple script to demonstrate #!/bin/bash mkdir -p mkdir /tmp/portageq/etc/portage cat > /tmp/portageq/etc/portage/repos.conf <<EOF [gentoo] location = /var/blah/gentoo [overlay] location = /var/blah/overlay masters = gentoo EOF portageq --version portageq get_repos /tmp/portageq portageq master_repos /tmp/portageq overlay portageq master_repositories /tmp/portageq overlay Output: Portage 2.3.49 gentoo (the master_repos commands both print blank lines, because overlay does not exist on the host system) Expected output: overlay gentoo gentoo gentoo Created attachment 554124 [details, diff]
portageq-v2.patch
Attaching another patch which fixes the get_repos and master_repos variants also.
(Let me know it you would prefer I open a new bug for those)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=089a6082e7d115b7dc07862121f68b72d9f123f6 commit 089a6082e7d115b7dc07862121f68b72d9f123f6 Author: Bruce Schultz <brulzki@gmail.com> AuthorDate: 2018-11-19 07:22:53 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2018-11-19 07:22:53 +0000 portageq get_repos: fix <eroot> parameter (bug 670082) Use the @uses_configroot decorator to make portage get_repos respect the <eroot> parameter, like portage repos_config since commit 382f4be415394886026ccd5dcd08ca96ecda31fa. Apply the same fix to master_repositories and master_repos. Bug: https://bugs.gentoo.org/670082 Signed-off-by: Zac Medico <zmedico@gentoo.org> bin/portageq | 3 +++ 1 file changed, 3 insertions(+) Fixed in portage-2.3.62. |