Skip to content
ᴀɴᴛᴏɴ ɴᴏᴠᴏᴊɪʟᴏᴠ edited this page Jun 23, 2024 · 5 revisions

Description

Checks %check scriptlet for using %{_without_check} and %{_with_check} macroses.

Problematic code

%check
%{make} test

Correct code

%{!?_without_check: %define _with_check 1}

%check
%if %{?_with_check:1}%{?_without_check:0}
%{__make} %{?_smp_mflags} test
%endif

Rationale

In some cases, you can make a simple mistake in your spec file. For example, to forget to define some files. And so an option for disabling the check phase is a really helpful time saver.

Clone this wiki locally