Kaydet (Commit) 7ba0d8a5 authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

deleted unuseful command distupdate

üst 3fb4b6ce
......@@ -40,7 +40,6 @@ from inary.reactor import *
import inary.operations.build
import inary.operations.check
import inary.operations.emerge
import inary.operations.distupdate
import inary.operations.install
import inary.operations.history
import inary.operations.helper
......@@ -63,7 +62,7 @@ def set_scom_updated(updated):
@param updated: True if COMAR package is updated, else False
"""
ctx.scom_updated = updated
def set_userinterface(ui):
"""
Set the user interface where the status information will be send
......
# -*- coding:utf-8 -*-
#
# Copyright (C) 2016 - 2017, Suleyman POYRAZ (Zaryob)
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
#
import optparse
import gettext
__trans = gettext.translation('inary', fallback=True)
_ = __trans.gettext
import inary.cli.command as command
import inary.context as ctx
import inary.reactor as Reactor
import inary.db
class DistUpdate(command.PackageOp, metaclass=command.autocommand):
__doc__ = _("""Update the system a new release
Usage: dist-update [ next_dist_release_repo_url ]
""")
def __init__(self, args):
super(DistUpdate, self).__init__(args)
name = ("dist-update", "distup")
def options(self):
group = optparse.OptionGroup(self.parser, _("dist-update options"))
super(DistUpdate, self).options(group)
group.add_option("-x", "--exclude", action="append",
default=None, help=_("When upgrading system, ignore packages and components whose basenames match pattern."))
group.add_option("--exclude-from", action="store",
default=None,
help=_("When upgrading system, ignore packages "
"and components whose basenames match "
"any pattern contained in file."))
group.add_option("-s", "--compare-sha1sum", action="store_true",
default=False, help=_("compare sha1sum repo and installed packages"))
self.parser.add_option_group(group)
def run(self):
self.init()
for arg in self.args:
if arg.endswith(".xml") or arg.endswith("xml.xz"):
targetrepo = arg
break
Reactor.distupdate(targetrepo)
This diff is collapsed.
......@@ -15,7 +15,7 @@ from inary.data import pgraph
import os
import fcntl
import inary
import inary.api
import inary.api
import inary.context as ctx
import inary.db
import inary.errors
......@@ -341,35 +341,6 @@ def upgrade(packages=[], repo=None):
inary.db.historydb.HistoryDB().create_history("upgrade")
return inary.operations.upgrade.upgrade(packages, repo)
def distupdate(targetrepo):
weddingplanner = inary.operations.distupdate.DistUpdatePlanner(nextRepoUri=targetrepo, Debug=True)
weddingplanner.plan()
ctx.ui.info(inary.util.colorize(_("*** Conclusion ***"),"red"))
if len(weddingplanner.missingPackages):
ctx.ui.info(_(" found packages preventing distupdate"))
ctx.ui.info(weddingplanner.missingPackages)
else:
ctx.ui.info(_(" distupdate is good to go"))
ctx.ui.info(_(" installed size {}").format(weddingplanner.sizeOfInstalledPackages))
ctx.ui.info(_(" installed size after update {}").format(weddingplanner.sizeOfInstalledPackagesAfterUpdate))
ctx.ui.info(_(" download size {}").format(weddingplanner.sizeOfPackagesToDownload))
ctx.ui.info(_(" biggest package size {}").format(weddingplanner.sizeOfBiggestPackage))
ctx.ui.info(_(" total space needed for distupdate {}").format(weddingplanner.sizeOfNeededTotalSpace))
if ctx.ui.confirm(str(_('Do you want make dist update?'))):
for repo in inary.db.repodb.RepoDB().list_repos():
repodb.remove_repo(repo)
inary.db.flush_caches()
ctx.ui.debug(_('Repo {} removed from system.').format(name))
add_repo('distuprepo',targetrepo)
update_repo(['distuprepo'])
inary.operations.distupdate.MakeDistUpdate()
@locked
def remove(packages, ignore_dependency=False, ignore_safety=False):
"""
......@@ -622,7 +593,7 @@ def generate_pending_order(A):
@locked
def configure_pending(packages=None):
# Import SCOM
# Import SCOM
import inary.scomiface
# start with pending packages
......@@ -899,4 +870,3 @@ def clearCache(all=False):
removeOrderByLimit(cacheDir, order, cacheLimit)
else:
removeAll(cacheDir)
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