local total=$(query_db "SELECT count(*) FROM sources AS s JOIN schedule AS sch ON s.id=sch.package_id WHERE s.architecture='x86_64' and sch.date_build_started is NULL;")
echo"$(date-u) - Updating Arch Linux repositories, currently $total packages scheduled."
echo"$(date-u) - $TOTAL Arch Linux packages are known in total to us."
echo"$(date-u) - $TOTAL Arch Linux packages are now known to Arch Linux."
local total=$(query_db "SELECT count(*) FROM sources AS s JOIN schedule AS sch ON s.id=sch.package_id WHERE s.architecture='x86_64' and sch.date_build_started is NULL;")
echo"$(date-u) - updating Arch Linux repositories, currently $total packages scheduled."
#
# remove packages which are gone (only when run between 21:00 and 23:59)