__init__: fix get_buildarch to not pop() empty list
This commit is contained in:
parent
f13a5153e0
commit
1d0155f3d2
@ -248,15 +248,12 @@ class Lorax(BaseLoraxClass):
|
|||||||
|
|
||||||
def get_buildarch(ybo):
|
def get_buildarch(ybo):
|
||||||
# get architecture of the available anaconda package
|
# get architecture of the available anaconda package
|
||||||
available = ybo.doPackageLists(patterns=["anaconda"]).available
|
buildarch = None
|
||||||
|
for anaconda in ybo.doPackageLists(patterns=["anaconda"]).available:
|
||||||
if available:
|
if anaconda.arch != "src":
|
||||||
anaconda = available.pop(0)
|
buildarch = anaconda.arch
|
||||||
# src is not a real arch
|
break
|
||||||
if anaconda.arch == "src":
|
if not buildarch:
|
||||||
anaconda = available.pop(0)
|
|
||||||
buildarch = anaconda.arch
|
|
||||||
else:
|
|
||||||
# fallback to the system architecture
|
# fallback to the system architecture
|
||||||
logger.warning("using system architecture")
|
logger.warning("using system architecture")
|
||||||
buildarch = os.uname()[4]
|
buildarch = os.uname()[4]
|
||||||
|
Loading…
Reference in New Issue
Block a user