Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/check
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2024-09-19 15:23:25 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2024-09-19 15:23:25 +0200
commitb98887e1a4f044e13ba15a09486f615672ba472a (patch)
treebbbf1a94b9150a48068988b7b72d41dc71a94d3b /bin/check
parentc8f372b24fef9c52e93c85f90df59ec2a1511b4a (diff)
can read package list from the AUR, also checking if missing pacakges have been dropped to the AUR
Diffstat (limited to 'bin/check')
-rwxr-xr-xbin/check13
1 files changed, 12 insertions, 1 deletions
diff --git a/bin/check b/bin/check
index 9e187cf..3acb635 100755
--- a/bin/check
+++ b/bin/check
@@ -15,11 +15,13 @@ fi
find "${state_dir}"/{core,extra}-{any,x86_64} -type f > /tmp/update_packages.$$
nof_packages=`cat /tmp/update_packages.$$ | wc -l`
+nof_aur_packages=`wc -l ${aur_state_dir}/packages | cut -f 1 -d ' '`
nof_checked_out_packages=`find "${packages_dir}" -type f -name PKGBUILD | wc -l`
echo "${nof_packages} packages in state repo"
echo "${nof_checked_out_packages} packages are checked out"
+echo "${nof_aur_packages} packages in AUR"
> "${data_dir}/stats"
echo "packages_state\t${nof_packages}" >> "${data_dir}/stats"
@@ -43,9 +45,18 @@ done
> "${data_dir}/missing_state_file"
for pkgfile in `find "${packages_dir}" -type f -name PKGBUILD`; do
repo_in_pkgfile=`echo $pkgfile | rev | cut -f 2-3 -d / | rev`
+ pkgname_in_pkgfile=`echo $pkgfile | rev | cut -f 2 -d / | rev`
state_file="${state_dir}/${repo_in_pkgfile}"
if test ! -f "${state_file}"; then
- echo "${repo_in_pkgfile}\tnot in state repo anymore" >> "${data_dir}/missing_state_file"
+ grep "^${pkgname_in_pkgfile}$" "${aur_state_dir}/packages" 2>&1 >/dev/null
+ if test $? = 0; then
+ state='missing'
+ aur_state="<a href=\"https://aur.archlinux.org/packages/${pkgname_in_pkgfile}\">${pkgname_in_pkgfile}</a>"
+ else
+ state='missing'
+ aur_state='missing'
+ fi
+ echo "${repo_in_pkgfile}\t${state}\t${aur_state}" >> "${data_dir}/missing_state_file"
fi
done
nof_missing_state_files=`cat ${data_dir}/missing_state_file | wc -l`