summaryrefslogtreecommitdiff
path: root/bin/get-package-updates
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-08-07 09:54:20 +0200
committerErich Eckner <git@eckner.net>2019-08-07 09:54:20 +0200
commit8b3300ebba5e6e74998633efca68a76763d609f1 (patch)
tree18a6f41e32496ab0c39c5352ef453d3cdce0c470 /bin/get-package-updates
parent1c56838b121f35dd8b46e0047f53ff0e19474a42 (diff)
downloadbuilder-8b3300ebba5e6e74998633efca68a76763d609f1.tar.xz
bin/get-package-updates: blacklist all blacklist packages if -n given
Diffstat (limited to 'bin/get-package-updates')
-rwxr-xr-xbin/get-package-updates14
1 files changed, 10 insertions, 4 deletions
diff --git a/bin/get-package-updates b/bin/get-package-updates
index b33bdf6..4640a60 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -469,9 +469,11 @@ echo 'Check modified packages from the last update, and put them to the build li
exit 1
done
-if [ -s "${tmp_dir}/modified-packages" ]; then
+if [ -s "${tmp_dir}/modified-packages" ] || ! ${pull}; then
echo 'Delete black-listed packages.'
- sort -u "${tmp_dir}/modified-packages" --output "${tmp_dir}/modified-packages"
+ if [ -s "${tmp_dir}/modified-packages" ]; then
+ sort -u "${tmp_dir}/modified-packages" --output "${tmp_dir}/modified-packages"
+ fi
# extract black-listed packages
git -C "${repo_paths__archlinux32}" archive "${new_repo_revisions__archlinux32}" -- 'blacklist' | \
tar -t 'blacklist' | \
@@ -481,8 +483,12 @@ if [ -s "${tmp_dir}/modified-packages" ]; then
d
' | \
sort -u | \
- sort -k2,2 | \
- join -1 1 -2 2 -o 2.1,2.2 "${tmp_dir}/modified-packages" - | \
+ if [ -s "${tmp_dir}/modified-packages" ]; then
+ sort -k2,2 | \
+ join -1 1 -2 2 -o 2.1,2.2 "${tmp_dir}/modified-packages" -
+ else
+ cat
+ fi | \
while read -r arch pkgbase; do
delete_package "${arch}" "${pkgbase}"
done