Kaydet (Commit) f8fd259f authored tarafından frknkrc44's avatar frknkrc44

Bug fixes 42

üst 81e07499
......@@ -57,13 +57,15 @@ Remove all orphaned packages from the system.
from inary.operations import remove
self.init()
orphaned = [0]
first = True
while len(orphaned) > 1:
orphaned = self.installdb.get_orphaned()
if ctx.get_option('exclude'):
orphaned = inary.blacklist.exclude(
orphaned, ctx.get_option('exclude'))
remove.remove(orphaned)
remove.remove(orphaned, confirm=first)
first = False
if not self.options.ignore_sysconf:
sysconf.proceed(self.options.force_sysconf)
......@@ -32,7 +32,7 @@ _ = __trans.gettext
@util.locked
def remove(A, ignore_dep=False, ignore_safety=False):
def remove(A, ignore_dep=False, ignore_safety=False, confirm=False):
"""
Removes the given packages from the system
@param A: list of package names -> list_of_strings
......@@ -98,7 +98,7 @@ def remove(A, ignore_dep=False, ignore_safety=False):
color='cyan')
del removal_size, symbol
if len(order) > len(A_0):
if confirm and len(order) > len(A_0):
if not ctx.ui.confirm(_('Would you like to continue?')):
ctx.ui.warning(_('Package removal declined.'))
return False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment