summaryrefslogtreecommitdiff
path: root/lib/mysql-functions
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-04-18 11:29:26 +0200
committerErich Eckner <git@eckner.net>2018-04-18 11:29:26 +0200
commit85a12934a53fc06f5d4902e4e23ca79efc3f3995 (patch)
tree687b84e4e4c5b9eaddfc14793ed515bf15f197af /lib/mysql-functions
parentcbe003cac057aa62ed44c2bef2fed4b10e4e1924 (diff)
downloadbuilder-85a12934a53fc06f5d4902e4e23ca79efc3f3995.tar.xz
lib/mysql-functions: mysql_add_package_source: more debug output
Diffstat (limited to 'lib/mysql-functions')
-rwxr-xr-xlib/mysql-functions10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 334ded5..2ea83fa 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -109,8 +109,10 @@ mysql_add_package_source() {
else
uses_modification=0
fi
+ printf 'A' >&2
if grep -qx 'PKGBUILD = \S\+' "${srcinfo_file}"; then
uses_upstream=1
+ printf 'B' >&2
eval 'repo_path="${repo_paths__'"$(sed -n 's/^upstream_git_repository = //;T;p' "${srcinfo_file}")"'}"'
pkgbuild=$(
sed -n '
@@ -119,19 +121,26 @@ mysql_add_package_source() {
p
' "${srcinfo_file}"
)
+ printf 'C' >&2
commit_time=$(
git -C "${repo_path}" log -n 1 --pretty=format:%ct "${old_git_revision}${git_revision}" -- "${pkgbuild}"
)
+ printf 'D' >&2
if [ -z "${commit_time}" ]; then
# We may have modified git_mod_revision!
+ printf 'E' >&2
commit_time=$(
git -C "${repo_path}" log -n 1 --pretty=format:%ct "${git_revision}" -- "${pkgbuild}"
)
+ printf 'F' >&2
fi
else
+ printf 'G' >&2
uses_upstream=0
commit_time=$(date '+%s')
+ printf 'H' >&2
fi
+ printf 'I' >&2
{
printf 'INSERT IGNORE INTO package_sources'
@@ -160,6 +169,7 @@ mysql_add_package_source() {
)"
} | \
mysql_run_query
+ printf 'J' >&2
}
# mysql_show_binary_package $pkgname $pkgver $pkgrel $sub_pkgrel