diff --git a/pisi/actionsapi/autotools.py b/pisi/actionsapi/autotools.py index 348aa1e8..46355072 100644 --- a/pisi/actionsapi/autotools.py +++ b/pisi/actionsapi/autotools.py @@ -25,6 +25,7 @@ import pisi.actionsapi import pisi.actionsapi.get as get from pisi.actionsapi.shelltools import system from pisi.actionsapi.shelltools import can_access_file +from pisi.actionsapi.shelltools import unlink from pisi.actionsapi.libtools import gnuconfig_update class ConfigureError(pisi.actionsapi.Error): @@ -95,6 +96,11 @@ def make(parameters = ''): if system('make %s %s' % (get.makeJOBS(), parameters)): raise MakeError(_('Make failed.')) +def fixInfoDir(): + infoDir = "%s/usr/share/info/dir" % get.installDIR() + if can_access_file(infoDir): + unlink(infoDir) + def install(parameters = '', argument = 'install'): '''install source into install directory with given parameters''' if can_access_file('makefile') or can_access_file('Makefile') or can_access_file('GNUmakefile'): @@ -120,6 +126,8 @@ def install(parameters = '', argument = 'install'): else: raise InstallError(_('No Makefile found.')) + fixInfoDir() + def rawInstall(parameters = '', argument = 'install'): '''install source into install directory with given parameters = PREFIX=%s % get.installDIR()''' if can_access_file('makefile') or can_access_file('Makefile') or can_access_file('GNUmakefile'): @@ -128,6 +136,8 @@ def rawInstall(parameters = '', argument = 'install'): else: raise InstallError(_('No Makefile found.')) + fixInfoDir() + def aclocal(parameters = ''): '''generates an aclocal.m4 based on the contents of configure.in.''' if system('aclocal %s' % parameters): diff --git a/pisi/build.py b/pisi/build.py index 1a8dff31..a5363fc4 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -336,10 +336,6 @@ class Builder: # install function is mandatory! self.run_action_function(ctx.const.install_func, True) 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): # return the files those are not collected from the install dir