summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-04-19 11:42:22 +0200
committerErich Eckner <git@eckner.net>2016-04-19 12:01:17 +0200
commitd9c32afaa3937096612de1b22ff76766f9b3be65 (patch)
treeffe3ed46aeb4975103b2aad86ab293292093de77
parentdc5bf56d98d829e268eaccf7153cdb5db65ea25f (diff)
downloadarchlinuxewe.git.save-d9c32afaa3937096612de1b22ff76766f9b3be65.tar.xz
chroot-Test neu in archPackagesUpdate
-rwxr-xr-xarchPackagesUpdate69
1 files changed, 69 insertions, 0 deletions
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