Kaydet (Commit) ae39ef20 authored tarafından Eray Özkural's avatar Eray Özkural

* add support for handling indo entries, but this doesn't quite

  work because install-info command does not work as expected
üst 63f5cf41
...@@ -107,6 +107,7 @@ class Install(AtomicOperation): ...@@ -107,6 +107,7 @@ class Install(AtomicOperation):
self.extract_install() self.extract_install()
self.store_pisi_files() self.store_pisi_files()
self.update_environment() self.update_environment()
self.update_info()
self.register_comar() self.register_comar()
self.postinstall() self.postinstall()
...@@ -329,6 +330,11 @@ class Install(AtomicOperation): ...@@ -329,6 +330,11 @@ class Install(AtomicOperation):
# installed packages # installed packages
ctx.packagedb.add_package(self.pkginfo, pisi.itembyrepodb.installed, txn=txn) ctx.packagedb.add_package(self.pkginfo, pisi.itembyrepodb.installed, txn=txn)
def update_info(self):
for x in self.files.list:
if x.type == 'info':
os.system('install-info /%s /usr/share/info/dir' % x.path)
def update_environment(self): def update_environment(self):
# check if we have any shared objects or anything under # check if we have any shared objects or anything under
# /etc/env.d # /etc/env.d
...@@ -391,7 +397,7 @@ class Remove(AtomicOperation): ...@@ -391,7 +397,7 @@ class Remove(AtomicOperation):
self.check_dependencies() self.check_dependencies()
self.run_preremove() self.run_preremove()
self.update_info()
for fileinfo in self.files.list: for fileinfo in self.files.list:
self.remove_file(fileinfo) self.remove_file(fileinfo)
...@@ -475,6 +481,12 @@ class Remove(AtomicOperation): ...@@ -475,6 +481,12 @@ class Remove(AtomicOperation):
ctx.filesdb.remove_files(self.files, txn) ctx.filesdb.remove_files(self.files, txn)
pisi.packagedb.remove_tracking_package(self.package_name, txn) pisi.packagedb.remove_tracking_package(self.package_name, txn)
def update_info(self):
for x in self.files.list:
if x.type == 'info':
os.system('install-info --delete /%s /usr/share/info/dir ' % x.path)
def remove_single(package_name): def remove_single(package_name):
Remove(package_name).run() Remove(package_name).run()
......
...@@ -342,6 +342,10 @@ class Builder: ...@@ -342,6 +342,10 @@ class Builder:
# install function is mandatory! # install function is mandatory!
self.run_action_function(ctx.const.install_func, True) self.run_action_function(ctx.const.install_func, True)
self.set_state("installaction") self.set_state("installaction")
infodir = join(self.pkg_install_dir(), '/usr/share/info/dir')
if os.path.exists(infodir):
os.unlink(infodir)
def get_abandoned_files(self): def get_abandoned_files(self):
# return the files those are not collected from the install dir # return the files those are not collected from the install dir
......
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