unmerge: fix PORTAGE_BACKGROUND logic
authorZac Medico <zmedico@gentoo.org>
Sat, 26 Mar 2011 07:38:23 +0000 (00:38 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 26 Mar 2011 19:27:07 +0000 (12:27 -0700)
pym/_emerge/actions.py

index 84ed27c9e226b1f356dda78bc8e6192fdfbd5e5b..865c68396021f23e9677ff2708515ceb8dc6957b 100644 (file)
@@ -2602,6 +2602,13 @@ def action_uninstall(settings, trees, ldpath_mtimes,
        sched._background = sched._background_mode()
        sched._status_display.quiet = True
 
+       if sched._background:
+               sched.settings.unlock()
+               sched.settings["PORTAGE_BACKGROUND"] = "1"
+               sched.settings.backup_changes("PORTAGE_BACKGROUND")
+               sched.settings.lock()
+               sched.pkgsettings[root] = portage.config(clone=sched.settings)
+
        if action in ('clean', 'unmerge') or \
                (action == 'prune' and "--nodeps" in opts):
                # When given a list of atoms, unmerge them in the order given.