Verified Commit a86f2444 authored by Morten Linderud's avatar Morten Linderud 🏄
Browse files

ftpdir-cleanup: We don't care about the debugpool size


Signed-off-by: Morten Linderud's avatarMorten Linderud <morten@linderud.pw>
parent a081b4b2
......@@ -24,7 +24,7 @@ clean_pkg() {
script_lock
for repo in "${PKGREPOS[@]}"; do
for repo in "${PKGREPOS[@]}" "${DEBUGREPOS[@]}"; do
for arch in "${ARCHES[@]}"; do
repo_lock "${repo}" "${arch}" || exit 1
done
......@@ -66,26 +66,20 @@ for repo in "${PKGREPOS[@]}" "${DEBUGREPOS[@]}"; do
done
# get a list of all available packages in the package pool
HAS_POOL=0
for f in "$FTP_BASE/${PKGPOOL}"/*${PKGEXTS}; do
printf '%s\n' "${f##*/}"
done | sort > "${WORKDIR}/pool"
# create a list of packages in our db
if [[ -s ${WORKDIR}/pool ]]; then
cat "${WORKDIR}"/db-!(*-debug-*) 2>/dev/null | sort -u > "${WORKDIR}/db"
fi
cat "${WORKDIR}"/db-!(*-debug-*) 2>/dev/null | sort -u > "${WORKDIR}/db"
# seperate list for debug packages
HAS_DEBUGPOOL=0
for f in "$FTP_BASE/${DEBUGPKGPOOL}"/*${PKGEXTS}; do
printf '%s\n' "${f##*/}"
done | sort > "${WORKDIR}/debugpool"
# seperate list for packages in our debug db
if [[ -s ${WORKDIR}/debugpool ]]; then
cat "${WORKDIR}"/db-*-debug-* 2>/dev/null | sort -u > "${WORKDIR}/debug-db"
fi
cat "${WORKDIR}"/db-*-debug-* 2>/dev/null | sort -u > "${WORKDIR}/debug-db"
old_pkgs=($(comm -23 "${WORKDIR}/pool" "${WORKDIR}/db"))
if (( ${#old_pkgs[@]} >= 1 )); then
......@@ -124,7 +118,7 @@ if (( ${#old_pkgs[@]} >= 1 )); then
done
fi
for repo in "${PKGREPOS[@]}"; do
for repo in "${PKGREPOS[@]}" "${DEBUGREPOS[@]}"; do
for arch in "${ARCHES[@]}"; do
repo_unlock "${repo}" "${arch}"
done
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment