gentoo / dlang

[MIRROR] D programming language ebuild repository
https://gitweb.gentoo.org/repo/user/dlang.git
GNU General Public License v2.0
30 stars 25 forks source link

dlang.eclass keyword masking unstable dmd versions. #102

Closed joecool1029 closed 2 years ago

joecool1029 commented 2 years ago

On a system with ACCEPT_KEYWORDS="~amd64" the dlang.eclass appears to set keyword masks for any arch not matching stable.

net-misc/onedrive is affected by this issue, currently dev-lang/dmd-2.096.1 is latest stable dmd version, any attempt to use a newer release will fail with the below error:

emerge -pv onedrive dmd

These are the packages that would be merged, in order:

Calculating dependencies |

!!! Problem resolving dependencies for net-misc/onedrive                                                ... done!

!!! The ebuild selected to satisfy "onedrive" has unmet requirements.
- net-misc/onedrive-2.4.19::dlang USE="dmd-2_098 -debug -dmd-2_088 -dmd-2_089 -dmd-2_090 -dmd-2_091 -dmd-2_092 -dmd-2_093 -dmd-2_094 -dmd-2_095 -dmd-2_096 -dmd-2_097 -dmd-2_099 -ldc2-1_25 -ldc2-1_26 -ldc2-1_27 -ldc2-1_28 -ldc2-1_29 -libnotify" ABI_X86="(64)"

  The following REQUIRED_USE flag constraints are unsatisfied:
    amd64? ( !dmd-2_098 )

  The above constraints are a subset of the following complete expression:
    exactly-one-of ( dmd-2_089 dmd-2_088 dmd-2_098 dmd-2_099 dmd-2_090 dmd-2_091 dmd-2_092 dmd-2_093 dmd-2_094 dmd-2_095 dmd-2_096 dmd-2_097 ldc2-1_28 ldc2-1_29 ldc2-1_26 ldc2-1_27 ldc2-1_25 ) amd64? ( !dmd-2_098 ) x86? ( !dmd-2_098 ) amd64? ( !dmd-2_099 ) x86? ( !dmd-2_099 ) amd64? ( !dmd-2_097 ) x86? ( !dmd-2_097 ) amd64? ( !ldc2-1_29 ) x86? ( !ldc2-1_29 )
the-horo commented 2 years ago

Unfortunately, it is a requirement that stable packages (arch) can not depend on unstable ones (~arch) as per: https://devmanual.gentoo.org/keywording/#equal-visibility-requirement regardless of whatever keywords the user might have accepted. This would mean that a stable package can not depend on an unstable compiler, for both the actual compiling and for providing the runtime. There is nothing that can be done to circumvent this.

What can be done however is for those versions of dmd to be marked stable. I have made a PR for dmd-2.099 since it has been available for a while. For dmd-2.098 you would have to wait a little bit more or patch the ebuild yourself.

joecool1029 commented 2 years ago

Thanks for the explanation! I'll close this as stabilization happened and the behavior is as intended otherwise.