spawn_nofetch: fix PORTAGE_BUILDIR_LOCKED state
authorZac Medico <zmedico@gentoo.org>
Mon, 17 Jan 2011 18:55:42 +0000 (10:55 -0800)
committerZac Medico <zmedico@gentoo.org>
Mon, 17 Jan 2011 18:55:42 +0000 (10:55 -0800)
We need to correct the state of this variable here, in order to avoid
erroneous "ebuild phase 'nofetch' has exited unexpectedly" messages.

pym/portage/package/ebuild/_spawn_nofetch.py

index 175d88bd141bb2cd9e45c5f9e1ccb390494710a2..9ae80105072ea2132609a782c4930358070c91de 100644 (file)
@@ -54,6 +54,8 @@ def spawn_nofetch(portdb, ebuild_path, settings=None):
        private_tmpdir = tempfile.mkdtemp(dir=portage_tmpdir)
        settings['PORTAGE_TMPDIR'] = private_tmpdir
        settings.backup_changes('PORTAGE_TMPDIR')
+       # private temp dir was just created, so it's not locked yet
+       settings.pop('PORTAGE_BUILDIR_LOCKED', None)
 
        try:
                doebuild_environment(ebuild_path, 'nofetch',