mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-19 11:42:43 +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))
|
||||
continue
|
||||
|
||||
cmd_args = ["reposync", "-a", arch, "-c", conf.name, "-d", "-p", str(args.working_dir.absolute()), "-e", cache_dir]
|
||||
print("Launching reposync", flush=True)
|
||||
cmd_args = [
|
||||
"dnf", "reposync",
|
||||
"-a", arch, "-c", conf.name,
|
||||
"--delete", "-p", str(args.working_dir.absolute())]
|
||||
print("Launching dnf reposync", flush=True)
|
||||
# print(cmd_args)
|
||||
ret = sp.run(cmd_args)
|
||||
if ret.returncode != 0:
|
||||
@ -234,7 +237,7 @@ enabled=1
|
||||
if args.download_repodata:
|
||||
download_repodata(url, path)
|
||||
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)
|
||||
ret = sp.run(cmd_args)
|
||||
calc_repo_size(path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user