Skip to content

Commit 04f391d

Browse files
committed
fix: parse Debian symlink paths
1 parent ed9b48c commit 04f391d

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

scripts/test-linux-preview-pipeline.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,11 @@ case "$1" in
124124
esac
125125
;;
126126
--contents)
127-
printf '%s\n' '-rwxr-xr-x root/root 1 ./usr/bin/chatgpt' '-rwxr-xr-x root/root 1 ./usr/lib/chatgpt/codex-launcher'
127+
printf '%s\n' \
128+
'lrwxrwxrwx root/root 0 2026-08-10 23:37 ./usr/bin/chatgpt -> ../lib/chatgpt/codex-launcher' \
129+
'-rwxr-xr-x root/root 63 2026-08-10 23:37 ./usr/lib/chatgpt/codex-launcher'
128130
for ((i = 0; i < 10000; i++)); do
129-
printf -- '-rw-r--r-- root/root 1 ./usr/lib/chatgpt/fixture-%05d\n' "$i"
131+
printf -- '-rw-r--r-- root/root 1 2026-08-10 23:37 ./usr/lib/chatgpt/fixture-%05d\n' "$i"
130132
done
131133
;;
132134
--control)

scripts/verify-linux-preview.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ while IFS=$'\t' read -r logical_arch format file_name expected_arch expected_sha
119119
exit 1
120120
}
121121
deb_file_list="$tmp_dir/deb-files-$logical_arch.txt"
122-
dpkg-deb --contents "$file" | awk '{print $NF}' > "$deb_file_list"
122+
# dpkg-deb renders symlinks as "path -> target". The package path is the
123+
# sixth field, not the final field, for both regular files and symlinks.
124+
dpkg-deb --contents "$file" | awk '{print $6}' > "$deb_file_list"
123125
grep -Eq '^\.?/usr/bin/chatgpt$' "$deb_file_list" || {
124126
echo "Debian package is missing /usr/bin/chatgpt: $file_name" >&2
125127
exit 1

0 commit comments

Comments
 (0)