Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 542520 - emerge ignores PORTDIR_OVERLAY set on the command line
Summary: emerge ignores PORTDIR_OVERLAY set on the command line
Status: RESOLVED OBSOLETE
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 240187
  Show dependency tree
 
Reported: 2015-03-08 07:50 UTC by Jeroen Roovers (RETIRED)
Modified: 2023-08-01 03:09 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 Jeroen Roovers (RETIRED) gentoo-dev 2015-03-08 07:50:56 UTC
I have two overlays set, one of them the CVS repo gentoo-x86 and one of them a local one.

When I call

PORTDIR=gentoo-x86 PORTDIR_OVERLAY='' emerge ...

ebuilds from the local overlay should not be considered, yet they are.

[ebuild   R   ~] sys-apps/portage-2.2.18::gentoo  USE="(ipc) xattr -build -doc -epydoc -selinux" LINGUAS="-ru" PYTHON_TARGETS="python2_7 python3_3 python3_4 -pypy" 0 KiB
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2015-03-08 07:53:05 UTC
The same applies when I set PORTDIR_OVERLAY=/dev/null.
Comment 2 Arfrever Frehtes Taifersar Arahesis 2015-03-08 10:43:01 UTC
PORTDIR and PORTDIR_OVERLAY are in the process of being deleted.
Permanent configuration of repositories is now in repos.conf.
Configuration of repositories can be overridden by PORTAGE_REPOSITORIES variable.

Example:
PORTAGE_REPOSITORIES=$'[gentoo]\nlocation = /some/path\n[another_repository]\nlocation = /another/path' emerge ...
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-03-09 05:07:32 UTC
We need a sane replacement. Like a variable that overrides all repositories by paths, with Portage reading repo_name itself.
Comment 4 Brian Dolbec (RETIRED) gentoo-dev 2015-03-09 15:38:53 UTC
What if we add a repo based repos.conf that can be used as a backup for the missing information like portage does now for the main repo.

So, the order would be, read /etc/portage/repos.conf/, failing that, check the repo for .../profiles/repos.conf, failing that /usr/share/portage/config/repos.conf.


That way a simple path override should work using data from the repo's backup conf.
Comment 5 Tim Harder gentoo-dev 2015-03-09 15:46:42 UTC
(In reply to Brian Dolbec from comment #4)
> What if we add a repo based repos.conf that can be used as a backup for the
> missing information like portage does now for the main repo.
> 
> So, the order would be, read /etc/portage/repos.conf/, failing that, check
> the repo for .../profiles/repos.conf, failing that
> /usr/share/portage/config/repos.conf.
> 
> 
> That way a simple path override should work using data from the repo's
> backup conf.

That seems like a chicken and egg problem. Under that scheme, how does the PM know where the repo is when it's not configured anywhere in the system?

Personally, I'd prefer something like PORTAGE_REPOS="/path/to/repo1 /path/to/repo2" emerge ... (mostly because I've already implemented something similar). ;)

I'm not sure we need to support setting all the various repos.conf settings for this use case. The priority/weight of the repos could be implicitly determined by the order of the listed repo paths in PORTAGE_REPOS and the repo_ids could be just pulled from the relevant files in the repo.
Comment 6 Tim Harder gentoo-dev 2015-03-09 15:48:50 UTC
(In reply to Tim Harder from comment #5)
> (In reply to Brian Dolbec from comment #4)
> > What if we add a repo based repos.conf that can be used as a backup for the
> > missing information like portage does now for the main repo.
> > 
> > So, the order would be, read /etc/portage/repos.conf/, failing that, check
> > the repo for .../profiles/repos.conf, failing that
> > /usr/share/portage/config/repos.conf.
> > 
> > 
> > That way a simple path override should work using data from the repo's
> > backup conf.
> 
> That seems like a chicken and egg problem. Under that scheme, how does the
> PM know where the repo is when it's not configured anywhere in the system?

Unless you're saying a combination of something like PORTAGE_REPOS and adding that file to a repo. That's viable I guess.
Comment 7 Brian Dolbec (RETIRED) gentoo-dev 2015-03-09 16:13:10 UTC
Yeah, that way if the repo had other settings like sync-type and sync-url, they could be synced, etc...

But yes, primarily PORTAGE_REPOS provides the path to the repos for basic use. Any extra configs would be provided by the repo's repos.conf if it exists, or errors for those extra operations like sync.