Allow centos 8-stream to be mirrored

Since the current CentOS 8 repositories are now under http://mirror.centos.org/centos/8-stream/ we need to be able to download/mirror this repository.
When using `8-stream` the script fails as it tries to evaluate stream as an integer making a range from `8` to `stream` which doesn't make sense obviously.

I did this locally and was able to mirror the `8-stream` repos. Just figured someone might also need that 😄 
Let me know if and where to add tests.
This commit is contained in:
Yves Siegrist 2022-11-21 16:36:02 +00:00 committed by GitHub
parent 48e45fa12e
commit 5aa59a0d94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,7 +153,7 @@ def main():
help='download repodata files instead of generating them') help='download repodata files instead of generating them')
args = parser.parse_args() args = parser.parse_args()
if '-' in args.os_version: if '-' in args.os_version and '-stream' not in args.os_version:
dash = args.os_version.index('-') dash = args.os_version.index('-')
os_list = [ str(i) for i in range( os_list = [ str(i) for i in range(
int(args.os_version[:dash]), int(args.os_version[:dash]),