summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/actions.py13
-rw-r--r--pym/_emerge/unmerge.py2
2 files changed, 10 insertions, 5 deletions
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index ba2e631f2..a62b30510 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -588,15 +588,18 @@ def action_depclean(settings, trees, ldpath_mtimes,
return rval
if cleanlist:
- unmerge(root_config, myopts, "unmerge",
+ if unmerge(root_config, myopts, "unmerge",
cleanlist, ldpath_mtimes, ordered=ordered,
- scheduler=scheduler)
+ scheduler=scheduler):
+ rval = os.EX_OK
+ else:
+ rval = 1
if action == "prune":
- return
+ return rval
if not cleanlist and "--quiet" in myopts:
- return
+ return rval
print("Packages installed: " + str(len(vardb.cpv_all())))
print("Packages in world: " + \
@@ -609,6 +612,8 @@ def action_depclean(settings, trees, ldpath_mtimes,
else:
print("Number removed: "+str(len(cleanlist)))
+ return rval
+
def calc_depclean(settings, trees, ldpath_mtimes,
myopts, action, args_set, spinner):
allow_missing_deps = bool(args_set)
diff --git a/pym/_emerge/unmerge.py b/pym/_emerge/unmerge.py
index 852ad936a..c76afdf73 100644
--- a/pym/_emerge/unmerge.py
+++ b/pym/_emerge/unmerge.py
@@ -526,7 +526,7 @@ def unmerge(root_config, myopts, unmerge_action,
if "--pretend" in myopts:
#we're done... return
- return 0
+ return 1
if "--ask" in myopts:
if userquery("Would you like to unmerge these packages?",
enter_invalid) == "No":