#72785 closed defect (fixed)
portindex -p with just a platform name doesn't override variables correctly
| Reported by: | F30 (Felix Dreissig) | Owned by: | jmroot (Joshua Root) |
|---|---|---|---|
| Priority: | Normal | Milestone: | MacPorts 2.11.5 |
| Component: | base | Version: | 2.11.4 |
| Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt) | |
| Port: | podman |
Description (last modified by F30 (Felix Dreissig))
port outdated currently lists podman as an outdated port on my system and wants to downgrade it because of an allegedly updated epoch:
The following installed ports are outdated: podman 5.5.2_0 < 4.9.4_0 (epoch 0 < 1)
The current Portfile on GitHub looks innocent enough and specifically does not set the epoch to 1: https://github.com/macports/macports-ports/blob/7eea181b0dfb09cb2595de506ce3a0ef1046a8b0/sysutils/podman/Portfile Its SHA256 hash is: 8c65c7c0fd7171a856f81bc934e56482a0b79116b9cf3a1b836087fbf918bb50
My ports.tar.gz file is identical to the one I currently receive from rsync.macports.org, SHA256 hash: 4c46a478715e6072fd142f26bcfe065b3f3ef111ff6a8fad8b72d39d0a448098
If I extract the podman Portfile from that tarball, it is identical to the one from GitHub (see above).
https://ftp.fau.de/macports/release/ports/sysutils/podman/Portfile also delivers that same Portfile.
To me, it looks like either something very weird is going on, or this is a bug in macports-base.
Change History (16)
comment:1 Changed 12 months ago by F30 (Felix Dreissig)
| Description: | modified (diff) |
|---|
comment:2 follow-up: 3 Changed 12 months ago by jmroot (Joshua Root)
| Component: | base → ports |
|---|---|
| Owner: | set to judaew |
| Port: | podman added |
| Priority: | High → Normal |
| Status: | new → assigned |
comment:3 Changed 12 months ago by F30 (Felix Dreissig)
Replying to jmroot:
The current Portfile does set epoch 1 but only sometimes. What OS version are you using?
True. I missed that, sorry. It also explains the selection of version 4.9.4.
However, I'm running this on Sequoia 15.6, so ${os.major} <= 21 shouldn't match.
comment:4 follow-up: 5 Changed 12 months ago by jmroot (Joshua Root)
Things to check:
port dir podman
port info --epoch podman
port info --epoch --index podman
comment:5 Changed 12 months ago by F30 (Felix Dreissig)
Replying to jmroot:
> port dir podman /opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/sysutils/podman > shasum -a 256 /opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/sysutils/podman/Portfile 8c65c7c0fd7171a856f81bc934e56482a0b79116b9cf3a1b836087fbf918bb50 /opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/sysutils/podman/Portfile > port info --epoch podman epoch: 0 > port info --epoch --index podman epoch: 1
comment:6 Changed 12 months ago by jmroot (Joshua Root)
| Cc: | ryandesign added |
|---|
Interesting, so your PortIndex was apparently generated with a different os.major. Not sure how that would have happened.
comment:7 Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)
Nothing should have changed on the server that runs mprsyncup except that MacPorts auto-updated from 2.10.7 to 2.11.4 (#72733). I'll check the log later.
comment:8 Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)
All 24 server-side PortIndex files list podman with epoch 1 and version 4.9.4, so the OS version overriding doesn't seem to be working anymore in MacPorts 2.11.x.
The mprsyncup log says, e.g.:
2025-08-02T17:14:56+0000 Warning: Not overriding macports::os_subplatform because it does not exist in the macports namespace 2025-08-02T17:14:56+0000 Warning: Not overriding macports::cxx_stdlib because it does not exist in the macports namespace 2025-08-02T17:14:56+0000 Warning: Not overriding macports::os_platform because it does not exist in the macports namespace 2025-08-02T17:14:56+0000 Warning: Not overriding macports::os_major because it does not exist in the macports namespace 2025-08-02T17:14:56+0000 Warning: Not overriding macports::os_version because it does not exist in the macports namespace 2025-08-02T17:14:56+0000 Warning: Not overriding macports::os_arch because it does not exist in the macports namespace 2025-08-02T17:15:09+0000 Updating PortIndex_darwin_9_i386: Creating port index in /Volumes/RAID/private/var/tmp/mprsyncup/release/ports/PortIndex_darwin_9_i386 2025-08-02T17:15:09+0000 Updating PortIndex_darwin_9_i386: Adding port sysutils/podman 2025-08-02T17:15:09+0000 Updating PortIndex_darwin_9_i386: 2025-08-02T17:15:09+0000 Updating PortIndex_darwin_9_i386: Total number of ports parsed: 1 2025-08-02T17:15:09+0000 Updating PortIndex_darwin_9_i386: Ports successfully parsed: 1 2025-08-02T17:15:09+0000 Updating PortIndex_darwin_9_i386: Ports failed: 0 2025-08-02T17:15:09+0000 Updating PortIndex_darwin_9_i386: Up-to-date ports skipped: 40111
comment:9 Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)
| Cc: | jmroot added |
|---|
comment:10 follow-up: 14 Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)
I think when portindex.tcl calls lappend var_overrides the values it appends should not be prefixed with macports:: because macports::override_vars in macports.tcl prepends ::macports:: to each variable name.
comment:11 Changed 12 months ago by jmroot (Joshua Root)
| Component: | ports → base |
|---|---|
| Milestone: | → MacPorts Future |
| Summary: | Updated epoch erroneously reported in outdated ports → portindex -p with just a platform name doesn't override variables correctly |
comment:12 Changed 12 months ago by jmroot (Joshua Root)
| Cc: | jmroot removed |
|---|---|
| Owner: | changed from judaew to jmroot |
| Status: | assigned → accepted |
comment:13 Changed 12 months ago by jmroot (Joshua Root)
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
comment:14 Changed 12 months ago by jmroot (Joshua Root)
Replying to ryandesign:
I think when portindex.tcl calls
lappend var_overridesthe values it appends should not be prefixed withmacports::becausemacports::override_varsin macports.tcl prepends::macports::to each variable name.
Indeed. For a short-term fix (unless you want to switch over to carola) I guess you can either patch the portindex script on the server, or update mprsyncup to use override files (like [bb56463645ccadbb89bca8de01dd44de86379a33/macports-ports]).
comment:15 Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)
Thanks, I'll just apply the patch for now, and I should probably nuke all the portindexes to regenerate them.
comment:16 Changed 11 months ago by jmroot (Joshua Root)
| Milestone: | MacPorts Future → MacPorts 2.11.5 |
|---|

The current Portfile does set epoch 1 but only sometimes. What OS version are you using?