Good morning Dan, On 13.01.23 at 08:23 Dan Čermák wrote:
But it does not. Apparently it changes the working directory before creating the link.
The magic here is the %python_clone macro, which according to the upstream documentation [1] performs the following:
--8<---------------cut here---------------start------------->8--- %python_clone filename creates a copy of filename under a flavor-specific name for every flavor. This is useful for packages that install unversioned executables: /usr/bin/foo is copied to /usr/bin/foo-%{python_bin_suffix} for all flavors, and the shebang is modified accordingly. --8<---------------cut here---------------end--------------->8---
The %python_clone creates the file and modifies its shebang. But it does not create a link. The state before the ln line is that there are multiple versions of pycodestlye in the %{buildroot}%{_bindir}/ directory. Files, not links (otherwise the ln line would be unnecessary). That part is clear to me. The funny part is why the ln line works the way it does. Kind Regards, Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537