8303691: Fedora based devkit build should load more packages from archive location

Reviewed-by: mbaesken, erikj
This commit is contained in:
Christoph Langer 2023-03-09 21:59:12 +00:00
parent e930b63a8f
commit 562c8fc668

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -71,6 +71,7 @@ else ifeq ($(BASE_OS), Fedora)
BASE_URL := http://fedora.riscv.rocks/repos-dist/$(BASE_OS_VERSION)/$(ARCH)/Packages/
else
DEFAULT_OS_VERSION := 27
LATEST_ARCHIVED_OS_VERSION := 35
ifeq ($(BASE_OS_VERSION), )
BASE_OS_VERSION := $(DEFAULT_OS_VERSION)
endif
@ -79,11 +80,11 @@ else ifeq ($(BASE_OS), Fedora)
else
FEDORA_TYPE := fedora/linux
endif
ARCHIVED := $(shell [ $(BASE_OS_VERSION) -lt $(DEFAULT_OS_VERSION) ] && echo true)
ifeq ($(ARCHIVED),true)
BASE_URL := https://archives.fedoraproject.org/pub/archive/$(FEDORA_TYPE)/releases/$(BASE_OS_VERSION)/Everything/$(ARCH)/os/Packages/
else
NOT_ARCHIVED := $(shell [ $(BASE_OS_VERSION) -gt $(LATEST_ARCHIVED_OS_VERSION) ] && echo true)
ifeq ($(NOT_ARCHIVED),true)
BASE_URL := https://dl.fedoraproject.org/pub/$(FEDORA_TYPE)/releases/$(BASE_OS_VERSION)/Everything/$(ARCH)/os/Packages/
else
BASE_URL := https://archives.fedoraproject.org/pub/archive/$(FEDORA_TYPE)/releases/$(BASE_OS_VERSION)/Everything/$(ARCH)/os/Packages/
endif
endif
LINUX_VERSION := Fedora_$(BASE_OS_VERSION)