|
156 | 156 | # together and is self-consistent at the old EVR -- so this check is a |
157 | 157 | # floor, not the whole guard; the validation laps on a GPU-less runner |
158 | 158 | # are what catches the rest, which is the promotion gate's job. |
159 | | -mesa_all=$(rpm --root="$mnt" -qa --qf '%{NAME} %{EVR} %{SOURCERPM}\n' 2>/dev/null \ |
160 | | - | awk '$3 ~ /^mesa-[0-9]/ {print $1, $2}') |
161 | | -if [ -z "$mesa_all" ]; then |
162 | | - bad "no mesa-sourced packages in the rpmdb" \ |
163 | | - "the freeworld guard cannot grade an image that does not ship them" |
| 159 | +# |
| 160 | +# The query runs the IMAGE's own rpm, not the build runner's: the |
| 161 | +# runner's apt rpm is 4.18, and 4.18's dbpath is the pre-4.20 |
| 162 | +# /root/.rpmdb, so against a Fedora 44 image it answers "cannot open |
| 163 | +# Packages database" -- and under set -e + pipefail that failure exited |
| 164 | +# this audit wordlessly (2026-10-10's publish went red with a log that |
| 165 | +# ends at the last build-path ok). A query that cannot run says so by |
| 166 | +# name, which is also why its stderr is kept. |
| 167 | +mesa_raw="" |
| 168 | +if ! mesa_raw=$(podman run --rm --entrypoint /usr/bin/rpm "$image" -qa \ |
| 169 | + --qf '%{NAME} %{EVR} %{SOURCERPM}\n' 2>&1); then |
| 170 | + bad "the image's own rpm could not read its rpmdb" \ |
| 171 | + "$(head -n1 <<< "$mesa_raw")" |
164 | 172 | else |
165 | | - evrs=$(awk '{print $2}' <<< "$mesa_all" | sort -u | sort -V) |
166 | | - if [ "$(wc -l <<< "$evrs")" -eq 1 ]; then |
167 | | - ok "mesa stack and freeworld build at one EVR ($(head -n1 <<< "$evrs"))" |
| 173 | + mesa_all=$(awk '$3 ~ /^mesa-[0-9]/ {print $1, $2}' <<< "$mesa_raw") |
| 174 | + if [ -z "$mesa_all" ]; then |
| 175 | + bad "no mesa-sourced packages in the rpmdb" \ |
| 176 | + "the freeworld guard cannot grade an image that does not ship them" |
168 | 177 | else |
169 | | - newest=$(tail -n1 <<< "$evrs") |
170 | | - while read -r pkg evr; do |
171 | | - [ -n "$pkg" ] || continue |
172 | | - bad "$pkg $evr is older than the freeworld build's $newest" \ |
173 | | - "the freeworld resolution dragged mesa down (issue #36); wait for rpmfusion to catch up and compose again" |
174 | | - done <<< "$(awk -v newest="$newest" '$2 != newest {print $1, $2}' <<< "$mesa_all")" |
| 178 | + evrs=$(awk '{print $2}' <<< "$mesa_all" | sort -u | sort -V) |
| 179 | + if [ "$(wc -l <<< "$evrs")" -eq 1 ]; then |
| 180 | + ok "mesa stack and freeworld build at one EVR ($(head -n1 <<< "$evrs"))" |
| 181 | + else |
| 182 | + newest=$(tail -n1 <<< "$evrs") |
| 183 | + while read -r pkg evr; do |
| 184 | + [ -n "$pkg" ] || continue |
| 185 | + bad "$pkg $evr is older than the freeworld build's $newest" \ |
| 186 | + "the freeworld resolution dragged mesa down (issue #36); wait for rpmfusion to catch up and compose again" |
| 187 | + done <<< "$(awk -v newest="$newest" '$2 != newest {print $1, $2}' <<< "$mesa_all")" |
| 188 | + fi |
175 | 189 | fi |
176 | 190 | fi |
177 | 191 |
|
|
0 commit comments