From 85a12934a53fc06f5d4902e4e23ca79efc3f3995 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 18 Apr 2018 11:29:26 +0200 Subject: lib/mysql-functions: mysql_add_package_source: more debug output --- lib/mysql-functions | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/mysql-functions') 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 -- cgit v1.2.3-70-g09d2