mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 04:12:42 +00:00
change the URL for probing
This commit is contained in:
parent
55f9d8f519
commit
4e8488e5f3
@ -21,5 +21,5 @@ echo "APT finished"
|
||||
|
||||
# =================== YUM/DNF repos ==========================
|
||||
|
||||
"$yum_sync" "${BASE_URL}/yum/repos/@{os_ver}/" 7 kubernetes x86_64,armhfp,aarch64 "@{comp}-el@{os_ver}-@{arch}" "$YUM_PATH"
|
||||
"$yum_sync" "${BASE_URL}/yum/repos/@{comp}-el@{os_ver}-@{arch}/" 7 kubernetes x86_64,armhfp,aarch64 "@{comp}-el@{os_ver}-@{arch}" "$YUM_PATH"
|
||||
echo "YUM finished"
|
||||
|
@ -63,9 +63,11 @@ def main():
|
||||
name = substitute_vars(args.repo_name, vardict)
|
||||
url = substitute_vars(args.base_url, vardict)
|
||||
try:
|
||||
r = requests.head(url, timeout=(7,7))
|
||||
r = requests.head((url+"/repodata/repomd.xml").replace("//", "/"), timeout=(7,7))
|
||||
if r.status_code < 400 or r.status_code == 403:
|
||||
yield (name, url)
|
||||
else:
|
||||
print(url, "->", r.status_code)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
|
||||
@ -92,7 +94,7 @@ enabled=1
|
||||
|
||||
if len(dest_dirs) == 0:
|
||||
print("Nothing to sync")
|
||||
failed.append((name, arch))
|
||||
failed.append(('', arch))
|
||||
continue
|
||||
|
||||
cmd_args = ["reposync", "-a", arch, "-c", conf.name, "-d", "-p", str(args.working_dir.absolute()), "-e", cache_dir]
|
||||
|
Loading…
x
Reference in New Issue
Block a user