[Midnightbsd-cvs] [MidnightBSD/mports] a5467b: Mk/bsd.mport.mk: keep compound dependency requirem...
Lucas Holt
noreply at github.com
Fri Oct 9 10:17:12 EDT 2026
Branch: refs/heads/master
Home: https://github.com/MidnightBSD/mports
Commit: a5467b366c0128b7c6ff3d50df6c8d7f7d3d38b7
https://github.com/MidnightBSD/mports/commit/a5467b366c0128b7c6ff3d50df6c8d7f7d3d38b7
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-10-09 (Fri, 09 Oct 2026)
Changed paths:
M Mk/bsd.mport.mk
Log Message:
-----------
Mk/bsd.mport.mk: keep compound dependency requirements on 4.1+ (#1762)
## Summary
Companion to MidnightBSD/mport#244 and MidnightBSD/mport#19.
`PACKAGE-DEPENDS-LIST` reduced a dependency's version requirement with
`sed -E 's/^.*([<>])/\1/'`. The greedy `.*` keeps only the last bound,
so `foo>=1.0<4.0:devel/foo` was recorded in the package as `<4.0` and
the lower bound was lost before `mport.create` ever saw it.
This adds `_DEPEND_VERSION_SED`, chosen by `OSVERSION`:
- `>= 401000` (4.1 and later): `s/^[^<>]*//`, strips only the package
name and keeps the whole requirement. mport on these releases evaluates
compound requirements once mport#244 lands.
- older: the previous expression, so 4.0 and earlier keep emitting a
single bound their `mport` can parse.
Single-bound requirements like `>=1.8.2` are emitted identically on both
sides, so existing ports are unaffected.
## Test plan
Ran `make package-depends` in `devel/R-cran-R.oo` with `RUN_DEPENDS`
overridden to `R-cran-R.methodsS3>=1.8.2<2.0:devel/R-cran-R.methodsS3`:
| OSVERSION | emitted |
|---|---|
| 400000 | `R-cran-R.methodsS3:devel/R-cran-R.methodsS3:<2.0` |
| 401000 | `R-cran-R.methodsS3:devel/R-cran-R.methodsS3:>=1.8.2<2.0` |
The port's real `>=1.8.2` dependency emits unchanged under both values.
`make -V _DEPEND_VERSION_SED` with `OSVERSION` set to 400000, 401000 and
500000 selects the expected expression. `/usr/src/sys/sys/param.h` on
this host is 402001 (4.2-CURRENT), confirming the six-digit format.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
## Summary by Sourcery
Preserve complete dependency version constraints on newer MidnightBSD
releases while maintaining legacy output for older versions.
Bug Fixes:
- Preserve compound dependency version requirements on MidnightBSD 4.1
and later instead of dropping earlier bounds when generating package
dependency metadata.
Enhancements:
- Select dependency-version parsing behavior by OS version while
retaining compatibility with older mport releases.
Co-authored-by: Claude Fable 5.1 <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/mports/settings/notifications
More information about the Midnightbsd-cvs
mailing list