From 52cd8cc368c7958a67e78ed0bd26f34b747689d0 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 23 Nov 2018 13:30:23 +0100 Subject: bin/wtf, bin/update-pacman-dbs: answer queries for i486, too --- bin/update-pacman-dbs | 9 +++++---- bin/wtf | 37 ++++++++++++++++++++++++++++++++++--- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/bin/update-pacman-dbs b/bin/update-pacman-dbs index cd61e66..268b9da 100755 --- a/bin/update-pacman-dbs +++ b/bin/update-pacman-dbs @@ -4,8 +4,9 @@ base_dir=$( readlink -f "${0%/*}/.." ) -# TODO: reactivate, when FS#60893 solved and i486 implemented -# pacman --config "${base_dir}/misc/pacman-i486.conf" -Syy +for arch in i486 i686; do -pacman --config "${base_dir}/misc/pacman-i686.conf" -Syy -su master -c 'pkgfile -C '"${base_dir}"'/misc/pacman-i686.conf -u' + pacman --config "${base_dir}/misc/pacman-${arch}.conf" -Syy + su master -c 'pkgfile -C '"${base_dir}"'/misc/pacman-'"${arch}"'.conf -D '"${base_dir}"'/work/pkgfile-'"${arch}"'.cache -u' + +done diff --git a/bin/wtf b/bin/wtf index b87a41f..0077757 100755 --- a/bin/wtf +++ b/bin/wtf @@ -1,15 +1,46 @@ #!/bin/sh +# wtf +# +# or +# +# wtf $arch +# +# where is on of: +# +# $filename +# /$full/$path/$to/$file +# $partial/$path/$to/$file + base_dir=$( readlink -f "${0%/*}/.." ) -# TODO: search i486, too +case $1 in + 'i486') + arch='i486' + shift + ;; + 'i686') + arch='i686' + shift + ;; + *) + arch='i686' + ;; +esac search="$*" -pkgfile -wC "${base_dir}/misc/pacman-i686.conf" -s "${search##*/}" | \ - xargs -rn1 pkgfile -wC "${base_dir}/misc/pacman-i686.conf" -l | \ +pkgfile -w \ + -C "${base_dir}/misc/pacman-${arch}.conf" \ + -D "${base_dir}/work/pkgfile-${arch}.cache" \ + -s "${search##*/}" | \ + xargs -rn1 \ + pkgfile -w \ + -C "${base_dir}/misc/pacman-${arch}.conf" \ + -D "${base_dir}/work/pkgfile-${arch}.cache" \ + -l | \ if printf '%s\n' "${search}" | \ grep -q '^/'; then grep -w "${search}" -- cgit v1.2.3-70-g09d2