mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 04:12:42 +00:00
Update yum-sync.py to match tools in dokcer image
Thanks to Hongren Zheng. Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
This commit is contained in:
parent
6020ee70ba
commit
1d16b9da20
@ -221,8 +221,11 @@ enabled=1
|
|||||||
failed.append(('', 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 = [
|
||||||
print("Launching reposync", flush=True)
|
"dnf", "reposync",
|
||||||
|
"-a", arch, "-c", conf.name,
|
||||||
|
"--delete", "-p", str(args.working_dir.absolute())]
|
||||||
|
print("Launching dnf reposync", flush=True)
|
||||||
# print(cmd_args)
|
# print(cmd_args)
|
||||||
ret = sp.run(cmd_args)
|
ret = sp.run(cmd_args)
|
||||||
if ret.returncode != 0:
|
if ret.returncode != 0:
|
||||||
@ -234,7 +237,7 @@ enabled=1
|
|||||||
if args.download_repodata:
|
if args.download_repodata:
|
||||||
download_repodata(url, path)
|
download_repodata(url, path)
|
||||||
else:
|
else:
|
||||||
cmd_args = ["createrepo", "--update", "-v", "-c", cache_dir, "-o", str(path), str(path)]
|
cmd_args = ["createrepo_c", "--update", "-v", "-c", cache_dir, "-o", str(path), str(path)]
|
||||||
# print(cmd_args)
|
# print(cmd_args)
|
||||||
ret = sp.run(cmd_args)
|
ret = sp.run(cmd_args)
|
||||||
calc_repo_size(path)
|
calc_repo_size(path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user