summaryrefslogtreecommitdiff
path: root/archPackagesUpdate
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-04-11 12:35:02 +0200
committerErich Eckner <git@eckner.net>2016-04-11 12:42:07 +0200
commit38c744bd30faff1df8bd450ef2ba4e2e7edbdaf6 (patch)
tree8e8c4065647f39e58b2c77def9e9efc4887b4417 /archPackagesUpdate
parenta49a901e70faa56fcadf1e1de82fbafdc6dbd448 (diff)
downloadarchlinuxewe.git.save-38c744bd30faff1df8bd450ef2ba4e2e7edbdaf6.tar.xz
Datenbankcheck neu
Diffstat (limited to 'archPackagesUpdate')
-rwxr-xr-xarchPackagesUpdate47
1 files changed, 41 insertions, 6 deletions
diff --git a/archPackagesUpdate b/archPackagesUpdate
index d7d4f6c5..56f8132d 100755
--- a/archPackagesUpdate
+++ b/archPackagesUpdate
@@ -229,18 +229,53 @@ then
rm "${zuLoeschen}"
done
done
- done
# update db
-
+
+ for arch in *
+ do
+ [ ! -d "${arch}" ] && continue
+ [ "${arch}" == "any" ] && continue
+ [ ! "${oarch}" == "any" ] && [ ! "${arch}" == "${oarch}" ] && continue
+
+ repo-add \
+ '${pkgDir}'/${arch}/archlinuxewe.db.tar.gz \
+ '${pkgDir}'/${arch}/${paket}-${vers}-${oarch}.pkg.tar.xz
+
+ done
+
+ done
+
+# check db
+ err=0
+
for arch in *
do
- [ "${arch}" == "any" ] && continue
[ ! -d "${arch}" ] && continue
- repo-add -q \
- '${pkgDir}'/${arch}/archlinuxewe.db.tar.gz \
- '${pkgDir}'/${arch}/*.pkg.tar.xz
+ [ "${arch}" == "any" ] && continue
+
+ for warnungen in $( \
+ (
+ tar -Oxzf '${pkgDir}'/${arch}/archlinuxewe.db.tar.gz | \
+ grep -A1 "^%FILENAME%\$" | \
+ grep -v "^%FILENAME%\$" | \
+ grep -v -- "^--\$"
+ ls '${pkgDir}'/${arch} | \
+ grep "^.*\.pkg\.tar\.xz\$"
+ ) | \
+ sort | \
+ uniq -u
+ )
+ do
+
+ err=1
+ >&2 echo "FEHLER: Paket '${pkgDir}'/${arch}/${warnungen} ist entweder nur in der Datenbank oder nur im Verzeichnisbaum vorhanden."
+
+ done
+
done
+
+ exit ${err}
'
fi