add --delete to rsync command to ensure that old rpms that are no longer in the repo...
authorMarc Fiuczynski <mef@cs.princeton.edu>
Mon, 19 Nov 2007 17:55:16 +0000 (17:55 +0000)
committerMarc Fiuczynski <mef@cs.princeton.edu>
Mon, 19 Nov 2007 17:55:16 +0000 (17:55 +0000)
vbuild-fedora-mirror.sh

index 773a193..3490cca 100755 (executable)
@@ -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"