summaryrefslogtreecommitdiff
path: root/db-update
diff options
context:
space:
mode:
Diffstat (limited to 'db-update')
-rwxr-xr-xdb-update15
1 files changed, 12 insertions, 3 deletions
diff --git a/db-update b/db-update
index e70b94b..a36199e 100755
--- a/db-update
+++ b/db-update
@@ -51,7 +51,16 @@ for repo in "${repos[@]}"; do
if (( $? == 0 )); then
for pkg in "${pkgs[@]}"; do
if [[ -h ${pkg} ]]; then
- die "Package %s is a symbolic link" "$repo/${pkg##*/}"
+ # As a special hack for inheriting packages between db-import
+ # upstreams, allow symlinks that point to arch=(any) packages in a
+ # different PKGPOOL.
+ if ! [[
+ -f ${pkg} &&
+ "$(readlink -f -- "$pkg")" = "${FTP_BASE}"/pool/*-any${PKGEXTS} &&
+ "$(readlink -f -- "$pkg")" != "${FTP_BASE}/${PKGPOOL}"/*
+ ]]; then
+ die "Package %s is a symbolic link" "$repo/${pkg##*/}"
+ fi
fi
if ! check_pkgfile "${pkg}"; then
die "Package %s is not consistent with its meta data" "$repo/${pkg##*/}"
@@ -94,12 +103,12 @@ for repo in "${repos[@]}"; do
msg2 '%s (%s)' "$pkgfile" "$pkgarch"
# any packages might have been moved by the previous run
if [[ -f ${pkg} ]]; then
- mv "${pkg}" "$FTP_BASE/${PKGPOOL}"
+ mv_ln "${pkg}" "$FTP_BASE/${PKGPOOL}"
fi
ln -s "../../../${PKGPOOL}/${pkgfile}" "$FTP_BASE/$repo/os/${pkgarch}"
# also move signatures
if [[ -f ${pkg}.sig ]]; then
- mv "${pkg}.sig" "$FTP_BASE/${PKGPOOL}"
+ mv_ln "${pkg}.sig" "$FTP_BASE/${PKGPOOL}"
fi
if [[ -f $FTP_BASE/${PKGPOOL}/${pkgfile}.sig ]]; then
ln -s "../../../${PKGPOOL}/${pkgfile}.sig" "$FTP_BASE/$repo/os/${pkgarch}"