summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2018-09-24 17:08:44 -0400
committerLuke Shumaker <lukeshu@parabola.nu>2018-09-24 20:26:36 -0400
commit1dff5a4284daed3b65722e008456a21b19e3960f (patch)
treedc02736920b6fd845aff0211cb455bc708600b79
parent320fcbbcd56b709777f697445a317a6db690ad13 (diff)
db-import-pkg: Also stage symlinks to PKGPOOLparabola/20180924
-rwxr-xr-xdb-import-pkg3
-rwxr-xr-xdb-update18
2 files changed, 11 insertions, 10 deletions
diff --git a/db-import-pkg b/db-import-pkg
index 8d5ebc0..0541842 100755
--- a/db-import-pkg
+++ b/db-import-pkg
@@ -280,12 +280,13 @@ main() {
local pkgname filename pgpsig
while read -r pkgname filename pgpsig; do
local pool staged=false
- for pool in "${INHERIT[@]}"; do
+ for pool in "$PKGPOOL" "${INHERIT[@]}"; do
filepath=("${FTP_BASE}/${pool}/${filename}")
if [[ -f $filepath && ! -h $filepath ]]; then
ln -srT -- "$filepath" "${WORKDIR}/staging/${repo}/${filename}"
ln -srT -- "$filepath".sig "${WORKDIR}/staging/${repo}/${filename}".sig
staged=true
+ break
fi
done
if ! $staged; then
diff --git a/db-update b/db-update
index e2b2741..c8dc3b6 100755
--- a/db-update
+++ b/db-update
@@ -51,16 +51,16 @@ for repo in "${repos[@]}"; do
if (( $? == 0 )); then
for pkg in "${pkgs[@]}"; do
if [[ -h ${pkg} ]]; then
- # 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##*/}"
+ # As a special hack for
+ # 1. inheriting arch=(any) packages between db-import
+ # upstreams, and
+ # 2. re-adding previously removed binaries that have not been
+ # cleaned up yet,
+ # allow symlinks that point to packages under ${FTP_BASE}/pool/.
+ if [[ -f ${pkg} && "$(readlink -f -- "$pkg")" = "${FTP_BASE}"/pool/*${PKGEXTS} ]]; then
+ continue
fi
+ die "Package %s is a symbolic link" "$repo/${pkg##*/}"
fi
if ! check_pkgfile "${pkg}"; then
die "Package %s is not consistent with its meta data" "$repo/${pkg##*/}"