summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2015-09-26 15:24:27 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2015-09-26 15:24:27 -0500
commit67061580ebd4dde6e94d281a60e1322dc6e9b587 (patch)
tree60ddf1dd583ce9c70cdbd70e710eebf20d758ce6
parentf16b5bfab292c9947dfe342b27f1c31cf6045728 (diff)
Fixing symlinks to db-syn-arm
-rwxr-xr-xdb-sync-arm24
1 files changed, 21 insertions, 3 deletions
diff --git a/db-sync-arm b/db-sync-arm
index 2e58802..08a0905 100755
--- a/db-sync-arm
+++ b/db-sync-arm
@@ -118,6 +118,8 @@ init() {
pkgpool="pool/packages"
fi
+ msg2 "Retrieving %d packages to pool" "$(wc -l /tmp/${_repo}-${_arch}.whitelist | cut -d' ' -f1)"
+
# Sync excluding everything but whitelist
rsync "${extra[@]}" --no-motd -rtlH \
--delay-updates \
@@ -134,10 +136,28 @@ init() {
"${WORKDIR}/${_arch}/${_repo}/" \
"${FTP_BASE}/${_repo}/os/${_arch}/"
+ # Cleanup
+ unset db
+ done
+ done
+
+
+ msg "Generating symbolic links to pool"
+
+ for _arch in "${OURARCHES[@]}"; do
+ for _repo in "${ARMREPOS[@]}"; do
+ # Set pkgpool to symlink
+ if [ "${_repo}" = "community" ]; then
+ pkgpool="pool/community"
+ else
+ pkgpool="pool/packages"
+ fi
+
# Search packages in whitelist to create symlinks
sed -i 's/^/\^/' "/tmp/${_repo}-${_arch}.whitelist"
- ls ${FTP_BASE}/${pkgpool}/ | grep -w -f "/tmp/${_repo}-${_arch}.whitelist" \
+ ls "${FTP_BASE}/${pkgpool}/" | grep "${_arch}" \
+ grep -w -f "/tmp/${_repo}-${_arch}.whitelist" \
> "/tmp/${_repo}-${_arch}.pkgwhitelist"
msg "Putting symlinks"
@@ -145,8 +165,6 @@ init() {
ln -sf "../../../${pkgpool}/${_pkgfile}" "${FTP_BASE}/${_repo}/os/${_arch}"
done < "/tmp/${_repo}-${_arch}.pkgwhitelist"
- # Cleanup
- unset db
done
done