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:
authorErich Eckner <git@eckner.net>2017-09-16 18:20:02 +0200
committerErich Eckner <git@eckner.net>2017-09-16 18:20:02 +0200
commit9a35ac9d475fd152bddec93ced225cd80da48330 (patch)
tree425b1c275ba4504260fac0945a0cc3278e35c278 /bin/why-dont-you
parent7816b7af9302cebd95e8aeebb7e4164ca0eef097 (diff)
bin/why-dont-you: bugfix: consider dependencies (more) correctly
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$||
'
)