Ejemplo n.º 1
0
        local_version = None

    # Check present and version remotely
    if dependency in remote_packages:
        remotely_present = True
        remote_version = remote_packages[dependency]
    else:
        # Check again for present by importing
        remotely_present = remote.is_present_package(dependency)
        remote_version = None

    # If present both locally and remotely
    if locally_present and remotely_present:

        if config.versions:

            if local_version is None and remote_version is not None: log.warning(dependency + ": local version unknown")
            elif remote_version is None and local_version is not None: log.warning(dependency + ": remote version unknown")
            elif remote_version is None and local_version is None: log.warning(dependency + ": local and remote version unknown")
            elif local_version == remote_version: log.success(dependency + ": OK")
            else: log.warning(dependency + ": version " + local_version + " locally and version " + remote_version + " remotely")

        else: log.success(dependency + ": OK")

    # Not present on at least one system
    elif remotely_present and not locally_present: log.error(dependency + ": not present on this system")
    elif locally_present and not remotely_present: log.error(dependency + ": not present on remote '" + config.remote + "'")
    else: log.error(dependency + ": not present on either this sytem or remote '" + config.remote + "'")

# -----------------------------------------------------------------
Ejemplo n.º 2
0
    if introspection.is_std_lib(dependency) and not arguments.standard:
        continue

    # Check presency and version
    if dependency in packages:
        present = True
        if arguments.version: version = packages[dependency]
    else:
        present = introspection.is_present_package(dependency)
        version = None

    # Check whether the current package is present
    if present:

        # Show package name, whether it's present and version number (if requested)
        if version is not None:
            log.success(dependency + ": present (version " + version + ")")
        else:
            log.success(dependency + ": present")

    # The package is not present
    else:
        log.error(dependency + ": not found")

    # List the PTS modules that have this dependency
    if arguments.modules:
        for script in script_list:
            log.info("    " + script.split("PTS/pts/")[1])

# -----------------------------------------------------------------
Ejemplo n.º 3
0
    # Get the list of PTS scripts for this dependency
    script_list = dependencies[dependency]

    # Skip packages from the standard library, unless the appropriate flag is enabled
    if introspection.is_std_lib(dependency) and not arguments.standard: continue

    # Check presency and version
    if dependency in packages:
        present = True
        if arguments.version: version = packages[dependency]
    else:
        present = introspection.is_present_package(dependency)
        version = None

    # Check whether the current package is present
    if present:

        # Show package name, whether it's present and version number (if requested)
        if version is not None: log.success(dependency + ": present (version " + version + ")")
        else: log.success(dependency + ": present")

    # The package is not present
    else: log.error(dependency + ": not found")

    # List the PTS modules that have this dependency
    if arguments.modules:
        for script in script_list: log.info("    " + script.split("PTS/pts/")[1])

# -----------------------------------------------------------------