Kaydet (Commit) d2fffc69 authored tarafından Ali Rıza KESKİN's avatar Ali Rıza KESKİN

artk destdir varsa trigger ve sysconf yaplmyor

üst e3d2dbf2
......@@ -306,7 +306,7 @@ class Install(AtomicOperation):
def preinstall(self):
if ('postOps' in self.metadata.package.isA):
if ctx.config.get_option('ignore_configure'):
if ctx.config.get_option('ignore_configure') or ctx.get_option('destdir'):
self.installdb.mark_pending(self.pkginfo.name)
return 0
ctx.ui.info(_('Pre-install configuration have been run for \"{}\"'.format(self.pkginfo.name)),color='brightyellow')
......@@ -328,7 +328,7 @@ class Install(AtomicOperation):
# os.chown(fpath, int(_file.uid), int(_file.gid))
if ('postOps' in self.metadata.package.isA):
if ctx.config.get_option('ignore_configure'):
if ctx.config.get_option('ignore_configure') or ctx.get_option('destdir'):
self.installdb.mark_pending(self.pkginfo.name)
return 0
ctx.ui.info(_('Configuring post-install \"{}\"'.format(self.pkginfo.name)),color='brightyellow')
......@@ -579,12 +579,12 @@ class Remove(AtomicOperation):
+ self.package_name)
self.check_dependencies()
if not ctx.config.get_option('ignore_configure'):
if not ctx.config.get_option('ignore_configure') or ctx.get_option('destdir'):
self.run_preremove()
for fileinfo in self.files.list:
self.remove_file(fileinfo, self.package_name, True)
if not ctx.config.get_option('ignore_configure'):
if not ctx.config.get_option('ignore_configure') or ctx.get_option('destdir'):
self.run_postremove()
self.update_databases()
......
......@@ -238,7 +238,7 @@ def show_changed_configs(package_dict, opt):
for file in package_dict[package]:
new_file = util.join_path(ctx.config.history_dir(), opt, package, ctx.config.dest_dir(), file)
if os.path.exist(new_file):
if os.path.exists(new_file):
ctx.ui.info(_("[*] Changes in config file: {}").format(file), color='yellow')
os.system("diff -u {0} {1} | less".format(new_file, file))
prompt=ctx.ui.choose(_("[?] Select the process which will be happened:"),
......
......@@ -16,6 +16,7 @@
import os
import sys
import inary.context as ctx
# Gettext Library
import gettext
......@@ -69,6 +70,8 @@ def t_r(name, path, command):
def proceed(force=False):
if ctx.get_option('destdir'):
return
sys.stdout.write(_("Process triggering for sysconf.\n"))
if force:
os.system("rm -rf {}".format(sysconfdir))
......
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