Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/get-package-updates
diff options
context:
space:
mode:
Diffstat (limited to 'bin/get-package-updates')
-rwxr-xr-xbin/get-package-updates40
1 files changed, 26 insertions, 14 deletions
diff --git a/bin/get-package-updates b/bin/get-package-updates
index 9a3d8b1..328f8e3 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -9,6 +9,7 @@
# -> (stale) lock files, moving (or changing content of) loop lock files
# dependencies declared inside a PKGBUILD's package function do not
# correctly take into account CARCH (see package "gens" from community)
+# remove extra case for "python-pysocks"
. "${0%/*}/../conf/default.conf"
@@ -194,12 +195,13 @@ while read -r package git_revision mod_git_revision repository; do
# extract infos from PKGBUILD if not existent yet
if [ ! -e "${file_prefix}.builds" ] || \
+ [ ! -e "${file_prefix}.depends" ] || \
[ ! -e "${file_prefix}.needs" ] || \
[ ! -e "${file_prefix}.packages" ]; then
# delete cached values of old versions of this PKGBUILD
ls -1 "${file_prefix%.*.*}."* 2> /dev/null | \
sed 's|^.*/||' | \
- grep "^${package//./\\.}"'\.\([0-9a-f]\{40\}\.\)\{2\}\(builds\|needs\|packages\|SRCINFO\)$' | \
+ grep "^${package//./\\.}"'\.\([0-9a-f]\{40\}\.\)\{2\}\(builds\|depends\|needs\|packages\|SRCINFO\)$' | \
while read file; do
rm "${work_dir}/package-infos/${file}"
done
@@ -239,11 +241,7 @@ while read -r package git_revision mod_git_revision repository; do
# extract "needs" = ( makedepends \cup checkdepends ) \setminus "builds"
(
- (
- # this would include runtime dependencies, too:
- # sed -n '/^pkgname = /q;/^'$'\t''depends = /p' "${file_prefix}.SRCINFO"
- grep '^'$'\t''\(makedepends\|checkdepends\) = ' "${file_prefix}.SRCINFO"
- ) | \
+ grep '^'$'\t''\(makedepends\|checkdepends\) = ' "${file_prefix}.SRCINFO" | \
cut -d= -f2 | \
sed 's|^\s\+||; s|[<>]$||' | \
sort -u
@@ -253,12 +251,23 @@ while read -r package git_revision mod_git_revision repository; do
uniq -u > \
"${file_prefix}.needs"
+ # extract "depends" = makedepends \cup checkdepends \cup depends
+ (
+ sed -n '/^pkgname = /q;/^'$'\t''depends = /p' "${file_prefix}.SRCINFO"
+ grep '^'$'\t''\(makedepends\|checkdepends\) = ' "${file_prefix}.SRCINFO"
+ ) | \
+ cut -d= -f2 | \
+ sed 's|^\s\+||; s|[<>]$||' | \
+ sort -u > \
+ "${file_prefix}.depends"
+
rm "${file_prefix}.SRCINFO"
fi
done < "${work_dir}/build-list.new"
+echo 'apply blacklisting'
# ignore blacklisted packages and dependent packages
# this is the first time when all the information is available and up to date
@@ -273,15 +282,18 @@ while [ -n "${black_listed_new}" ]; do
black_listed_new="$(
echo "${black_listed_new}" | \
while read -r bl_package; do
- echo "${bl_package}"
- echo "${bl_package}"
- ls "${work_dir}/package-infos/" | \
- grep '\.needs$' | \
- while read -r package_info; do
- grep -q "^${bl_package//./\\.}\$" "${work_dir}/package-infos/${package_info}" && \
- echo "${package_info%.*.*.needs}"
- done
+ grep "^${bl_package//./\\.}\$" "${work_dir}/package-infos/"*.depends | \
+ cut -d: -f1 | \
+ sed '
+ s|^.*/||
+ s|\(\.[^.]\+\)\{3\}$||
+ '
done | \
+ grep -v '^python-pysocks$' | \
+ sort -u
+ )"
+ black_listed_new="$(
+ printf '%s\n' "${black_listed}" "${black_listed}" "${black_listed_new}" | \
sort | \
uniq -u
)"