Beispiel #1
0
def __kdepath(name):
    """ return the path of the kde category directory. If multiple portages are used,
        return the correct one. """
    if name:
        rootDirFound = False
        name = normcase(name)
        for dirname in rootDirectories():
            dirname = normcase(dirname)
            if name.startswith(dirname):
                name = j(dirname, relpath(name, dirname).split(sep)[0])
                rootDirFound = True
                break
        # this is hopefully a fallback solution, if not - no idea
        if not rootDirFound: name = dn(dn(name))
    return name
Beispiel #2
0
        "--full-package",
        "--cleanimage",
        "--cleanbuild",
        "--createpatch",
    ]:
        mainBuildAction = i[2:]
    elif i == "--print-revision":
        mainBuildAction = "printrev"
        stayQuiet = True
    elif i == "--disable-buildhost":
        disableHostBuild = True
    elif i == "--disable-buildtarget":
        disableTargetBuild = True
    elif i == "--cleanup":
        utils.debug("Starting to clean your portage directory")
        for _dir in portage.rootDirectories():
            cleanup(_dir, True)
        cleanup(os.path.dirname(executableName), False)
        exit(0)
    elif i == "--cleanallbuilds":
        # clean complete build directory
        utils.cleanDirectory(os.path.join(os.getenv("KDEROOT"), "build"))
        exit(0)
    elif i.startswith("-"):
        usage()
        exit(1)
    else:
        packageName = i
        break

if stayQuiet == True: