Пример #1
0
def switch_branch(args):
    if args.branch:
        try:
            pyfedpkg.switch_branch(args.branch)
        except pyfedpkg.FedpkgError, e:
            log.debug('Unable to switch to another branch: %s' % e)
Пример #2
0
def switch_branch(args):
    if args.branch:
        try:
            pyfedpkg.switch_branch(args.branch)
        except pyfedpkg.FedpkgError, e:
            log.debug('Unable to switch to another branch: %s' % e)
Пример #3
0
    # write formated string and flush
    sys.stdout.write("[% -36s] % 4s % 8s % 10s % 14s\r" %
                     ('=' * (int(percent_done * 36)), percent_done_str,
                      elapsed, data_done, speed))
    sys.stdout.flush()


def switch_branch(args):
    if args.branch:
        try:
            pyfedpkg.switch_branch(args.branch)
        except pyfedpkg.FedpkgError, e:
            log.debug('Unable to switch to another branch: %s' % e)
    else:
        try:
            pyfedpkg.switch_branch(list=1)
        except pyfedpkg.FedpkgError, e:
            log.debug('Unable to list branches: %s' % e)


def build(args):
    # We may not actually nave an srpm arg if we come directly from the build task
    if hasattr(args, 'srpm') and args.srpm and not args.scratch:
        log.error('Non-scratch builds cannot be from srpms.')
        sys.exit(1)
    # Place holder for if we build with an uploaded srpm or not
    url = None
    # See if this is a chain or not
    chain = None
    if hasattr(args, 'chain'):
        chain = args.chain
Пример #4
0
        else:
            speed = _format_size(float(total)/float(total_time)) + "/sec"

    # write formated string and flush
    sys.stdout.write("[% -36s] % 4s % 8s % 10s % 14s\r" % ('='*(int(percent_done*36)), percent_done_str, elapsed, data_done, speed))
    sys.stdout.flush()

def switch_branch(args):
    if args.branch:
        try:
            pyfedpkg.switch_branch(args.branch)
        except pyfedpkg.FedpkgError, e:
            log.debug('Unable to switch to another branch: %s' % e)
    else:
        try:
            pyfedpkg.switch_branch(list=1)
        except pyfedpkg.FedpkgError, e:
            log.debug('Unable to list branches: %s' % e)

def build(args):
    # We may not actually nave an srpm arg if we come directly from the build task
    if hasattr(args, 'srpm') and args.srpm and not args.scratch:
        log.error('Non-scratch builds cannot be from srpms.')
        sys.exit(1)
    # Place holder for if we build with an uploaded srpm or not
    url = None
    # See if this is a chain or not
    chain = None
    if hasattr(args, 'chain'):
        chain = args.chain
    if not args.user: