Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-07-18 13:24:58 +0200
committerErich Eckner <git@eckner.net>2018-07-18 13:24:58 +0200
commitb0a1c7e0aff57ff754929b7508203eec9e80a092 (patch)
treea8c4e32c2f523c9c9d3c9cb6e59b449a26bb1a9c
parent5176b7e884a47b01aff45a8bb549fb3ec7d9718d (diff)
bin/seed-build-list: entries in conf/seed-ignore-packages do not make _all_ matching packages ignored, but only upstream-mirror ones (-m)
-rwxr-xr-xbin/seed-build-list94
1 files changed, 47 insertions, 47 deletions
diff --git a/bin/seed-build-list b/bin/seed-build-list
index 6f3efe7..12b829d 100755
--- a/bin/seed-build-list
+++ b/bin/seed-build-list
@@ -7,9 +7,6 @@
# shellcheck source=../lib/load-configuration
. "${0%/*}/../lib/load-configuration"
-# TODO: conf/seed-ignore-packages should only make upstream packages being ignored,
-# not all packages!
-
# shellcheck disable=SC2016
usage() {
>&2 echo ''
@@ -75,10 +72,6 @@ update=true
wait_for_lock='-n'
lock_error=1
-if [ -r "${base_dir}/conf/seed-ignore-packages" ]; then
- cp "${base_dir}/conf/seed-ignore-packages" "${tmp_dir}/ignore-packages"
-fi
-
while true
do
case "$1" in
@@ -171,49 +164,56 @@ repos=$(
# generate must-haves query from mirror delta
if [ -s "${tmp_dir}/mirrors" ]; then
{
- # theirs
- while read -r mirror; do
- if [ -z "${mirror}" ]; then
- continue
- fi
- for repo in ${repos}; do
- curl -sS "${mirror}/${repo}/os/x86_64/${repo}.db.tar.gz" | \
- tar -Oxz --wildcards '*/desc' | \
- sed '
- /^%FILENAME%$/!d
- N
- s/^.*\n//
- s/-x86_64\(\.pkg\.tar\.xz\)$/-i686\1/
- s/^\(.*\)-\([^-]\+-[^-]\+\)-\([^-]\+\)$/theirs \2 \3 \1/
- '
- done
- done < \
- "${tmp_dir}/mirrors"
- # ours
- # shellcheck disable=SC2016
{
- printf 'SELECT '
- mysql_package_name_query
- printf ' FROM `binary_packages`'
- mysql_join_binary_packages_architectures
- mysql_join_binary_packages_binary_packages_in_repositories
- printf ' WHERE NOT `binary_packages_in_repositories`.`is_to_be_deleted`'
+ # theirs
+ while read -r mirror; do
+ if [ -z "${mirror}" ]; then
+ continue
+ fi
+ for repo in ${repos}; do
+ curl -sS "${mirror}/${repo}/os/x86_64/${repo}.db.tar.gz" | \
+ tar -Oxz --wildcards '*/desc' | \
+ sed '
+ /^%FILENAME%$/!d
+ N
+ s/^.*\n//
+ s/-x86_64\(\.pkg\.tar\.xz\)$/-i686\1/
+ s/^\(.*\)-\([^-]\+-[^-]\+\)-\([^-]\+\)$/theirs \2 \3 \1/
+ '
+ done
+ done < \
+ "${tmp_dir}/mirrors"
+ # ours
+ # shellcheck disable=SC2016
+ {
+ printf 'SELECT '
+ mysql_package_name_query
+ printf ' FROM `binary_packages`'
+ mysql_join_binary_packages_architectures
+ mysql_join_binary_packages_binary_packages_in_repositories
+ printf ' WHERE NOT `binary_packages_in_repositories`.`is_to_be_deleted`'
+ } | \
+ mysql_run_query | \
+ sed '
+ s/^\(.*\)-\([^-]\+-[^-]\+\)-\([^-]\+\)$/ours \2 \3 \1/
+ '
} | \
- mysql_run_query | \
- sed '
- s/^\(.*\)-\([^-]\+-[^-]\+\)-\([^-]\+\)$/ours \2 \3 \1/
- '
+ expand_version 2 | \
+ sort -k3,4 -k2Vr,2 -k1,1 | \
+ shrink_version 2 | \
+ uniq -f2 | \
+ sed -n '
+ s/^theirs \(\S\+ \)\{2\}//
+ T
+ p
+ ' | \
+ sort -u
+ if [ -r "${base_dir}/conf/seed-ignore-packages" ]; then
+ sed 'p' "${base_dir}/conf/seed-ignore-packages"
+ fi
} | \
- expand_version 2 | \
- sort -k3,4 -k2Vr,2 -k1,1 | \
- shrink_version 2 | \
- uniq -f2 | \
- sed -n '
- s/^theirs \(\S\+ \)\{2\}//
- T
- p
- ' | \
- sort -u > \
+ sort | \
+ uniq -u > \
"${tmp_dir}/must-haves"
fi