* quick solution: write comar provides in info

This commit is contained in:
Eray Özkural
2005-10-03 15:11:45 +00:00
parent 25ed7c169c
commit 7b175cd641
4 changed files with 32 additions and 17 deletions
+19 -15
View File
@@ -13,6 +13,10 @@
# Standard Python Modules
import os
import gettext
__trans = gettext.translation('pisi', fallback=True)
_ = __trans.ugettext
# Pisi Modules
import pisi.context as ctx
@@ -29,7 +33,7 @@ class ConfigureError(pisi.actionsapi.Error):
self.value = value
ctx.ui.error(value)
if can_access_file('config.log'):
ctx.ui.error('\n!!! Please attach the config.log to your bug report:\n%s/config.log\n' % os.getcwd())
ctx.ui.error(_('Please attach the config.log to your bug report:\n%s/config.log') % os.getcwd())
class MakeError(pisi.actionsapi.Error):
def __init__(self, value):
@@ -68,9 +72,9 @@ def configure(parameters = ''):
get.confDIR(), get.localstateDIR(), parameters)
if system(args):
raise ConfigureError('!!! Configure failed...\n')
raise ConfigureError(_('Configure failed.'))
else:
raise ConfigureError('!!! No configure script found...\n')
raise ConfigureError(_('No configure script found.'))
def rawConfigure(parameters = ''):
'''configure source with given parameters = "--prefix=/usr --libdir=/usr/lib --with-nls"'''
@@ -78,9 +82,9 @@ def rawConfigure(parameters = ''):
gnuconfig_update()
if system('./configure %s' % parameters):
raise ConfigureError('!!! Configure failed...\n')
raise ConfigureError(_('Configure failed.'))
else:
raise ConfigureError('!!! No configure script found...\n')
raise ConfigureError(_('No configure script found.'))
def compile(parameters = ''):
#FIXME: Only one package uses this until now, hmmm
@@ -89,7 +93,7 @@ def compile(parameters = ''):
def make(parameters = ''):
'''make source with given parameters = "all" || "doc" etc.'''
if system('make %s' % parameters):
raise MakeError('!!! Make failed...\n')
raise MakeError(_('Make failed.'))
def install(parameters = '', argument = 'install'):
'''install source into install directory with given parameters'''
@@ -112,39 +116,39 @@ def install(parameters = '', argument = 'install'):
'argument':argument}
if system(args):
raise InstallError('!!! Install failed...\n')
raise InstallError(_('Install failed.'))
else:
raise InstallError('!!! No Makefile found...\n')
raise InstallError(_('No Makefile found.'))
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'):
if system('make %s %s' % (parameters, argument)):
raise InstallError('!!! Install failed...\n')
raise InstallError(_('Install failed.'))
else:
raise InstallError('!!! No Makefile found...\n')
raise InstallError(_('No Makefile found.'))
def aclocal(parameters = ''):
'''generates an aclocal.m4 based on the contents of configure.in.'''
if system('aclocal %s' % parameters):
raise RunTimeError('!!! Running aclocal failed...')
raise RunTimeError(_('Running aclocal failed.'))
def autoconf(parameters = ''):
'''generates a configure script'''
if system('autoconf %s' % parameters):
raise RunTimeError('!!! Running autoconf failed...')
raise RunTimeError(_('Running autoconf failed.'))
def autoreconf(parameters = ''):
'''re-generates a configure script'''
if system('autoreconf %s' % parameters):
raise RunTimeError('!!! Running autoconf failed...')
raise RunTimeError(_('Running autoconf failed.'))
def automake(parameters = ''):
'''generates a makefile'''
if system('automake %s' % parameters):
raise RunTimeError('!!! Running automake failed...')
raise RunTimeError(_('Running automake failed.'))
def autoheader(parameters = ''):
'''generates templates for configure'''
if system('autoheader %s' % parameters):
raise RunTimeError('!!! Running autoheader failed...')
raise RunTimeError(_('Running autoheader failed.'))
+6 -2
View File
@@ -13,6 +13,10 @@
# Standart Python Modules
import os
import gettext
__trans = gettext.translation('pisi', fallback=True)
_ = __trans.ugettext
# PISI Modules
import pisi.actionsapi
import pisi.context as ctx
@@ -119,9 +123,9 @@ def getBinutilsInfo(util):
cross_build_name = '%s-%s' % (HOST(), util)
if not exists_binary(cross_build_name):
if not exists_binary(util):
raise BinutilsError('util %s cannot be found' % util)
raise BinutilsError(_('Util %s cannot be found') % util)
else:
ctx.ui.debug('Warning: %s does not exist, using plain name %s' \
ctx.ui.debug(_('Warning: %s does not exist, using plain name %s') \
% (cross_build_name, util))
return util
else:
+4
View File
@@ -13,6 +13,10 @@
# standard python modules
import os
import gettext
__trans = gettext.translation('pisi', fallback=True)
_ = __trans.ugettext
# Pisi Modules
import pisi.context as ctx
+3
View File
@@ -368,6 +368,9 @@ class PackageInfo:
s = 'Name: ' + self.name
s += '\nSummary: ' + self.summary
s += '\nDescription: ' + self.description
s += '\nProvides: '
for x in self.providesComar:
s += x.om
return s
def pkg_dir(self):