Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 537298 - =sys-apps/openrc-0.13.8 - File "/usr/lib64/python2.7/site-packages/portage/util/__init__.py", line 1694, in new_protect_filename: NameError: global name '_os' is not defined
Summary: =sys-apps/openrc-0.13.8 - File "/usr/lib64/python2.7/site-packages/portage/ut...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 484436
  Show dependency tree
 
Reported: 2015-01-21 22:50 UTC by Jason Mours
Modified: 2015-02-12 06:10 UTC (History)
0 users

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


Attachments
build.log (openrc-0.13.8-build.log,56.11 KB, text/plain)
2015-01-21 22:51 UTC, Jason Mours
Details
emerge-info (openrc-0.13.8.emerge.info,18.55 KB, text/plain)
2015-01-21 22:51 UTC, Jason Mours
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Mours 2015-01-21 22:50:56 UTC
Consecutive emerge of sys-apps/openrc-0.13.8 results in fail during install with the following backtrace.

>>> /etc/init.d/._cfg0000_savecache
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/_MergeProcess.py", line 234, in _spawn
    prev_mtimes=self.prev_mtimes, counter=counter)
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/vartree.py", line 4951, in merge
    counter=counter)
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/vartree.py", line 4116, in treewalk
    rval = self._merge_contents(srcroot, destroot, cfgfiledict)
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/vartree.py", line 4392, in _merge_contents
    self.settings["EPREFIX"].lstrip(os.sep), cfgfiledict, mymtime):
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/vartree.py", line 4584, in mergeme
    myrealdest, mydmode, destmd5, mydest_link)
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/vartree.py", line 4884, in _protect
    force=force)
  File "/usr/lib64/python2.7/site-packages/portage/util/__init__.py", line 1694, in new_protect_filename
    pfile_link = _os.readlink(_unicode_encode(old_pfile,
NameError: global name '_os' is not defined

Running etc-update for automerge of trivial changes eliminates the bug and I can re-emerge openrc with issues, else I get the above backtrace.

Posting build.log

Reproducible: Sometimes

Steps to Reproduce:
1.emerge sys-apps/openrc-0.13.8
2.DO NOT run etc-update following successful install
3.re-emerge sys-apps/openrc-0.13.8
Comment 1 Jason Mours 2015-01-21 22:51:31 UTC
Created attachment 394548 [details]
build.log
Comment 2 Jason Mours 2015-01-21 22:51:54 UTC
Created attachment 394550 [details]
emerge-info
Comment 3 William Hubbs gentoo-dev 2015-01-22 13:42:55 UTC
This was assigned to OpenRC. However, looking at the bug, it looks like
a portage/emerge issue.

Please send it back to OpenRC and let me know if you disagree.

Thanks,

William
Comment 4 Brian Dolbec (RETIRED) gentoo-dev 2015-01-22 17:11:18 UTC
Thank you, fixed in commit: 

https://github.com/gentoo/portage/commit/5808da4e04aabe18b8b14b5fa7ae1311e84f14aa
Comment 5 Brian Dolbec (RETIRED) gentoo-dev 2015-02-12 06:10:39 UTC
Released in portage-2.2.17