summaryrefslogtreecommitdiff
path: root/cron-jobs
diff options
context:
space:
mode:
Diffstat (limited to 'cron-jobs')
-rwxr-xr-xcron-jobs/repo-sanity-check14
-rwxr-xr-xcron-jobs/sourceballs229
2 files changed, 26 insertions, 17 deletions
diff --git a/cron-jobs/repo-sanity-check b/cron-jobs/repo-sanity-check
index 690a9f8..1ba90a6 100755
--- a/cron-jobs/repo-sanity-check
+++ b/cron-jobs/repo-sanity-check
@@ -5,7 +5,8 @@
. "$(dirname $0)/../config"
# Traverse all repos
-for _repo in ${REPOS[@]}; do
+for _repo in ${PKGREPOS[@]}; do
+ msg "Cleaning up [${_repo}]"
# Find all pkgnames on this repo's abs
on_abs=($(
@@ -27,6 +28,12 @@ for _repo in ${REPOS[@]}; do
done
))
+# quit if abs is empty
+ if [ ${#on_abs[*]} -eq 0 ]; then
+ warning "[${_repo}]'s ABS tree is empty, skipping"
+ break
+ fi
+
# Find all pkgnames on repos
on_repo=($(
find ${FTP_BASE}/${_repo} -name "*.pkg.tar.?z" -printf "%f\n" | \
@@ -39,7 +46,10 @@ for _repo in ${REPOS[@]}; do
# Remove them from databases, ftpdir-cleanup will take care of the rest
find ${FTP_BASE}/${_repo} -name "*.db.tar.?z" -exec \
- repo-remove {} ${remove[@]} \;
+ repo-remove {} ${remove[@]} >/dev/null 2>&1 \;
+
+ msg2 "Removed the following packages:"
+ plain "$(echo ${remove[@]} | tr ' ' "\n")"
done
diff --git a/cron-jobs/sourceballs2 b/cron-jobs/sourceballs2
index b29b396..a43d71e 100755
--- a/cron-jobs/sourceballs2
+++ b/cron-jobs/sourceballs2
@@ -33,24 +33,28 @@ for repo in ${PKGREPOS[@]}; do
continue
}
- unset pkgbase pkgname
+# Unset the previous data
+ unset pkgbase pkgname pkgver pkgrel
source PKGBUILD
+
+ unset build package url pkgdesc source md5sums depends makedepends \
+ optdepends license arch options check mksource
+
+ for _pkg in ${pkgname[@]}; do
+ unset package_${_pkg} >/dev/null 2>&1
+ done
+
pkgbase=${pkgbase:-$pkgname}
+ srcfile="${pkgbase}-${pkgver}-${pkgrel}${SRCEXT}"
- echo "${pkgbase}-${pkgver}-${pkgrel}${SRCEXT}" >> "${WORKDIR}/expected-src-pkgs"
+ echo "${srcfile}" >> "${WORKDIR}/expected-src-pkgs"
# Skip already sourceballed
- [[ -e "${SRCPKGDEST}/${pkgbase}-${pkgver}-${pkgrel}${SRCEXT}" ]] && \
- continue
+ [ -e "${SRCPKGDEST}/${srcfile}" ] && continue
- msg2 "$pkgbase-$pkgver-$pkgrel..."
- makepkg --allsource --ignorearch -c
makepkg --allsource --ignorearch -c >/dev/null 2>&1
- [[ $? -ne 0 ]] && {
- warning "Failed."
- failedpkgs[${#failedpkgs[*]}]="${pkgbase}-${pkgver}-${pkgrel}${SRCEXT}"
- }
+ [ $? -ne 0 ] && failedpkgs+=("${srcfile}")
done
popd >/dev/null
@@ -89,10 +93,5 @@ if [ ${#old_pkgs[@]} -ge 1 ]; then
done
fi
-msg "Failed"
-for _fail in ${failedpkgs[@]}; do
- msg2 "$_fail"
-done
-
script_unlock