From d9c32afaa3937096612de1b22ff76766f9b3be65 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 19 Apr 2016 11:42:22 +0200 Subject: chroot-Test neu in archPackagesUpdate --- archPackagesUpdate | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/archPackagesUpdate b/archPackagesUpdate index f2331167..b31e4fc1 100755 --- a/archPackagesUpdate +++ b/archPackagesUpdate @@ -175,6 +175,75 @@ done if ${aufRechenknecht} then +# check sanity of build-chroots + basePakete="$( + echo ' + pacman -Qg base base-devel | \ + cut -d " " -f 2 | \ + sort -u + exit + ' | \ + chrootUnpriv + )" + explizitinstalliertePakete="$( + echo ' + pacman -Qtt | \ + cut -d " " -f 1 + exit + ' | \ + chrootUnpriv + )" + alleinstalliertenPakete="$( + echo ' + pacman -Q | \ + cut -d " " -f 1 + exit + ' | \ + chrootUnpriv + )" + zuvielePakete="$( + ( + ( + echo "${explizitinstalliertePakete}" + echo "${basePakete}" + ) | \ + sort | \ + uniq -d + echo "${explizitinstalliertePakete}" + ) | \ + sort | \ + uniq -u + )" + zuwenigePakete="$( + ( + ( + echo "${alleinstalliertenPakete}" + echo "${basePakete}" + ) | \ + sort | \ + uniq -d + echo "${basePakete}" + ) | \ + sort | \ + uniq -u + )" + + err=false + if [ -n "${zuvielePakete}" ] + then + >&2 echo 'zu viele Pakete installiert:' + >&2 echo "${zuvielePakete}" + err=true + fi + if [ -n "${zuwenigePakete}" ] + then + >&2 echo 'zu wenige Pakete installiert:' + >&2 echo "${zuwenigePakete}" + err=true + fi + + ${err} && exit 1 + maxErr=0 # generate current makepkg.conf and makepkg32.conf -- cgit v1.2.3-70-g09d2