ebuild(1): fix AttributeError for merge phase
authorZac Medico <zmedico@gentoo.org>
Fri, 25 Mar 2011 08:23:51 +0000 (01:23 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 25 Mar 2011 08:23:51 +0000 (01:23 -0700)
  File "pym/portage/dbapi/vartree.py", line 4043, in merge
    merge_task.start()
  File "pym/_emerge/AsynchronousTask.py", line 23, in start
    self._start()
  File "pym/_emerge/SpawnProcess.py", line 118, in _start
    self._reg_id = self.scheduler.register(files.process.fileno(),
AttributeError: 'NoneType' object has no attribute 'register'

pym/portage/dbapi/vartree.py

index a8888ae95298ed9f4d4f31c1713bbb059069a6a4..a58521a367b6ac87621f9c2eea486eae9c2b49c0 100644 (file)
@@ -4036,7 +4036,8 @@ def merge(mycat, mypkg, pkgloc, infloc,
        background = (settings.get('PORTAGE_BACKGROUND') == '1')
        merge_task = MergeProcess(
                dblink=dblink, mycat=mycat, mypkg=mypkg, settings=settings,
-               treetype=mytree, vartree=vartree, scheduler=scheduler,
+               treetype=mytree, vartree=vartree,
+               scheduler=(scheduler or PollScheduler().sched_iface),
                background=background, blockers=blockers, pkgloc=pkgloc,
                infloc=infloc, myebuild=myebuild, mydbapi=mydbapi,
                prev_mtimes=prev_mtimes, logfile=settings.get('PORTAGE_LOG_FILE'))