update_portage_tree() now:
- watch stderr and stdout for each command
- use layman command instead of layman API for sync because
layman API doesn't work when stdout or stderr is not a real file
(we could probably work around that with pipes and epoll)
- use egencache instead of emerge to generate cache
- export PORTAGE_CONFIGROOT, ROOT, EIX_CACHEFILE etc.. so they
are used everywhere
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Management commands are refactored to have the logic moved from the
commands themselves to a separated function in order to make them easily
convertible into Celery tasks
Commands are renamed to be modules importable from other python scripts
Signed-off-by: volpino <fox91@anche.no>