Kaydet (Commit) c3149d75 authored tarafından Your Name's avatar Your Name

upgrade buglari halloldu

üst 94a394f7
......@@ -301,6 +301,8 @@ class Install(AtomicOperation):
return self.installdb.has_package(self.package_fname)
def preinstall(self):
print(self.metadata.package.name)
print(self.metadata.package.isA)
if ('postOps' in self.metadata.package.isA):
if not self.trigger.preinstall(self.package.pkg_dir()):
......
......@@ -99,6 +99,7 @@ def install_pkg_names(A, reinstall=False, extra=False):
for x in sorted_order:
ctx.ui.info(_("Downloading {} / {} => [{}]").format(sorted_order.index(x) + 1, len(sorted_order),x), color="yellow")
install_op = atomicoperations.Install.from_name(x)
install_op.store_inary_files()
paths.append(install_op.package_fname)
if x in extra_packages or (extra and x in A):
......@@ -116,7 +117,6 @@ def install_pkg_names(A, reinstall=False, extra=False):
if conflicts:
operations.remove.remove_conflicting_packages(conflicts)
for path in paths:
if installdb.has_package(path):
remove_op = atomicoperations.Remove(path)
......
......@@ -13,6 +13,7 @@
#
import sys
import os
import gettext
......@@ -216,9 +217,11 @@ def upgrade(A=None, repo=None):
conflicts = operations.helper.check_conflicts(order, packagedb)
paths = []
extra_paths = {}
for x in order:
ctx.ui.info(_("Downloading {} / {} => [{}]").format(order.index(x) + 1, len(order),x), color="yellow")
install_op = atomicoperations.Install.from_name(x)
install_op.store_inary_files()
paths.append(install_op.package_fname)
# fetch to be upgraded packages but do not install them.
......
......@@ -27,15 +27,8 @@ class Trigger:
"""Compiles the script and returns a code object"""
fname = util.join_path(self.postscript)
try:
buf = open(fname).read()
return compile(buf, fname, "exec")
except IOError as e:
raise Error(_("Unable to read Post Operations Script ({0}): {1}").format(
fname, e))
except SyntaxError as e:
raise Error(_("SyntaxError in Post Operations Script ({0}): {1}").format(
fname, e))
buf = open(fname).read()
return compile(buf, fname, "exec")
def run_command(self, func):
""""""
......
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