diff --git a/pisi/actionsapi/pisitools.py b/pisi/actionsapi/pisitools.py index 6936704a..0dfd7a24 100644 --- a/pisi/actionsapi/pisitools.py +++ b/pisi/actionsapi/pisitools.py @@ -151,6 +151,17 @@ def domove(sourceFile, destination, destinationFile = ''): else: move(file, get.installDIR() + os.path.join(destination, destinationFile)) +def dorename(sourceFile, destinationFile): + ''' renames sourceFile as destinationFile''' + + ''' example call: pisitools.dorename("/usr/bin/bash", "bash.old") ''' + ''' the result of the previous example would be "/usr/bin/bash.old" ''' + + try: + os.rename(get.installDIR() + sourceFile, get.installDIR() + destinationFile) + except OSError: + ctx.ui.error('\n!!! ActionsAPI [dorename]: No such file or directory: "%s"...' % sourceFile) + def dopython(): '''FIXME: What the hell is this?''' pass diff --git a/tools/repostats.py b/tools/repostats.py index e4bd9d33..c464562b 100755 --- a/tools/repostats.py +++ b/tools/repostats.py @@ -135,6 +135,8 @@ for pak in paks: for lice in lices: licenses.add(lice) host = pisi.uri.URI(spec.source.archiveUri).location() + if host == "": + print pisi.uri.URI(spec.source.archiveUri) hosts.add(host) print "%s İstatistikleri" % (sys.argv[1])