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

lp ve cp duzeltildi

üst cf7bf3c8
......@@ -39,23 +39,19 @@ def configure_pending(packages=None):
order = inary.data.pgraph.generate_pending_order(packages)
for x in order:
if installdb.has_package(x):
pkginfo = installdb.get_package(x)
pkg_path = installdb.package_path(x)
m = inary.data.metadata.MetaData()
metadata_path = util.join_path(pkg_path, ctx.const.metadata_xml)
m.read(metadata_path)
# FIXME: we need a full package info here!
pkginfo.name = x
ctx.ui.notify(inary.ui.configuring, package=pkginfo, files=None)
command=m.package.postopsPostInstall[0]
if os.system(command) != 0:
ctx.ui.warning(_('Configuration of \"{}\" package failed.').format(pkginfo.name))
else:
installdb.clear_pending(x)
for x in order:
if installdb.has_package(x):
pkginfo = installdb.get_package(x)
pkg_path = installdb.package_path(x)
m = inary.data.metadata.MetaData()
metadata_path = util.join_path(pkg_path, ctx.const.metadata_xml)
m.read(metadata_path)
# FIXME: we need a full package info here!
pkginfo.name = x
ctx.ui.notify(inary.ui.configuring, package=pkginfo, files=None)
inary.trigger.Trigger().postinstall(pkg_path)
ctx.ui.notify(inary.ui.configured, package=pkginfo, files=None)
installdb.clear_pending(x)
class ConfigurePending(command.PackageOp, metaclass=command.autocommand):
__doc__ = _("""Configure pending packages
......
......@@ -33,20 +33,19 @@ def configure_pending(packages=None):
# configure them in reverse topological order of dependency
installdb = inary.db.installdb.InstallDB()
order=packages
if True:
for x in order:
if installdb.has_package(x):
pkginfo = installdb.get_package(x)
pkg_path = installdb.package_path(x)
m = inary.data.metadata.MetaData()
metadata_path = util.join_path(pkg_path, ctx.const.metadata_xml)
m.read(metadata_path)
# FIXME: we need a full package info here!
pkginfo.name = x
ctx.ui.notify(inary.ui.configuring, package=pkginfo, files=None)
inary.trigger.post_install(pkg_path)
ctx.ui.notify(inary.ui.configured, package=pkginfo, files=None)
installdb.clear_pending(x)
for x in order:
if installdb.has_package(x):
pkginfo = installdb.get_package(x)
pkg_path = installdb.package_path(x)
m = inary.data.metadata.MetaData()
metadata_path = util.join_path(pkg_path, ctx.const.metadata_xml)
m.read(metadata_path)
# FIXME: we need a full package info here!
pkginfo.name = x
ctx.ui.notify(inary.ui.configuring, package=pkginfo, files=None)
inary.trigger.Trigger().postinstall(pkg_path)
ctx.ui.notify(inary.ui.configured, package=pkginfo, files=None)
installdb.clear_pending(x)
class ConfigurePending(command.PackageOp, metaclass=command.autocommand):
__doc__ = _("""Reconfigure pending packages
......
......@@ -166,6 +166,9 @@ class Fetcher:
if os.path.exists(self.archive_file) and not os.access(self.archive_file, os.W_OK):
raise FetchError(_('Access denied to destination file: "{}"').format(self.archive_file))
if os.path.exists(self.archive_file):
ctx.ui.info(_("File already exsist. Download skiped..."), verbose=True)
return 0
c = pycurl.Curl()
c.protocol = self.url.scheme()
c.setopt(c.URL, self.url.get_uri())
......
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