Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
openeuler_risc-v-fixing [2024/02/29 07:22] – Add expand macro misaka00251openeuler_risc-v-fixing [2024/04/03 03:55] (current) – Add noarch misaka00251
Line 157: Line 157:
  
 %description    %{common_description} %description    %{common_description}
 +</file>
 +
 +===== 碰到 noarch 怎么办 =====
 +
 +如果遇到 "%ifarch" 宏不起作用的情况下,可以先看一下 spec 文件内是否有 "BuildArch: noarch" 这一行。
 +
 +在包为 noarch 的情况下,"%ifarch" 是不起作用的。你可能需要这样的 dirty hack 才行:
 +
 +<file spec example.spec>
 +BuildArch: noarch
 +%if "%{_arch}" == "riscv64"
 +echo "Do Something"
 +%endif
 </file> </file>