Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-04-10 10:16:23 +0200
committerErich Eckner <git@eckner.net>2018-04-10 10:28:29 +0200
commitb7c84ca8a37a9120319e3a820d3e4c67f7c1f2d7 (patch)
treee1f8dace770f478b58adabec8e4a67615c34f44d /bin
parent53a53d657e6883af2ca6cf2eb3b29fa4964dd88c (diff)
lib/mysql-functions: mysql_add_package_source: $old_git_revision new to shorten lookup of commit date
Diffstat (limited to 'bin')
-rwxr-xr-xbin/get-package-updates17
-rwxr-xr-xbin/seed-build-list2
2 files changed, 11 insertions, 8 deletions
diff --git a/bin/get-package-updates b/bin/get-package-updates
index 3ae3602..5ff592f 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -211,19 +211,21 @@ for repo in ${repo_names}; do
# shellcheck disable=SC2016
sed 's|^\(.\t\)\([^/]\+\)/\([^/]\+\)/\(.\+\)$|\2 \1\3/repos/\2-x86_64/\4|' | \
while read -r pkg_repo rest; do
- eval 'printf '"'"'%s %s\n'"'" \
- "$(printf '"${new_repo_revisions__%s}"' "$(find_git_repository_to_package_repository "${pkg_repo}")")" \
+ repo=$(find_git_repository_to_package_repository "${pkg_repo}")
+ eval 'printf '"'"'%s %s %s\n'"'" \
+ "$(printf '"${new_repo_revisions__%s}"' "${repo}")" \
+ "$(printf '"${old_repo_revisions__%s}"' "${repo}")" \
"'${rest}'"
done
else
- sed "s|^|${new_repo_revision} |"
+ sed "s|^|${new_repo_revision} ${old_repo_revision} |"
fi | \
- grep '^\S\+ .\s[^/]\+/repos/[^/]\+/PKGBUILD$' | \
+ grep '^\S\+ \S\+ .\s[^/]\+/repos/[^/]\+/PKGBUILD$' | \
# ignore i686
grep -v -- '-i686/PKGBUILD$' | \
# ignore staging and testing
grep -v -- '[-/]\(staging\|testing\|unstable\)-[^/]\+/PKGBUILD$' | \
- sed 's|^\(\S\+\) \(.\)\t\([^/]\+\)/repos/\([^/]\+\)-[^/-]\+/PKGBUILD$|\2 \3 \1 \4|'
+ sed 's|^\(\S\+ \S\+\) \(.\)\t\([^/]\+\)/repos/\([^/]\+\)-[^/-]\+/PKGBUILD$|\2 \3 \1 \4|'
done | \
sort -u | \
sed '
@@ -235,11 +237,12 @@ done | \
' | \
sort -k1,1 | \
sed 's|^[012] ||' | \
- while read -r mode package git_revision repository; do
+ while read -r mode package git_revision old_git_revision repository; do
if [ "${mode}" = 'D' ]; then
# deleted PKGBUILD
# shellcheck disable=SC2154
git_revision="${new_repo_revisions__archlinux32}"
+ old_git_revision=''
found_package=false
for repository in ${repo_names}; do
eval 'repo_path="${repo_paths__'"${repository}"'}"'
@@ -305,7 +308,7 @@ done | \
mysql_run_query
# shellcheck disable=SC2154
printf '%s ' "${package}" "${git_revision}" "${new_repo_revisions__archlinux32}" "${repository}" >&2
- mysql_generate_package_metadata 'to-be-decided' "${package}" "${git_revision}" "${new_repo_revisions__archlinux32}" "${repository}"
+ mysql_generate_package_metadata 'to-be-decided' "${package}" "${git_revision}" "${old_git_revision}" "${new_repo_revisions__archlinux32}" "${repository}"
printf '\n' >&2
continue
fi
diff --git a/bin/seed-build-list b/bin/seed-build-list
index a4c1097..3a808b6 100755
--- a/bin/seed-build-list
+++ b/bin/seed-build-list
@@ -373,7 +373,7 @@ printf 'CREATE TEMPORARY TABLE `pkgbases` (`pkgbase` VARCHAR(64), `repository` V
printf '%s ' "${pkgbase}" "${git_rev}" "${mod_git_rev}" "${repo}" >&2
printf '%s ' "${pkgbase}" "${git_rev}" "${mod_git_rev}" "${repo}" | \
sed 's/ $/\n/'
- mysql_generate_package_metadata 'build-list' "${pkgbase}" "${git_rev}" "${mod_git_rev}" "${repo}"
+ mysql_generate_package_metadata 'build-list' "${pkgbase}" "${git_rev}" '' "${mod_git_rev}" "${repo}"
printf '\n' >&2
done