2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-28 12:37:55 +00:00

[#2058] hammer.py: indentation (minor change)

This commit is contained in:
Andrei Pavel 2021-08-27 18:54:59 +03:00
parent 69f16658ba
commit 09f0616a10
No known key found for this signature in database
GPG Key ID: 86E9385BC2203766

View File

@ -2725,40 +2725,42 @@ def prepare_system_cmd(args):
args.dry_run, args.check_times, args.clean_start,
ccache_dir)
def upload_to_repo(args, pkgs_dir):
# NOTE: note the differences (if any) in system/revision vs args.system/revision
system, revision = get_system_revision()
repo_url = _get_full_repo_url(args.repository_url, system, revision, args.pkg_version)
assert repo_url is not None
upload_cmd = 'curl -v --netrc -f'
log.info('args.system %s, system = %s', args.system, system)
# NOTE: note the differences (if any) in system/revision vs args.system/revision
system, revision = get_system_revision()
repo_url = _get_full_repo_url(args.repository_url, system, revision, args.pkg_version)
assert repo_url is not None
upload_cmd = 'curl -v --netrc -f'
log.info('args.system %s, system = %s', args.system, system)
file_ext = ''
if system in ['ubuntu', 'debian']:
upload_cmd += ' -X POST -H "Content-Type: multipart/form-data" --data-binary "@%s" '
file_ext = '.deb'
file_ext = ''
if system in ['ubuntu', 'debian']:
upload_cmd += ' -X POST -H "Content-Type: multipart/form-data" --data-binary "@%s" '
file_ext = '.deb'
elif system in ['fedora', 'centos', 'rhel']:
upload_cmd += ' --upload-file %s '
file_ext = '.rpm'
elif system in ['fedora', 'centos', 'rhel']:
upload_cmd += ' --upload-file %s '
file_ext = '.rpm'
elif system == 'alpine':
upload_cmd += ' --upload-file %s '
file_ext = ''
repo_url = urljoin(repo_url, '%s/v%s/x86_64/' % (args.pkg_isc_version, revision))
elif system == 'alpine':
upload_cmd += ' --upload-file %s '
file_ext = ''
repo_url = urljoin(repo_url, '%s/v%s/x86_64/' % (args.pkg_isc_version, revision))
upload_cmd += ' ' + repo_url
upload_cmd += ' ' + repo_url
for fn in os.listdir(pkgs_dir):
log.info("debug: fn = %s", fn)
if file_ext and not fn.endswith(file_ext):
log.info('File extension "%s" is not supported by upload_to_repo function', file_ext)
continue
fp = os.path.join(pkgs_dir, fn)
log.info("upload cmd: %s", upload_cmd)
log.info("fp: %s", fp)
cmd = upload_cmd % fp
execute(cmd)
for fn in os.listdir(pkgs_dir):
log.info("debug: fn = %s", fn)
if file_ext and not fn.endswith(file_ext):
log.info('File extension "%s" is not supported by upload_to_repo function', file_ext)
continue
fp = os.path.join(pkgs_dir, fn)
log.info("upload cmd: %s", upload_cmd)
log.info("fp: %s", fp)
cmd = upload_cmd % fp
execute(cmd)
def build_cmd(args):
"""Check command args and run the build command."""