* --security -> --security-only
This commit is contained in:
@@ -574,8 +574,8 @@ expanded to package names.
|
|||||||
|
|
||||||
super(Upgrade, self).options(group)
|
super(Upgrade, self).options(group)
|
||||||
buildno_opts(self, group)
|
buildno_opts(self, group)
|
||||||
group.add_option("--security", action="store_true",
|
group.add_option("--security-only", action="store_true",
|
||||||
default=False, help=_("select only security upgrades"))
|
default=False, help=_("Security related package upgrades only"))
|
||||||
group.add_option("-r", "--bypass-update-repo", action="store_true",
|
group.add_option("-r", "--bypass-update-repo", action="store_true",
|
||||||
default=False, help=_("Do not update repositories"))
|
default=False, help=_("Do not update repositories"))
|
||||||
group.add_option("--ignore-file-conflicts", action="store_true",
|
group.add_option("--ignore-file-conflicts", action="store_true",
|
||||||
|
|||||||
+2
-2
@@ -388,7 +388,7 @@ def upgrade_pkg_names(A = []):
|
|||||||
a minimum or maximum number of upgrades according to options."""
|
a minimum or maximum number of upgrades according to options."""
|
||||||
|
|
||||||
ignore_build = ctx.get_option('ignore_build_no')
|
ignore_build = ctx.get_option('ignore_build_no')
|
||||||
security = ctx.get_option('security')
|
security_only = ctx.get_option('security_only')
|
||||||
|
|
||||||
if not A:
|
if not A:
|
||||||
# if A is empty, then upgrade all packages
|
# if A is empty, then upgrade all packages
|
||||||
@@ -411,7 +411,7 @@ def upgrade_pkg_names(A = []):
|
|||||||
ctx.ui.info(_('Package %s is not available in repositories.') % x, True)
|
ctx.ui.info(_('Package %s is not available in repositories.') % x, True)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if security: # below is a readable functional code, don't overflow lines!
|
if security_only:
|
||||||
updates = [i for i in pkg.history if Version(i.release) > Version(release)]
|
updates = [i for i in pkg.history if Version(i.release) > Version(release)]
|
||||||
if not pisi.util.any(lambda i:i.type == 'security', updates):
|
if not pisi.util.any(lambda i:i.type == 'security', updates):
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user