Quite often when I let my computer update the world with emerge, I forgot to manually disable gnome sleep function and so, the computer sleeps in the middle of emerge. As far as I know, using dbus emerge should be able to inhibit automatic sleep and I think this is an important feature that portage currently lacks. Reproducible: Always
why doesn't the sleep work for you at the moment?
(In reply to comment #1) > why doesn't the sleep work for you at the moment? > I am sorry if I wasn't clear. The problem is that the computer would sleep in the midst of an emerge process, if you have the gnome-power-manager set to sleep after a while of inactivity. And it doesn't consider a running emerge process as an activity. Thus, there is always a possibility that the computer will sleep in the middle of a running emerge process. I am proposing the emerge process to be able to use dbus to send a message to inhibit the automatic sleep. I hope this explains it better?
This is one of the many things that could be done by the user by using a wrapper script that does stuff before and after emerge. Something like this: $ cat /usr/local/bin/emerge #!/bin/bash # do stuff before emerge here /usr/bin/emerge "$@" # do stuff after emerge here So that the user doesn't have to use a wrapper script like the above, we can either add general-purpose hooks for users to do things like this (we already have support for a general-purpose --sync hook at /etc/portage/bin/post_sync), or else we can add variables similar to PORTAGE_IONICE_COMMAND that the user would have to set. For example, PORTAGE_SLEEP_INHIBIT_COMMAND and PORTAGE_SLEEP_ENABLE_COMMAND should work.