makechrootpkg: sync database for checkpkg to avoid nonexistent targets

For build servers or similar infrastructure its relatively common to not
sync/update the database regularly. This leads to problems properly
running checkpkg duo to nonexistent target files that we try to
download. As building on build servers is a very common use case, lets
ensure we sync the local database before trying to resolve the package
locations.
This commit is contained in:
Levente Polyak 2019-11-30 13:13:49 +01:00
parent cee28a1b13
commit 104c5bc90e
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8
1 changed files with 1 additions and 1 deletions

View File

@ -387,7 +387,7 @@ if (( ret != 0 )); then
else
if (( run_checkpkg )); then
msg "Running checkpkg"
remotepkgs=($(pacman -Sddp --logfile /dev/null "${pkgnames[@]}"))
remotepkgs=($(pacman -Syddp --logfile /dev/null "${pkgnames[@]}"|grep '://'))
if (( $? )); then
warning "Skipped checkpkg due to missing repo packages"
exit 0