Use anaconda-core to detect buildarch

For historical reasons, lorax used the 'anaconda' package as a
touchstone to determine the architecture for the build. At some
point, this package became a metapackage that pulls in both the
GUI and headless installers.

In the modular world, it's possible that only the core and TUI bits
may be available for use. The only subpackage of anaconda that is
guaranteed to be on any viable system is anaconda-core, so let's
switch to using that for the touchstone instead of the metapackage.

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
Stephen Gallagher 2017-05-30 13:52:08 -04:00 committed by Brian C. Lane
parent 62969dee4f
commit 2c3007beb8

View File

@ -373,12 +373,12 @@ def get_buildarch(dbo):
buildarch = None buildarch = None
q = dbo.sack.query() q = dbo.sack.query()
a = q.available() a = q.available()
for anaconda in a.filter(name="anaconda"): for anaconda in a.filter(name="anaconda-core"):
if anaconda.arch != "src": if anaconda.arch != "src":
buildarch = anaconda.arch buildarch = anaconda.arch
break break
if not buildarch: if not buildarch:
logger.critical("no anaconda package in the repository") logger.critical("no anaconda-core package in the repository")
sys.exit(1) sys.exit(1)
return buildarch return buildarch