[equo] "equo security update", allow --force

This commit is contained in:
Fabio Erculiani
2010-01-02 17:11:41 +01:00
parent 707d27dede
commit 8ffd4f1947
2 changed files with 5 additions and 1 deletions

View File

@@ -104,6 +104,7 @@ help_opts = [
None,
(1, 'security', 1, _('security infrastructure functions')),
(2, 'update', 2, _('download the latest Security Advisories')),
(3, '--force', 1, _('force download even if already up-to-date')),
(2, 'list', 2, _('list all the available Security Advisories')),
(3, '--affected', 1, _('list only affected')),
(3, '--unaffected', 1, _('list only unaffected')),

View File

@@ -24,6 +24,7 @@ def security(options):
only_affected = False
only_unaffected = False
fetch = False
force = False
for opt in options:
if opt == "--affected":
only_affected = True
@@ -31,6 +32,8 @@ def security(options):
only_unaffected = True
elif opt == "--fetch":
fetch = True
elif opt == "--force":
force = True
from entropy.client.interfaces import Client
entropy_client = Client()
@@ -43,7 +46,7 @@ def security(options):
if not entropy.tools.is_user_in_entropy_group():
print_error(er_txt)
return 1
rc = security_intf.fetch_advisories()
rc = security_intf.fetch_advisories(force = force)
elif options[0] == "list":
security_intf = entropy_client.Security()