diff --git a/pisi/actionsapi/gnuconfig.py b/pisi/actionsapi/gnuconfig.py index 86a6f55d..3cd2ca69 100644 --- a/pisi/actionsapi/gnuconfig.py +++ b/pisi/actionsapi/gnuconfig.py @@ -5,10 +5,10 @@ import os import string import re -import shutil # pisi modules from pisi.ui import ui +from pisi.util import copy_file # actions api modules from shell import * @@ -51,9 +51,9 @@ def gnuconfig_update(): newer_location = gnuconfig_findnewest() try: - shutil.copyfile(newer_location + '/config.sub', + copy_file(newer_location + '/config.sub', os.getcwd() + '/config.sub') - shutil.copyfile(newer_location + '/config.guess', + copy_file(newer_location + '/config.guess', os.getcwd() + '/config.guess') except IOError, e: ui.error ("Error : %s\n" % e) diff --git a/pisi/actionsapi/kde.py b/pisi/actionsapi/kde.py index 5513fce5..18e72214 100644 --- a/pisi/actionsapi/kde.py +++ b/pisi/actionsapi/kde.py @@ -10,7 +10,7 @@ from config import config # Global variables for compiling KDE programs... kde_dir = os.getenv('KDEDIR') qt_dir = os.getenv('QTDIR') -qt_libdir = os.getenv('QTDIR') + '/lib/' +qt_libdir = os.path.join(os.getenv('QTDIR') + 'lib/') def configure(parameters = ''): ''' FIXME: Düzgün hale getirilecek ''' diff --git a/pisi/actionsapi/pisitools.py b/pisi/actionsapi/pisitools.py index 671c959d..10224d9c 100644 --- a/pisi/actionsapi/pisitools.py +++ b/pisi/actionsapi/pisitools.py @@ -3,9 +3,10 @@ # standard python modules import os -import shutil import gzip +from pisi.util import copy_file + # actions api modules from config import config @@ -26,7 +27,7 @@ def dodoc(*documentList): for document in documentList: if os.access(document, os.F_OK): - shutil.copyfile(document, + copy_file(document, os.path.join(env.install_dir, dirs.doc, srcTag, @@ -37,17 +38,17 @@ def dosed(filename, *sedPattern): for pattern in sedPattern: os.system('sed -i -e \'' + pattern + '\' ' + filename) -def dosbin(filename, destination='/' + config.dirs.sbin): +def dosbin(filename, destination=config.dirs.sbin): env = config.env try: - os.makedirs(env.install_dir + destination) + os.makedirs(os.path.join(env.install_dir, destination)) except OSError: pass if os.access(filename, os.F_OK): - shutil.copyfile(filename, - os.path.join(env.install_dir + + copy_file(filename, + os.path.join(env.install_dir, destination, os.path.basename(filename))) @@ -56,7 +57,7 @@ def doman(filename): dirs = config.dirs man, postfix = filename.split('.') - destDir = os.path.join(env.install_dir, dirs.man, "man"+postfix) + destDir = os.path.join(env.install_dir, dirs.man, "man" + postfix) try: os.makedirs(destDir) except OSError: @@ -67,7 +68,7 @@ def doman(filename): gzfile.close() if os.access(filename, os.F_OK): - shutil.copyfile(filename + '.gz', + copy_file(filename + '.gz', os.path.join(destDir, os.path.basename(filename)))