Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/why-dont-you
diff options
context:
space:
mode:
Diffstat (limited to 'bin/why-dont-you')
-rwxr-xr-xbin/why-dont-you16
1 files changed, 12 insertions, 4 deletions
diff --git a/bin/why-dont-you b/bin/why-dont-you
index 5dcf243..1fc1382 100755
--- a/bin/why-dont-you
+++ b/bin/why-dont-you
@@ -60,16 +60,24 @@ case "${action}" in
for pkg in "$@"; do
- if ! find "${work_dir}/package-states" -maxdepth 1 | \
- grep -q "/$(str_to_regex "${pkg}")\(\.[^.]\+\)\{3\}\.done\$"; then
+ state_file=$(
+ find "${work_dir}/package-states" -maxdepth 1 -regextype grep \
+ -regex ".*/$(str_to_regex "${pkg}")\(\.[^.]\+\)\{3\}\.done" \
+ -printf '%f\n' | \
+ sed 's|\.[^.]\+$||'
+ )
+ if [ -z "${state_file}" ]; then
printf '"%s" is not in staging!\n' "${pkg}"
continue
fi
+ generate_package_metadata "${state_file}"
+
dependent_packages=$(
- grep -lxF "${pkg}" "${work_dir}/package-infos/"*".run-depends" | \
+ find "${work_dir}/package-infos/" -maxdepth 1 -name '*.run-depends' \
+ -exec grep -qxF "$(cat "${work_dir}/package-infos/${state_file}.builds")" '{}' \; \
+ -printf '%f\n' | \
sed '
- s|^.*/||
s|\.run-depends$||
'
)