summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-07-19 16:56:16 +0200
committerErich Eckner <git@eckner.net>2017-07-19 16:56:16 +0200
commit2f04174266c375f5b4803f1dd346b61de0b63a64 (patch)
tree40c1896906c69b13438be48afcb5e56d3cc67175
parentb619cadeda1b066cec1eeb12a5edea93f8a3dc96 (diff)
downloadbuilder-2f04174266c375f5b4803f1dd346b61de0b63a64.tar.xz
bin/show-dependencies: rely on metadata instead of calling "git archive"
-rwxr-xr-xbin/show-dependencies53
1 files changed, 10 insertions, 43 deletions
diff --git a/bin/show-dependencies b/bin/show-dependencies
index bb3f247..b144936 100755
--- a/bin/show-dependencies
+++ b/bin/show-dependencies
@@ -31,59 +31,26 @@ sort -u "${work_dir}/build-order" | \
sort -u | \
sponge "${tmp_dir}/original-build-order"
-for repo in ${repo_names}; do
- eval 'repo_path="${repo_paths__'"${repo}"'}"'
- repo_revision="$(cat "${work_dir}/${repo}.revision")"
-
- git -C "${repo_path}" archive "${repo_revision}" | \
- tar -t | \
- sed 's|/$||' | \
- grep -v '/' | \
- sort -u >> \
- "${tmp_dir}/known-packages"
-
- git -C "${repo_path}" archive "${repo_revision}" | \
- tar -Ox --wildcards --wildcards-match-slash '*/PKGBUILD' | \
- sed -n '
- s/#.*$//
- /^\s*\(groups\|provides\)=/{
- :loop
- /)/{
- s/).*$//
- s/^.*(//
- p
- d
- }
- $!N
- s/#.*$//
- bloop
- }
- ' | \
- tr "'\" " "\n" | \
- cut -d= -f1 | \
- grep -vxF '' | \
- grep -vF '$' | \
- sort -u >> \
- "${tmp_dir}/known-groups"
-done
+ls "${work_dir}/package-infos" | \
+ sed 's|\(\.[^.]\+\)\{3\}$||' | \
+ sort -u > \
+ "${tmp_dir}/known-packages"
-sort -u "${tmp_dir}/known-groups" | \
- sponge "${tmp_dir}/known-groups"
+ls "${work_dir}/package-infos" | \
+ grep '\.groups$' | \
+ sed "s|^|${work_dir}/package-infos/|" | \
+ xargs -r cat | \
+ sort -u > \
+ "${tmp_dir}/known-groups"
ls "${work_dir}/package-infos" | \
grep '\.packages$' | \
while read -r pf; do
- grep -xF "${pf%.*.*.*}" "${work_dir}/package-infos/${pf}" >> \
- "${tmp_dir}/known-packages" || \
- true
grep -vxF "${pf%.*.*.*}" "${work_dir}/package-infos/${pf}" | \
xargs -r printf "${pf%.*.*.*} %s\n" >> \
"${tmp_dir}/known-split-packages"
done
-sort -u "${tmp_dir}/known-packages" | \
- sponge "${tmp_dir}/known-packages"
-
for target_package in "$@"; do
rm -f \