diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-04-17 19:11:28 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-04-17 19:11:28 -0400 |
commit | acaa58d1833510973cf41fa8349fd3be39c596d8 (patch) | |
tree | 2349bb05e74810a475e3b7fba7ce4b0c1b3ef63f /cron-jobs/sourceballs | |
parent | 0d7d26fb58525411847795e65ce4ce6260349732 (diff) |
Backport changes from the lukeshu/xbs branch.
Notable, remove the files.db stuff that became extraneous with pacman 5.
Diffstat (limited to 'cron-jobs/sourceballs')
-rwxr-xr-x | cron-jobs/sourceballs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs index c12a128..c02912a 100755 --- a/cron-jobs/sourceballs +++ b/cron-jobs/sourceballs @@ -63,11 +63,10 @@ for repo in "${PKGREPOS[@]}"; do if grep -Fqx "${pkgbase}" "${dirname}/sourceballs.skip"; then continue fi - # Commenting out, we'll sourceball everything # Check if the license or .force file does not enforce creating a source package -# if ! (chk_license ${pkglicense[@]} || grep -Fqx "${pkgbase}" "${dirname}/sourceballs.force"); then -# continue -# fi + if ! ([[ -z ${ALLOWED_LICENSES[*]} ]] || chk_license "${pkglicense[@]}" || grep -Fqx "${pkgbase}" "${dirname}/sourceballs.force"); then + continue + fi # Store the expected file name of the source package echo "${pkgbase}-${pkgver}${SRCEXT}" >> "${WORKDIR}/expected-src-pkgs" @@ -118,8 +117,8 @@ for repo in "${PKGREPOS[@]}"; do done # Cleanup old source packages -cat "${WORKDIR}/expected-src-pkgs" | sort -u > "${WORKDIR}/expected-src-pkgs.sort" -cat "${WORKDIR}/available-src-pkgs" | sort -u > "${WORKDIR}/available-src-pkgs.sort" +find "${WORKDIR}" -maxdepth 1 -type f -name 'expected-src-pkgs' -exec cat {} \; | sort -u > "${WORKDIR}/expected-src-pkgs.sort" +find "${WORKDIR}" -maxdepth 1 -type f -name 'available-src-pkgs' -exec cat {} \; | sort -u > "${WORKDIR}/available-src-pkgs.sort" old_pkgs=($(comm -23 "${WORKDIR}/available-src-pkgs.sort" "${WORKDIR}/expected-src-pkgs.sort")) if [ ${#old_pkgs[@]} -ge 1 ]; then |