Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 546210

Summary: [TRACKER] deprecated PORTDIR and PORTDIR_OVERLAY usage
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: Conceptual/Abstract IdeasAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal CC: esigra, salikov.alexey, Sergiy.Borodych, thomas.bettler
Priority: Normal Keywords: Tracker
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 560518, 663706, 474574, 478318, 478444, 485088, 505160, 581490    
Bug Blocks: 240187    

Description Zac Medico gentoo-dev 2015-04-10 19:20:56 UTC
Packages need to migrate away from reliance on the PORTDIR and PORTDIR_OVERLAY variables, since they are deprecated in favor of repos.conf.
Comment 1 Paul Varner (RETIRED) gentoo-dev 2015-04-14 21:30:06 UTC
Can we document the best portageq commands for replacement?

The best I can tell is:

PORTDIR: 
portageq get_repo_path / $(portageq repositories_configuration / | grep main-repo | awk '{print $3}')

PORTDIR_OVERLAY: 
portageq get_repo_path / $(portageq get_repos /) 
with the caveat that the main repo path is included as well
Comment 2 Zac Medico gentoo-dev 2015-04-14 23:47:49 UTC
(In reply to Paul Varner from comment #1)
> PORTDIR: 
> portageq get_repo_path / $(portageq repositories_configuration / | grep
> main-repo | awk '{print $3}')

It might be better if we don't encourage the notion of a "main-repo" because it could be ambiguous (maybe there are multiple repos with all the attributes of a "main-repo"). Can whatever code you were thinking would need this be adjusted to somehow handle this sort of ambiguity?

> PORTDIR_OVERLAY: 
> portageq get_repo_path / $(portageq get_repos /) 
> with the caveat that the main repo path is included as well

Inclusion of the main repo isn't really a caveat if you are handling the ambiguous case as discussed above.
Comment 3 Arfrever Frehtes Taifersar Arahesis 2015-04-17 18:29:49 UTC
main-repo attribute is deprecated...
Comment 4 Paul Varner (RETIRED) gentoo-dev 2015-04-23 21:29:48 UTC
Okay, given that we are moving to just a collection of repositories, I have updated euse in git to just search through all repositories for the information and have removed the concepts of PORTDIR and PORTDIR_OVERLAY.  Thanks for the guidance.