Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 405979 - In prefix branch, typo in data.py results in trace when UNIX group owner of prefix does not exist
Summary: In prefix branch, typo in data.py results in trace when UNIX group owner of p...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: x86 OS X
: Normal normal (vote)
Assignee: Gentoo Prefix
URL: http://prefix.gentooexperimental.org:...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-27 04:50 UTC by Lucian Poston
Modified: 2012-03-01 20:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to fix typo (portage.prefix.diff,741 bytes, patch)
2012-02-27 04:51 UTC, Lucian Poston
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lucian Poston 2012-02-27 04:50:18 UTC
Emerge crashes in prefixed portage when the group owning the prefix does not exist.

When connected to my VPN, groups are queried from ldap. I created the prefix while connected to VPN, so the prefix directory is owned by a group in ldap. When I disconnect from the VPN, the owning group does not exist as far a portage can tell.

In this situation, a typo in data.py causes emerge to crash.

Reproducible: Always

Steps to Reproduce:
1. Create gentoo prefix.
2. Remove group owning the prefix.
3. Run `emerge` to see crash
Actual Results:  
emerge crashes. See traceback.

$ emerge
Traceback (most recent call last):
  File "/Users/poston/gentoo/usr/bin/emerge", line 44, in <module>
    retval = emerge_main()
  File "/Users/poston/gentoo/usr/lib/portage/pym/_emerge/main.py", line 1617, in emerge_main
    settings, trees, mtimedb = load_emerge_config()
  File "/Users/poston/gentoo/usr/lib/portage/pym/_emerge/actions.py", line 3038, in load_emerge_config
    settings._init_dirs()
  File "/Users/poston/gentoo/usr/lib/portage/pym/portage/package/ebuild/config.py", line 868, in _init_dirs
    ensure_dirs(mydir, gid=gid, mode=mode, mask=modemask)
  File "/Users/poston/gentoo/usr/lib/portage/pym/portage/util/__init__.py", line 1268, in ensure_dirs
    perms_modified = apply_permissions(dir_path, **kwargs)
  File "/Users/poston/gentoo/usr/lib/portage/pym/portage/util/__init__.py", line 915, in apply_permissions
    (gid != -1 and gid != stat_cached.st_gid):
  File "/Users/poston/gentoo/usr/lib/portage/pym/portage/proxy/objectproxy.py", line 79, in __ne__
    return object.__getattribute__(self, '_get_target')() != other
  File "/Users/poston/gentoo/usr/lib/portage/pym/portage/data.py", line 220, in _get_target
    return _get_global(object.__getattribute__(self, '_name'))
  File "/Users/poston/gentoo/usr/lib/portage/pym/portage/data.py", line 118, in _get_global
    _("portage: '%s' user or '%s' group missing." % (_get_global('_portage_uname'), _get_global('_portage_grpname')))) + "\n", noiselevel=-1)
  File "/Users/poston/gentoo/usr/lib/portage/pym/portage/data.py", line 205, in _get_global
    raise AssertionError('unknown name: %s' % k)
AssertionError: unknown name: _portage_uname

Expected Results:  
Emerge should not crash
Comment 1 Lucian Poston 2012-02-27 04:51:00 UTC
Created attachment 303447 [details, diff]
patch to fix typo
Comment 2 Fabian Groffen gentoo-dev 2012-02-27 08:00:40 UTC
Thanks!

Have a git email-patch for me ready so I can easily push it?
Comment 3 Fabian Groffen gentoo-dev 2012-03-01 20:36:10 UTC
Committed, thanks.
Comment 4 Fabian Groffen gentoo-dev 2012-03-01 20:48:25 UTC
released in portage-2.2.01.20271