index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-06-14 15:34:11 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-06-14 15:34:11 +0200 |
commit | 2f0ca615e49a34907ac4864908581aaa7a1b9558 (patch) | |
tree | c30724449405cc1c004999b98a12f8f21fb4e63b /bin/common-functions | |
parent | 87f80caab1c8d6f360d36860f209ee6cf8d84bfd (diff) |
-rwxr-xr-x | bin/common-functions | 28 |
diff --git a/bin/common-functions b/bin/common-functions index 00da63c..d954a36 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -242,13 +242,27 @@ generate_package_metadata() { # delete old (=unneeded) meta data of packages delete_old_metadata() { - true -# ls -1 "${file_prefix%.*.*}."* 2> /dev/null | \ -# sed 's|^.*/||' | \ -# grep "^${package//./\\.}"'\.\([0-9a-f]\{40\}\.\)\{2\}\(builds\|depends\|needs\|packages\|SRCINFO\)$' | \ -# while read file; do -# rm "${work_dir}/package-infos/${file}" -# done + + ( + ls -1 "${work_dir}/package-infos" | \ + sed ' + s|\.\([^.]\+\)\.\([^.]\+\)\.[^.]\+$| \1 \2| + ' | \ + sort -u + ls -1 "${work_dir}/package-states" | \ + sed ' + s|\.\([^.]\+\)\.\([^.]\+\)\(\.[^.]\+\)\{2\}$| \1 \2| + ' | \ + sort -u | \ + sed 'p' + cut -d' ' -f1,2,3 "${work_dir}/build-list" | \ + sed 'p' + ) | \ + sort | \ + uniq -u | \ + while read -r pkg rev mod_rev; do + rm -f "${work_dir}/package-infos/${pkg}.${rev}.${mod_rev}".* + done } # official_or_community $package.$repo_revision.$mod_repo_revision.$repository |