Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 491818 - =sys-apps/portage-2.2.7 ebuild cannot cope with ROOT
Summary: =sys-apps/portage-2.2.7 ebuild cannot cope with ROOT
Status: UNCONFIRMED
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:
 
Reported: 2013-11-20 23:00 UTC by Joakim Tjernlund
Modified: 2013-11-21 08:50 UTC (History)
0 users

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 Joakim Tjernlund 2013-11-20 23:00:49 UTC
I got the impression that I could use ROOT= with the ebuild command such as:
ROOT="/myroot" ebuild /usr/portage/sys-apps/busybox/busybox-1.21.1.ebuild --debug merge

That gives me this error instead:

Traceback (most recent call last):
  File "/usr/bin/ebuild", line 92, in <module>
    portage.settings.get("EBUILD_DEFAULT_OPTS", ""))
  File "/usr/lib64/portage/pym/portage/proxy/objectproxy.py", line 22, in __getattribute__
    result = object.__getattribute__(self, '_get_target')()
  File "/usr/lib64/portage/pym/portage/__init__.py", line 689, in _get_target
    return _get_legacy_global(name)
  File "/usr/lib64/portage/pym/portage/_legacy_globals.py", line 35, in _get_legacy_global
    portage.db = portage.create_trees(**kwargs)
  File "/usr/lib64/portage/pym/portage/__init__.py", line 582, in create_trees
    env=env, eprefix=eprefix)
  File "/usr/lib64/portage/pym/portage/proxy/objectproxy.py", line 31, in __call__
    return result(*args, **kwargs)
  File "/usr/lib64/portage/pym/portage/package/ebuild/config.py", line 360, in __init__
    locations_manager.set_root_override(make_conf.get("ROOT"))
  File "/usr/lib64/portage/pym/portage/package/ebuild/_config/LocationsManager.py", line 279, in set_root_override
    ensure_dirs(self.target_root)
  File "/usr/lib64/portage/pym/portage/util/__init__.py", line 1397, in ensure_dirs
    raise PermissionDenied(func_call)
portage.exception.PermissionDenied: makedirs('/myroot/')

Got an uptodate machine
Comment 1 Mike Gilbert gentoo-dev 2013-11-21 00:05:45 UTC
Are you running the ebuild command as a non-privileged user?
Comment 2 Joakim Tjernlund 2013-11-21 08:50:32 UTC
right, I did use my user account. Guess I should not play with
this stuff when it is late :)

However, it is a bit confusing that I cannot do even unpack because
ebuild insists on creating the directory beforehand.
It should delay the dir creating to it is needed.
Now I cannot build a binary package if ROOT is present