From d48d2fdbb8f2995e75a291a42946e141123e574e Mon Sep 17 00:00:00 2001 From: Marc Fiuczynski Date: Mon, 19 Nov 2007 17:55:16 +0000 Subject: [PATCH] add --delete to rsync command to ensure that old rpms that are no longer in the repo get deleted locally --- vbuild-fedora-mirror.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vbuild-fedora-mirror.sh b/vbuild-fedora-mirror.sh index 773a1932..3490ccaf 100755 --- a/vbuild-fedora-mirror.sh +++ b/vbuild-fedora-mirror.sh @@ -48,30 +48,30 @@ case $findex in 2|4|6) echo "============================== $findex core" mkdir -p ${root}/core/$findex/$arch/os/ - rsync $dry_run -avz --exclude debug/ ${rsyncurl}/core/$findex/$arch/os/ ${root}/core/$findex/$arch/os/ + rsync $dry_run -avz --delete --exclude debug/ ${rsyncurl}/core/$findex/$arch/os/ ${root}/core/$findex/$arch/os/ echo "============================== $findex updates" mkdir -p ${root}/core/updates/$findex/$arch/ - rsync $dry_run -avz --exclude debug/ ${rsyncurl}/core/updates/$findex/$arch/ ${root}/core/updates/$findex/$arch/ + rsync $dry_run -avz --delete --exclude debug/ ${rsyncurl}/core/updates/$findex/$arch/ ${root}/core/updates/$findex/$arch/ echo "============================== $findex extras" mkdir -p ${root}/extras/$findex/$arch/ - rsync $dry_run -avz --exclude debug/ ${rsyncurl}/extras/$findex/$arch/ ${root}/extras/$findex/$arch/ + rsync $dry_run -avz --delete --exclude debug/ ${rsyncurl}/extras/$findex/$arch/ ${root}/extras/$findex/$arch/ ;; 7) echo "============================== $findex core" mkdir -p ${root}/core/$findex/$arch/os/ - rsync $dry_run -avz --exclude debug/ ${rsyncurl}/core/$findex/Everything/$arch/os/ ${root}/core/$findex/$arch/os/ + rsync $dry_run -avz --delete --exclude debug/ ${rsyncurl}/core/$findex/Everything/$arch/os/ ${root}/core/$findex/$arch/os/ echo "============================== $findex updates" mkdir -p ${root}/core/updates/$findex/$arch/ - rsync $dry_run -avz --exclude debug/ ${rsyncurl}/core/updates/$findex/$arch/ ${root}/core/updates/$findex/$arch/ + rsync $dry_run -avz --delete --exclude debug/ ${rsyncurl}/core/updates/$findex/$arch/ ${root}/core/updates/$findex/$arch/ ;; 8) # somehow the layout on my favorite mirror is different in 7 and 8, /Everything/ has gone echo "============================== $findex core" mkdir -p ${root}/core/$findex/$arch/os/ - rsync $dry_run -avz --exclude debug/ ${rsyncurl}/core/$findex/$arch/os/ ${root}/core/$findex/$arch/os/ + rsync $dry_run -avz --delete --exclude debug/ ${rsyncurl}/core/$findex/$arch/os/ ${root}/core/$findex/$arch/os/ echo "============================== $findex updates" mkdir -p ${root}/core/updates/$findex/$arch/ - rsync $dry_run -avz --exclude debug/ ${rsyncurl}/core/updates/$findex/$arch/ ${root}/core/updates/$findex/$arch/ + rsync $dry_run -avz --delete --exclude debug/ ${rsyncurl}/core/updates/$findex/$arch/ ${root}/core/updates/$findex/$arch/ ;; *) echo "Unknown fedora index $findex - exiting" -- 2.43.0