Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-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