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/calculate-dependent-packages21
-rwxr-xr-xbin/common-functions48
-rwxr-xr-xbin/db-update12
-rwxr-xr-xbin/get-package-updates4
-rwxr-xr-xbin/show-dependencies2
-rwxr-xr-xbin/why-dont-you16
6 files changed, 56 insertions, 47 deletions
diff --git a/bin/calculate-dependent-packages b/bin/calculate-dependent-packages
index 1b16a91..0204d21 100755
--- a/bin/calculate-dependent-packages
+++ b/bin/calculate-dependent-packages
@@ -55,24 +55,23 @@ while [ -s "${tmp_dir}/build-list" ] && [ "${sums}" != "$(sha512sum "${tmp_dir}/
sed '
s|^|'"${work_dir}"'/package-infos/|
- s|$|.needs|
+ s|$|.build-depends|
' "${tmp_dir}/build-list" | \
- xargs -r cat | \
- grep -vx 'base\|base-devel' | \
+ xargs -r grep -vx 'base\|base-devel' | \
sort -u > \
- "${tmp_dir}/build-list.needs"
+ "${tmp_dir}/build-list.build-depends"
sed '
s|^\S\+ |'"${work_dir}"'/package-infos/|
- s|$|.needs|
+ s|$|.build-depends|
' "${tmp_dir}/dependent-count" | \
xargs -r grep -Hvx 'base\|base-devel' | \
sed '
s|^.*/||
- s|\.needs:| |
+ s|\.build-depends:| |
' | \
sort -k2,2 > \
- "${tmp_dir}/dependent-count.needs"
+ "${tmp_dir}/dependent-count.build-depends"
rm -f "${tmp_dir}/dependent-count.new"
touch "${tmp_dir}/dependent-count.new"
@@ -81,7 +80,7 @@ while [ -s "${tmp_dir}/build-list" ] && [ "${sums}" != "$(sha512sum "${tmp_dir}/
if [ -n "$(
(
sort -u "${work_dir}/package-infos/${sf}.builds"
- cat "${tmp_dir}/build-list.needs"
+ cat "${tmp_dir}/build-list.build-depends"
) | \
sort | \
uniq -d
@@ -91,7 +90,7 @@ while [ -s "${tmp_dir}/build-list" ] && [ "${sums}" != "$(sha512sum "${tmp_dir}/
count="/$(
sort -u "${work_dir}/package-infos/${sf}.builds" | \
- join -1 1 -2 2 -o 2.1 - "${tmp_dir}/dependent-count.needs" | \
+ join -1 1 -2 2 -o 2.1 - "${tmp_dir}/dependent-count.build-depends" | \
sort -u | \
join -1 1 -2 2 -o 2.1,2.2 - "${tmp_dir}/dependent-count" | \
tr '/ ' '\n' | \
@@ -130,7 +129,7 @@ while [ -s "${tmp_dir}/build-list" ] && [ "${sums}" != "$(sha512sum "${tmp_dir}/
uniq -u | \
sed '
s|^|'"${work_dir}"'/package-infos/|
- s|$|.needs|
+ s|$|.build-depends|
' | \
xargs -r cat | \
grep -vx 'base\|base-devel' | \
@@ -149,7 +148,7 @@ while [ -s "${tmp_dir}/build-list" ] && [ "${sums}" != "$(sha512sum "${tmp_dir}/
' "${loop}" | \
xargs -r cat | \
sort -u | \
- join -1 1 -2 2 -o 2.1 - "${tmp_dir}/dependent-count.needs" | \
+ join -1 1 -2 2 -o 2.1 - "${tmp_dir}/dependent-count.build-depends" | \
sort -u | \
join -1 1 -2 2 -o 2.1,2.2 - "${tmp_dir}/dependent-count" | \
tr '/ ' '\n' | \
diff --git a/bin/common-functions b/bin/common-functions
index 552e0e9..f255bb6 100755
--- a/bin/common-functions
+++ b/bin/common-functions
@@ -150,8 +150,8 @@ generate_package_metadata() {
file_prefix="${work_dir}/package-infos/${package}.${git_revision}.${mod_git_revision}.${repository}"
if [ -e "${file_prefix}.builds" ] && \
- [ -e "${file_prefix}.depends" ] && \
- [ -e "${file_prefix}.needs" ] && \
+ [ -e "${file_prefix}.build-depends" ] && \
+ [ -e "${file_prefix}.run-depends" ] && \
[ -e "${file_prefix}.groups" ] && \
[ -e "${file_prefix}.packages" ]; then
return 0
@@ -191,26 +191,36 @@ generate_package_metadata() {
sort -u > \
"${file_prefix}.builds"
- # extract "depends" = makedepends \cup checkdepends \cup depends \cup \{ base, base-devel \}
- (
- printf 'all_depend = %s\n' 'base' 'base-devel'
- sed -n "$(printf '/^pkgname = /q;/^\tdepends = /p')" "${file_prefix}.SRCINFO"
- grep "$(printf '^\t\\(makedepends\\|checkdepends\\) = ')" "${file_prefix}.SRCINFO"
- ) | \
- cut -d= -f2 | \
- sed 's|^\s\+||; s|[<>]$||' | \
- sort -u > \
- "${file_prefix}.depends"
+ # extract "build-depends" = makedepends \cup checkdepends \cup depends \cup \{ base, base-devel \} \setminus "builds"
+ {
+ {
+ printf 'all_depend = %s\n' 'base' 'base-devel'
+ sed -n "$(printf '/^pkgname = /q;/^\tdepends = /p')" "${file_prefix}.SRCINFO"
+ grep "$(printf '^\t\\(makedepends\\|checkdepends\\) = ')" "${file_prefix}.SRCINFO"
+ } | \
+ cut -d= -f2 | \
+ sed 's|^\s\+||; s|[<>]$||' | \
+ sort -u
+ sed 'p' "${file_prefix}.builds"
+ } | \
+ sort | \
+ uniq -u > \
+ "${file_prefix}.build-depends"
- # extract "needs" = "depends" \setminus ( "builds" \cup \{ base-devel \} )
- (
- cat "${file_prefix}.depends"
+ # extract "run-depends" = depends \cup \{ base \} \setminus "builds"
+ {
+ {
+ printf 'all_depend = %s\n' 'base'
+ sed -n "$(printf '/^pkgname = /q;/^\tdepends = /p')" "${file_prefix}.SRCINFO"
+ } | \
+ cut -d= -f2 | \
+ sed 's|^\s\+||; s|[<>]$||' | \
+ sort -u
sed 'p' "${file_prefix}.builds"
- printf '%s\n' 'base-devel' 'base-devel'
- ) | \
+ } | \
sort | \
uniq -u > \
- "${file_prefix}.needs"
+ "${file_prefix}.run-depends"
rm "${file_prefix}.SRCINFO"
@@ -798,7 +808,7 @@ find_dependencies_on_build_list() {
generate_package_metadata "${package}" "${git_revision}" "${mod_git_revision}" "${repository}"
(
- cat "${work_dir}/package-infos/${package}.${git_revision}.${mod_git_revision}.${repository}.needs"
+ cat "${work_dir}/package-infos/${package}.${git_revision}.${mod_git_revision}.${repository}.build-depends"
grep -vxF 'break_loops' "${work_dir}/build-list" | \
awk '{print $1 "." $2 "." $3 "." $4}' | \
sed "
diff --git a/bin/db-update b/bin/db-update
index 430946c..6b97432 100755
--- a/bin/db-update
+++ b/bin/db-update
@@ -5,8 +5,8 @@
# to the respective stable repository
# 1] Condition for moving a package A from staging to testing is that:
-# a) nothing on the build-list needs A and
-# b) no done package B which is not being moved needs A
+# a) nothing on the build-list run-depends on A and
+# b) no done package B which is not being moved run-depends on A
# TODO:
@@ -532,16 +532,16 @@ while [ -s "${tmp_dir}/new-keep-packages" ]; do
sed '
s|^|'"${work_dir}"'/package-infos/|
- s|$|.needs|
+ s|$|.run-depends|
' "${tmp_dir}/keep-packages" | \
xargs -r grep -HF '' | \
sed '
s|^.*/||
- s|\.needs:| |
+ s|\.run-depends:| |
' | \
sort -u | \
sort -k2,2 > \
- "${tmp_dir}/keep-packages.needs"
+ "${tmp_dir}/keep-packages.run-depends"
sed '
s|^|'"${work_dir}"'/package-infos/|
@@ -558,7 +558,7 @@ while [ -s "${tmp_dir}/new-keep-packages" ]; do
join -j 2 -o 1.1 \
"${tmp_dir}/done-packages.builds" \
- "${tmp_dir}/keep-packages.needs" | \
+ "${tmp_dir}/keep-packages.run-depends" | \
sort -u > \
"${tmp_dir}/new-keep-packages"
diff --git a/bin/get-package-updates b/bin/get-package-updates
index 1d901da..7d9248a 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -309,7 +309,7 @@ sed "
sed "
s|^\S\+ |${work_dir}/package-infos/|
- s|\$|.needs|
+ s|\$|.build-depends|
" "${work_dir}/newest-revisions" | \
xargs -r grep -HF '' | \
sed '
@@ -381,7 +381,7 @@ while read -r package git_revision mod_git_revision repository; do
# add "$pkgname -> $build-target" to build-order list
sed "s|^|${package} |" "${work_dir}/package-infos/${package}.${git_revision}.${mod_git_revision}.${repository}.builds"
# add "$dependency -> $pkgname" to build-order list
- sed "s|\$| ${package}|" "${work_dir}/package-infos/${package}.${git_revision}.${mod_git_revision}.${repository}.needs"
+ sed "s|\$| ${package}|" "${work_dir}/package-infos/${package}.${git_revision}.${mod_git_revision}.${repository}.build-depends"
# add "base/base-devel -> $pkgname" to build-order list
printf "%s ${package}\n" 'base' 'base-devel'
done \
diff --git a/bin/show-dependencies b/bin/show-dependencies
index fc381dd..7d291e0 100755
--- a/bin/show-dependencies
+++ b/bin/show-dependencies
@@ -31,7 +31,7 @@ if [ $# -eq 0 ]; then
"${tmp_dir}/broken"
broken=$(
(
- find "${work_dir}/package-infos" -maxdepth 1 -name '*.depends' | \
+ find "${work_dir}/package-infos" -maxdepth 1 -name '*.build-depends' | \
sed 's|^.*/\(.*\)\(\.[^.]\+\)\{4\}|\1 \0|' | \
sort -k1,1 | \
join -1 1 -2 1 -o 1.2 - "${tmp_dir}/broken" | \
diff --git a/bin/why-dont-you b/bin/why-dont-you
index 64f914c..5dcf243 100755
--- a/bin/why-dont-you
+++ b/bin/why-dont-you
@@ -67,10 +67,10 @@ case "${action}" in
fi
dependent_packages=$(
- grep -lxF "${pkg}" "${work_dir}/package-infos/"*".needs" | \
+ grep -lxF "${pkg}" "${work_dir}/package-infos/"*".run-depends" | \
sed '
s|^.*/||
- s|\.needs$||
+ s|\.run-depends$||
'
)
@@ -216,22 +216,22 @@ case "${action}" in
continue
fi
- needs=$(
- find "${work_dir}/package-infos" -maxdepth 1 -name "${pkg}.*.needs"
+ build_depends=$(
+ find "${work_dir}/package-infos" -maxdepth 1 -name "${pkg}.*.build-depends"
)
- if [ -z "${needs}" ]; then
+ if [ -z "${build_depends}" ]; then
printf 'Package "%s" was deleted in the git repositories.\n' "${pkg}"
continue
fi
- needs=$(
- sort -u "${needs}"
+ build_depends=$(
+ sort -u "${build_depends}"
)
errors=$(
(
# shellcheck disable=SC2086
- printf '%s\n' ${needs}
+ printf '%s\n' ${build_depends}
awk '{print $3}' "${tmp_file}" | \
sort -u
) | \