On Wed, Dec 13, Michael Schroeder wrote:
The whold substitutes mechanism has gone a bit out of fashion, so I'm wondering how you're using it.
What do you mean "how I'm using it"? Also not sure how it is oldfashioned. Polluting specfiles with %if suse_version cant be the goal. The specific case that triggered this mail was: %if 0%{?suse_version} == 1315 Substitute: hostname net-tools The Leap package is supposed to depend on net-tools. The current usage of "hostname" installs both hostname+net-tools, which leads to fileconflicts during buildroot setup. Building works fine, but the Leap/SLE pkg still requires the unavailable hostname.rpm. Substitute is used alot already to replace pkgconfig() with expanded pkg names, or replace one devel pkg with another: %if 0%{?suse_version} == 1315 Substitute: pkgconfig(freeglut) freeglut-devel= # Development happens for Tumbleweed Substitute: libboost_atomic-devel boost-devel= Or I just wipe some string, but this leads to empty strings in some cases, which breaks build (in the first example): %if 0%{?sle_version} == 120300 # Leap 42.3 Substitute: group(audio) Substitute: pkgconfig(wayland-egl) Olaf