diff --git a/src/pisi/actionsapi/autotools.py b/src/pisi/actionsapi/autotools.py index 45ab5cc5..23be7a4a 100644 --- a/src/pisi/actionsapi/autotools.py +++ b/src/pisi/actionsapi/autotools.py @@ -9,6 +9,8 @@ def configure(parameters = None): ''' FIXME: Düzgün hale getirilecek ''' ''' {EXTRA} = '--with-nls --with-libusb --with-something-usefull ''' + # FIXME: I don't think its feasible to write all these parameters + # here. There should be a way to get all these... pisi.context.Constants? configure_string = './configure --prefix=/usr \ --host=i686-pc-linux-gnu \ --mandir=/usr/share/man \ @@ -17,7 +19,8 @@ def configure(parameters = None): --sysconfdir=/etc \ --localstatedir=/var/lib {EXTRA}' - os.system(configure_string.replace('{EXTRA}', parameters)) + cmd = configure_string.replace('{EXTRA}', parameters) + os.system(cmd) def make(): ''' FIXME: Düzgün hale getirilecek ''' @@ -35,6 +38,8 @@ def install(): mandir={D}/usr/share/man \ sysconfdir={D}/etc \ install' - - # FIXME: need to get install directory from pisi.config... - os.system(install_string.replace('{D}',os.path.dirname(os.path.dirname(os.getcwd())) + const.build_install_dir_suffix)) + + cmd = os.path.dirname(os.path.dirname(os.getcwd())) + \ + const.build_install_dir_suffix + cmd = install_string.replace('{D}', cmd) + os.system(cmd) diff --git a/src/pisi/actionsapi/gnuconfig.py b/src/pisi/actionsapi/gnuconfig.py index 789929a8..36722c78 100644 --- a/src/pisi/actionsapi/gnuconfig.py +++ b/src/pisi/actionsapi/gnuconfig.py @@ -5,14 +5,25 @@ import os, string, re, shutil from shell import * def gnuconfig_findnewest(): - ''' find the newest config.* file according to timestamp and return it ''' + ''' find the newest config.* file according to + timestamp and return it''' - locations = ['/usr/share/gnuconfig/config.sub', '/usr/share/automake-1.8/config.sub', '/usr/share/automake-1.7/config.sub', '/usr/share/automake-1.6/config.sub', '/usr/share/automake-1.5/config.sub', '/usr/share/automake-1.4/config.sub'] + locations = ['/usr/share/gnuconfig/config.sub', + '/usr/share/automake-1.8/config.sub', + '/usr/share/automake-1.7/config.sub', + '/usr/share/automake-1.6/config.sub', + '/usr/share/automake-1.5/config.sub', + '/usr/share/automake-1.4/config.sub'] newer_location = {} for i in locations: - newer_location[i] = re.sub('\'', '', string.split((cat( i ) | tr(str.rstrip) | grep ('^timestamp') | join), '=')[1]) + newer_location[i] = re.sub('\'', + '', + string.split((cat(i) | + tr(str.rstrip) | + grep ('^timestamp') | + join), '=')[1]) keys = newer_location.keys() keys.sort() @@ -26,8 +37,10 @@ def gnuconfig_update(): newer_location = gnuconfig_findnewest() try: - shutil.copyfile(newer_location + '/config.sub', os.getcwd() + '/config.sub') - shutil.copyfile(newer_location + '/config.guess', os.getcwd() + '/config.guess') + shutil.copyfile(newer_location + '/config.sub', + os.getcwd() + '/config.sub') + shutil.copyfile(newer_location + '/config.guess', + os.getcwd() + '/config.guess') except IOError: print 'Hata mata...' sys.exit()