1b74ddc0c9
gates / gates (push) Successful in 33s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
9 lines
544 B
Bash
9 lines
544 B
Bash
#!/bin/bash
|
|
# READ-ONLY: apt-cache madison against throwaway indexes (no system list touched).
|
|
export LC_ALL=C
|
|
T=$(mktemp -d /tmp/madison.XXXXXX); mkdir -p "$T/lists/partial" "$T/cache/archives/partial"
|
|
A=(-o "Dir::State::Lists=$T/lists" -o "Dir::Cache=$T/cache" -o "Debug::NoLocking=1")
|
|
apt-get "${A[@]}" -q update >/dev/null 2>&1
|
|
for p in "$@"; do echo "### $p (installed: $(dpkg-query -W -f='${Version}' "$p" 2>/dev/null || echo none))"; apt-cache "${A[@]}" madison "$p" | awk -F'|' '{gsub(/ /,"",$2); print " "$2" |"$3}'; done
|
|
rm -rf "$T"
|