summaryrefslogtreecommitdiff
path: root/db-update
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-08-17 16:41:31 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-08-17 16:41:31 +0200
commitcb39feaff074c5e08ff2dfce8dfa04c545233b7e (patch)
treea73133dbb181c161d2801b971bf354aacaa1bb21 /db-update
parent4daeb0a71e65618c56d672118675c9efd57c5979 (diff)
Don't try to update no package
Check if there are packages to update for given architecure. Previously db-update quit when only one arch of a package was available.
Diffstat (limited to 'db-update')
-rwxr-xr-xdb-update10
1 files changed, 6 insertions, 4 deletions
diff --git a/db-update b/db-update
index b11face..74abea8 100755
--- a/db-update
+++ b/db-update
@@ -60,10 +60,12 @@ for repo in ${repos[@]}; do
ln -s "../../../$(get_pkgpool_for_host)/${pkgfile}" "$FTP_BASE/$repo/os/${pkgarch}"
add_pkgs[${#add_pkgs[*]}]=${pkgfile}
done
- pushd "$FTP_BASE/$repo/os/${pkgarch}" >/dev/null
- /usr/bin/repo-add -q "$repo$DBEXT" ${add_pkgs[@]} >/dev/null \
- || die "Could not add packages"
- popd >/dev/null
+ if [ ${#add_pkgs[@]} -ge 1 ]; then
+ pushd "$FTP_BASE/$repo/os/${pkgarch}" >/dev/null
+ /usr/bin/repo-add -q "$repo$DBEXT" ${add_pkgs[@]} >/dev/null \
+ || die "Could not add packages"
+ popd >/dev/null
+ fi
done
done