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
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
Depends on:
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: ---


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/", line 22, in __getattribute__
    result = object.__getattribute__(self, '_get_target')()
  File "/usr/lib64/portage/pym/portage/", line 689, in _get_target
    return _get_legacy_global(name)
  File "/usr/lib64/portage/pym/portage/", line 35, in _get_legacy_global
    portage.db = portage.create_trees(**kwargs)
  File "/usr/lib64/portage/pym/portage/", line 582, in create_trees
    env=env, eprefix=eprefix)
  File "/usr/lib64/portage/pym/portage/proxy/", line 31, in __call__
    return result(*args, **kwargs)
  File "/usr/lib64/portage/pym/portage/package/ebuild/", line 360, in __init__
  File "/usr/lib64/portage/pym/portage/package/ebuild/_config/", line 279, in set_root_override
  File "/usr/lib64/portage/pym/portage/util/", 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