예제 #1
0
def packit_base(ctx, debug, fas_user, keytab, dry_run):
    """Integrate upstream open source projects into Fedora operating system."""
    if debug:
        # to be able to logger.debug() also in get_user_config()
        set_logging(level=logging.DEBUG)

    c = Config.get_user_config()
    c.debug = debug or c.debug
    c.dry_run = dry_run or c.dry_run
    c.fas_user = fas_user or c.fas_user
    c.keytab_path = keytab or c.keytab_path
    ctx.obj = c

    if ctx.obj.debug:
        set_logging(level=logging.DEBUG)
        set_logging(logger_name="sandcastle", level=logging.DEBUG)
    else:
        set_logging(level=logging.INFO)

    packit_version = get_distribution("packitos").version
    logger.debug(f"Packit {packit_version} is being used.")
예제 #2
0
def packit_base(ctx, debug, fas_user, keytab, dry_run, remote):
    """Integrate upstream open source projects into Fedora operating system."""
    if debug:
        # to be able to logger.debug() also in get_user_config()
        set_logging(level=logging.DEBUG)

    c = Config.get_user_config()
    c.debug = debug or c.debug
    c.dry_run = dry_run or c.dry_run
    c.fas_user = fas_user or c.fas_user
    c.keytab_path = keytab or c.keytab_path
    c.upstream_git_remote = remote or c.upstream_git_remote
    ctx.obj = c

    if ctx.obj.debug:
        set_logging(level=logging.DEBUG)
        set_logging(logger_name="sandcastle", level=logging.DEBUG)
        set_logging(logger_name="rebasehelper", level=logging.DEBUG)
    else:
        set_logging(level=logging.INFO)
        # rebase-helper prints errors about missing patches which are not an error in our case
        #   Patch glibc-fedora-nscd.patch does not exist
        set_logging(logger_name="rebasehelper", level=logging.CRITICAL)

    packit_version = get_distribution("packitos").version
    logger.debug(f"Packit {packit_version} is being used.")
예제 #3
0
# Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT

from packit.utils.logging import set_logging

# debug logs from packit while testing
set_logging(level=10)