Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 506186 - return run_action(emerge_config) portage error with features=buildpkg
Summary: return run_action(emerge_config) portage error with features=buildpkg
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 484436
  Show dependency tree
 
Reported: 2014-03-29 20:34 UTC by Jack Morgan (RETIRED)
Modified: 2014-08-04 02:12 UTC (History)
0 users

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


Attachments
emerge --info (emerge-info.log,3.12 KB, text/x-log)
2014-03-29 20:38 UTC, Jack Morgan (RETIRED)
Details
empty queue patch (0001-Fix-startinganemptyqueuetraceback(bug506186).patch,872 bytes, patch)
2014-03-29 21:06 UTC, Brian Dolbec (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Morgan (RETIRED) gentoo-dev 2014-03-29 20:34:14 UTC
when setting features=buildpkg, i'm getting errors from portage between compile and merge. I'm assuming his is when it creates the binpkg. I wasn't seeing these errors when features didn't include buildpkg

Reproducible: Always



Expected Results:  
>>> Completed installing cracklib-2.9.1 into /var/tmp/portage/sys-libs/cracklib-2.9.1/image/
 
strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version
   lib64/libcrack.so.2.9.0
   usr/sbin/cracklib-packer
   usr/sbin/cracklib-check
   usr/sbin/cracklib-unpacker
ecompressdir: bzip2 -9 /usr/share/doc
Traceback (most recent call last):
  File "/usr/bin/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/main.py", line 1031, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 4062, in run_action
    emerge_config.args, spinner)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 453, in action_build
    retval = mergetask.merge()
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1019, in merge
    rval = self._merge()
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1408, in _merge
    self._main_loop()
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1385, in _main_loop
    self._event_loop.iteration()
  File "/usr/lib64/portage/pym/portage/util/_eventloop/EventLoop.py", line 268, in iteration
    if not x.callback(f, event, *x.args):
  File "/usr/lib64/portage/pym/portage/util/_async/PipeLogger.py", line 133, in _output_handler
    self._unregister_if_appropriate(event)
  File "/usr/lib64/portage/pym/_emerge/AbstractPollTask.py", line 129, in _unregister_if_appropriate
    self.wait()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 57, in wait
    self._wait_hook()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 175, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/portage/pym/_emerge/SpawnProcess.py", line 168, in _pipe_logger_exit
    self.wait()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 57, in wait
    self._wait_hook()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 175, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/portage/pym/_emerge/EbuildPhase.py", line 296, in _post_phase_exit
    self.wait()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 57, in wait
    self._wait_hook()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 175, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/portage/pym/_emerge/TaskSequence.py", line 43, in _task_exit_handler
    self.wait()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 57, in wait
    self._wait_hook()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 175, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/portage/pym/_emerge/CompositeTask.py", line 134, in _default_final_exit
    return self.wait()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 57, in wait
    self._wait_hook()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 175, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/portage/pym/_emerge/EbuildBuild.py", line 324, in _build_exit
    self._start_task(binpkg_tasks, self._buildpkg_exit)
  File "/usr/lib64/portage/pym/_emerge/CompositeTask.py", line 151, in _start_task
    task.start()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 30, in start
    self._start()
  File "/usr/lib64/portage/pym/_emerge/TaskSequence.py", line 26, in _start
    self._start_next_task()
  File "/usr/lib64/portage/pym/_emerge/TaskSequence.py", line 33, in _start_next_task
    self._start_task(self._task_queue.popleft(),
IndexError: pop from an empty deque
Comment 1 Jack Morgan (RETIRED) gentoo-dev 2014-03-29 20:38:18 UTC
Created attachment 373848 [details]
emerge --info
Comment 2 Brian Dolbec (RETIRED) gentoo-dev 2014-03-29 21:06:43 UTC
Created attachment 373854 [details, diff]
empty queue patch

This should eliminate the problem.
Comment 3 Zac Medico gentoo-dev 2014-04-18 17:22:42 UTC
(In reply to Brian Dolbec from comment #2)
> Created attachment 373854 [details, diff] [details, diff]
> empty queue patch
> 
> This should eliminate the problem.

This patch will probably cause emerge to hang, because TaskSequence will not call the _buildpkg_exit exit handler from EbuildBuild.py, line 324. I'll look into writing a new patch...
Comment 4 Brian Dolbec (RETIRED) gentoo-dev 2014-04-18 19:11:57 UTC
Zac, shouldn't this be enough to fix that possibility?  Note the other patch has already been committed to master.  I followed all the logic in CompositeTask that is run at the end of a task.

diff --git a/pym/_emerge/TaskSequence.py b/pym/_emerge/TaskSequence.py
index b4bfefe..345ada9 100644
--- a/pym/_emerge/TaskSequence.py
+++ b/pym/_emerge/TaskSequence.py
@@ -33,6 +33,10 @@ class TaskSequence(CompositeTask):
                if self._task_queue:
                        self._start_task(self._task_queue.popleft(),
                                self._task_exit_handler)
+               else:
+                       self._current_task = None
+                       self.returncode = os.EX_OK
+                       self.wait()
 
        def _task_exit_handler(self, task):
                if self._default_exit(task) != os.EX_OK:
Comment 5 Zac Medico gentoo-dev 2014-04-18 19:54:54 UTC
(In reply to Brian Dolbec from comment #4)
> Zac, shouldn't this be enough to fix that possibility?

Yeah, that would work. I've already committed this fix though:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=cb7d234d24bcada5e486ab1975d3592ac5af7218
Comment 6 Jack Morgan (RETIRED) gentoo-dev 2014-05-12 02:38:44 UTC
I've not tried this patch but found the cause of my errors. I had PORTAGE_BINPKG_FORMAT="" set in make.conf. I need either tar or rpm as a value.
Comment 7 Brian Dolbec (RETIRED) gentoo-dev 2014-08-04 02:12:40 UTC
released in portage-2.2.11