Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/mysql-functions8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 1706c11..6a6a1e7 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -1440,6 +1440,7 @@ mysql_join_dependencies_install_target_providers_with_versions() {
# - ids of compressions -> $compression_ids__$compression
# - $package_compression_suffix_regex
mysql_retrieve_static_information() {
+ local found_something
eval "$(
{
printf 'SELECT CONCAT('
@@ -1514,8 +1515,15 @@ mysql_retrieve_static_information() {
printf '"\\""'
printf ') FROM `compressions`;\n'
} \
+ | sed '
+ s@^\(SELECT \)\(.*\)$@SELECT "found_something=false;"; \1"found_something=true; ",\2 SELECT "if ! ${found_something}; then >\&2 echo \\"Some variable was not found in the database.\\"; exit 1; fi;";@
+ ' \
| mysql_run_query
)"
+ if ! ${found_something}; then
+ >&2 echo 'No variables were found in the database.'
+ exit 1
+ fi
}
# mysql_query_and_delete_unneeded_binary_packages