kbuild: rpm-pkg: define _arch conditionally
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 22 Jul 2023 04:47:48 +0000 (13:47 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:27:58 +0000 (12:27 +0200)
commit390275d7a86314334d14851944b65608e5b42356
treee81e5d73a79eaefd995562b17c1b966648f71708
parent31cf7853a940181593e4472fc56f46574123f9f6
kbuild: rpm-pkg: define _arch conditionally

[ Upstream commit 233046a2afd12a4f699305b92ee634eebf1e4f31 ]

Commit 3089b2be0cce ("kbuild: rpm-pkg: fix build error when _arch is
undefined") does not work as intended; _arch is always defined as
$UTS_MACHINE.

The intention was to define _arch to $UTS_MACHINE only when it is not
defined.

Fixes: 3089b2be0cce ("kbuild: rpm-pkg: fix build error when _arch is undefined")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
scripts/package/mkspec