diff --git a/pisi/actionsapi/pisitools.py b/pisi/actionsapi/pisitools.py index b4e632b5..7352d616 100644 --- a/pisi/actionsapi/pisitools.py +++ b/pisi/actionsapi/pisitools.py @@ -55,11 +55,6 @@ def doexe(sourceFile, destinationDirectory): ''' example call: pisitools.doexe("kde-3.4.sh", "/etc/X11/Sessions")''' executable_insinto(join_path(get.installDIR(), destinationDirectory), sourceFile) -def dohard(sourceFile, destinationFile): - '''creates hard link between sourceFile and destinationFile''' - #FIXME: How can i use hard-links in Python? - ctx.ui.warning('*** Hard links not implemented yet') - def dohtml(*sourceFiles): '''inserts the files in the list of files into /usr/share/doc/PACKAGE/html''' diff --git a/pisi/actionsapi/shelltools.py b/pisi/actionsapi/shelltools.py index 2f5a8de3..8fd6a29c 100644 --- a/pisi/actionsapi/shelltools.py +++ b/pisi/actionsapi/shelltools.py @@ -122,6 +122,7 @@ def move(source, destination): else: error(_('ActionsAPI [move]: File %s doesn\'t exists.') % (filePath)) +# FIXME: instead of passing a sym parameter, split copy and copytree into 4 different function def copy(source, destination, sym = True): '''recursively copy a "source" file or directory to "destination"''' for filePath in glob.glob(source): @@ -138,10 +139,10 @@ def copy(source, destination, sym = True): os.remove(destination) os.symlink(os.readlink(filePath), destination) elif isLink(filePath) and not sym: - if isDirectory(os.readlink(filePath)): - copytree(os.readlink(filePath), destination) + if isDirectory(filePath): + copytree(filePath, destination) else: - shutil.copy(os.readlink(filePath), destination) + shutil.copy(filePath, destination) elif isDirectory(filePath): copytree(filePath, destination, sym) else: