Hey, Viktor!
Thank you for the patch. Your changes look fine and should work. There
are a few minor syntax/style things I would improve, but they don't
affect the behaviour.
The only important thing I'd change is:
```python
"gfortran": _detect_default_compiler("gfortran", "gfortran-15" if
which("gfortran-15") is not None else "gfortran-16"),
```
This fallback encodes Ubuntu-specific temporal knowledge into the
generic `default_compilers` table.
I'd rather change it to something like:
```python
"gfortran": _detect_default_compiler("gfortran", "gfortran-16"),
```
The current logic assumes that `gfortran-15` is the default one if it
happens to be installed. However, that's not necessarily true. For
example, someone could have both 15 and 16 installed while `gfortran`
points to 16
Since `_detect_default_compiler()` already checks `gfortran` first, the
fallback should only be used when the unversioned compiler isn't
available, so I don't think we need the extra version detection here
P.S. It looks like you used the SRU template when updating the bug
description. Since Stonking isn't a stable release yet, there's no need
to use the SRU template. It can also be a bit confusing for other Ubuntu
developers reviewing the bug
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2169224
Title:
dh-fortran: FC_DEFAULT=gfortran still resolves to gfortran-16
(incomplete fix for LP: #2166191)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dh-fortran/+bug/2169224/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs