mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 12:42:50 +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/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"
|
echo "YUM finished"
|
||||||
|
@ -63,9 +63,11 @@ def main():
|
|||||||
name = substitute_vars(args.repo_name, vardict)
|
name = substitute_vars(args.repo_name, vardict)
|
||||||
url = substitute_vars(args.base_url, vardict)
|
url = substitute_vars(args.base_url, vardict)
|
||||||
try:
|
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:
|
if r.status_code < 400 or r.status_code == 403:
|
||||||
yield (name, url)
|
yield (name, url)
|
||||||
|
else:
|
||||||
|
print(url, "->", r.status_code)
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
|
||||||
@ -92,7 +94,7 @@ enabled=1
|
|||||||
|
|
||||||
if len(dest_dirs) == 0:
|
if len(dest_dirs) == 0:
|
||||||
print("Nothing to sync")
|
print("Nothing to sync")
|
||||||
failed.append((name, arch))
|
failed.append(('', arch))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
cmd_args = ["reposync", "-a", arch, "-c", conf.name, "-d", "-p", str(args.working_dir.absolute()), "-e", cache_dir]
|
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