diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-09-14 05:40:47 -0700 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-09-14 05:40:47 -0700 |
commit | 4e81322477747ad61524f1d18fcba58965872542 (patch) | |
tree | 9a1b9e6dc0dbef73f2b313124960744c974e3df4 | |
parent | 756f1c3b8bb39c9932b04cea05adecb71553c982 (diff) |
Fixed sync paths
* rsync files are splitted by repo and arch
* compare available packages with pool, not repos (dead symlinks broke syncing)
* receive from repo/os/arch instead of repo/ (it made packages on other arches missing)
-rwxr-xr-x | repo-update | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/repo-update b/repo-update index a44ae87..4f31116 100755 --- a/repo-update +++ b/repo-update @@ -6,28 +6,31 @@ source $(dirname $0)/local_config source $(dirname $0)/libremessages for repo in ${ARCHREPOS[@]}; do + msg "Syncing ${repo}" - for arch in ${ARCHARCHES[@]} 'any'; do - msg2 "${repo} ${arch}" - # makes a file containing rsync output for filter.py - ${rsync_list_command} \ - rsync://${mirror}/${mirrorpath}/${repo}/os/${arch}/ \ - ${repodir}/staging/${repo}/ > ${rsout_file} - # reads blacklist and rsout_file and makes an rsync exclude-from - # list - filter.py -r ${rsync_blacklist} -k ${blacklist} \ - -f ${rsout_file} - # list files in ${repodir}/${repo} and write their names on - # rsync_not_needed for using as an rsync exclude-from - find ${repodir}/${repo} -name "*${PKGEXT}" \ - -fprintf ${rsync_not_needed} '%f\n' - # Actual rsync command - ${rsync_update_command} \ - --exclude-from=${rsync_blacklist} \ - --exclude-from=${rsync_not_needed} \ - rsync://${mirror}/${mirrorpath}/${repo}/os/${arch}/ \ - ${repodir}/staging/${repo}/ - done + for arch in ${ARCHARCHES[@]}; do + msg2 "${repo} ${arch}" + # makes a file containing rsync output for filter.py + ${rsync_list_command} \ + rsync://${mirror}/${mirrorpath}/${repo}/os/${arch}/ \ + ${repodir}/staging/${repo}/os/${arch}/ > ${rsout_file}-${repo}-${arch} || exit 1 + # reads blacklist and rsout_file and makes an rsync exclude-from + # list + filter.py -r ${rsync_blacklist} -k ${blacklist} \ + -f ${rsout_file}-${repo}-${arch} || exit 1 + # list files in ${repodir}/${repo} and write their names on + # rsync_not_needed for using as an rsync exclude-from + #find ${repodir}/${repo}/os/${arch}/ -name "*${PKGEXT}" \ + # -fprintf ${rsync_not_needed}-${repo}-${arch} '%f\n' || exit 1 + find ${repodir}/${PKGPOOL}/ -name "*${PKGEXT}" \ + -fprintf ${rsync_not_needed}-${repo}-${arch} '%f\n' || exit 1 + # Actual rsync command + ${rsync_update_command} \ + --exclude-from=${rsync_blacklist} \ + --exclude-from=${rsync_not_needed}-${repo}-${arch} \ + rsync://${mirror}/${mirrorpath}/${repo}/os/${arch}/ \ + ${repodir}/staging/${repo}/ || exit 1 + done for arch in ${ARCHARCHES[@]}; do msg2 "Making pending list for $repo $arch" # if there is a db in repo (db is created on rsync) @@ -42,7 +45,7 @@ for repo in ${ARCHREPOS[@]}; do done # if some nonfree files got pass the filter this command delete them msg2 "Fallback cleaning repo" - $(dirname $0)/clean_repo.py -k ${blacklist} -d ${repodir}/staging/${repo} + $(dirname $0)/clean_repo.py -k ${blacklist} -d ${repodir}/staging/${repo} || exit 1 done msg "Removing leftover files..." |