Skip to content

Instantly share code, notes, and snippets.

@tbreeds
Last active July 12, 2017 00:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbreeds/69afe5e8fe2f0e0d26c9d994ca2fc7d3 to your computer and use it in GitHub Desktop.
Save tbreeds/69afe5e8fe2f0e0d26c9d994ca2fc7d3 to your computer and use it in GitHub Desktop.
Compare packages available for OpenStack-pike on x86_64 and ppc64le on CentOS
#!/usr/bin/env bash
# Get these SHAs from
# https://buildlogs.centos.org/centos/7/cloud/x86_64/openstack-pike/repodata/?C=M;O=D
# https://buildlogs.centos.org/centos/7/cloud/ppc64le/openstack-pike/repodata/?C=M;O=D
declare -A arch_map=(
['ppc64le']='5fbb6a284cabf5a08955597065bfa89dca70ad7f4ba672f84e133d3228ed124f'
['x86_64']='d0a9c17f2730bc76ee3d4111b147188d8242d97b8a6970a06cc19cc24cff8d30'
)
cd ${TMPDIR:-~/tmp}
for arch in ${!arch_map[@]} ; do
sha=${arch_map[$arch]}
file=$(printf '%s-primary.sqlite.bz2' "$sha")
db=$(basename "$file" .bz2)
url=$(printf 'https://buildlogs.centos.org/centos/7/cloud/%s/openstack-pike/repodata/%s' "$arch" "$file")
[ -e "$file" ] || wget $url -O $file
bunzip2 $file
sqlite3 $db 'select name,version from packages' | sort > $arch.lst
done
diff -u0 x86_64.lst ppc64le.lst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment