From 99d01b6e0ea9f3a3b543956227f9b4d4a2cc9756 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 14 Aug 2017 21:20:30 +0200 Subject: bin/db-update: unstage base and base-devel packages only if no base and base-devel packages are on the build-list anymore --- bin/db-update | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) (limited to 'bin/db-update') diff --git a/bin/db-update b/bin/db-update index cc5cc96..f73792f 100755 --- a/bin/db-update +++ b/bin/db-update @@ -447,7 +447,7 @@ for ending in 'done' 'testing'; do if [ "${ending}" = 'testing' ] && \ [ -z "${packages_to_stabilize}" ]; then # if nothing is to be untested, we don't care about duplicate - # testing packages (and maybe a unstaging fixes this anyway) + # testing packages (and maybe an unstaging fixes this anyway) continue fi if [ -n "$( @@ -470,17 +470,6 @@ done # packages which can't be un-staged because they're still dependencies # of any job on the build-list -ls "${work_dir}/package-infos" | \ - grep '\.groups' | \ - sed "s|^|${work_dir}/package-infos/|" | \ - xargs -r grep -lx 'base\(-devel\)\?' | \ - sed ' - s|^.*/|| - s|\(\.[^.]\+\)\{4\}$|| - ' | \ - sort -u > \ - "${tmp_dir}/base-packages" - ( grep -vxF 'break_loops' "${work_dir}/build-list" | \ while read -r pkg pkg_rev mod_rev repo; do @@ -488,7 +477,32 @@ ls "${work_dir}/package-infos" | \ cat "${work_dir}/package-infos/${pkg}.${pkg_rev}.${mod_rev}.${repo}.depends" done | \ sort -u - cat "${tmp_dir}/base-packages" "${tmp_dir}/base-packages" + + ls "${work_dir}/package-infos" | \ + grep '\.groups' | \ + sed "s|^|${work_dir}/package-infos/|" | \ + xargs -r grep -lx 'base\(-devel\)\?' | \ + sed ' + s|^.*/|| + s|\(\.[^.]\+\)\{4\}$|| + ' | \ + sort -u > \ + "${tmp_dir}/base-packages" + + # no base / base-devel packages on the build list? + if [ -z $( + ( + grep -vxF 'break_loops' "${work_dir}/build-list" | \ + awk '{print $1}' | \ + sort -u + sort -u "${tmp_dir}/base-packages" + ) | \ + sort | \ + uniq -d + ) ]; then + # unstage all base / base-devel packages from staging + cat "${tmp_dir}/base-packages" "${tmp_dir}/base-packages" + fi ) | \ sort | \ uniq -u > \ -- cgit v1.2.3-70-g09d2